# Set Purchase Category State

Grammar — Set the state of purchaseCategory to state
FlagsNative | Action

Sets the visibility state for the specified purchase category.

# Arguments

Returns — void

native void PurchaseCategorySetState(
	int inPurchaseCategoryId,
	int inState,
);

Category: Story / Tech Purchase Panel / Purchase Categories

# Examples

campaigns/libertystory.sc2campaignbase.sc2data/TriggerLibs/CampaignLib.galaxy:7699

        }
        if ((lv_slot > 0)) {
            PurchaseCategorySetState(libCamp_gv_tS_TechCategory_UI[(lv_indexCategory)], c_purchaseCategoryStateEnabled);
        }
        else {

campaigns/libertystory.sc2campaignbase.sc2data/TriggerLibs/CampaignLib.galaxy:7702

        }
        else {
            PurchaseCategorySetState(libCamp_gv_tS_TechCategory_UI[(lv_indexCategory)], c_purchaseCategoryStateHidden);
        }
        auto8062DA62_i = auto8062DA62_i + 1;

campaigns/libertystory.sc2campaignbase.sc2data/TriggerLibs/CampaignLib.galaxy:7818

        if ((libCamp_gv_tSX_TechCategoryCount[lv_categoryIndex] > -1)) {
            if ((libCamp_gv_tSX_TechCategoryCount[lv_categoryIndex] > 0)) {
                PurchaseCategorySetState(libCamp_gv_tS_TechCategory_UI[lv_categoryIndex], c_purchaseCategoryStateNew);
            }
            else {

campaigns/libertystory.sc2campaignbase.sc2data/TriggerLibs/CampaignLib.galaxy:7821

            }
            else {
                PurchaseCategorySetState(libCamp_gv_tS_TechCategory_UI[lv_categoryIndex], c_purchaseCategoryStateEnabled);
            }
        }

campaigns/libertystory.sc2campaignbase.sc2data/TriggerLibs/CampaignLib.galaxy:12665


    lv_tech = PurchaseGetSelectedPurchaseCategory(1);
    PurchaseCategorySetState(PurchaseGetSelectedPurchaseCategory(1), c_purchaseCategoryStateEnabled);
    PurchaseCategorySetNameText(libCamp_gv_tS_TechCategory_UI[(lv_tech)], (libCamp_gv_tS_TechCategoryName[(lv_tech)] + StringToText("")));
    return true;