# Create Dialog Item (Check Box)

Grammar — Create a check box for dialog dialog with the dimensions (width, height) anchored to anchor with an offset of (offsetX, offsetY) setting the tooltip to tooltip and default to checked
FlagsAction

Creates a check box dialog item, using parameters to set up the essential properties for the check box.

# Arguments

  • int<dialog> — Dialog
  • int — Width
  • int — Height
  • int<preset::Anchor> — Anchor
  • int — Offset X
  • int — Offset Y
  • text — Tooltip
  • bool<preset::CheckedOption> — Checked

Returns — int<control>

int libNtve_gf_CreateDialogItemCheckBox(
	int lp_dialog,
	int lp_width,
	int lp_height,
	int lp_anchor,
	int lp_offsetX,
	int lp_offsetY,
	text lp_tooltip,
	bool lp_checked,
);

Category: Dialog / Create Specific Dialog Item Actions

# Examples

campaigns/swarmstory.sc2campaignbase.sc2data/TriggerLibs/SwarmCampaignLib.galaxy:9684

                lv_indexUpgrade = CatalogFieldValueGet(c_gameCatalogArmyCategory, lv_indexCategory, "ArmyUpgradeArray["+IntToString(auto15E6CD07_ai-1)+"]", 1);
                lv_upgradeIndex += 1;
                libNtve_gf_CreateDialogItemCheckBox(DialogLastCreated(), 50, 50, c_anchorTopLeft, 50, 50, libSwaC_gf_ZS_StoryArmyUpgradeResults(lv_indexUpgrade), false);
                libSwaC_gv_zS_ArmyCustomArchivesUpgradeCheck[lv_categoryIndex][lv_upgradeIndex] = DialogControlLastCreated();
                DialogControlSetPositionRelative(DialogControlLastCreated(), PlayerGroupAll(), c_anchorLeft, lv_border, c_anchorLeft, (((lv_upgradeIndex - 1) * 225) + 12), 0);

campaigns/swarmstory.sc2campaignbase.sc2data/TriggerLibs/SwarmCampaignLib.galaxy:9704

                lv_indexEvo = CatalogFieldValueGet(c_gameCatalogArmyCategory, lv_indexCategory, "ArmyUnitArray["+IntToString(auto779D9171_ai-1)+"]", 1);
                lv_evoIndex += 1;
                libNtve_gf_CreateDialogItemCheckBox(DialogLastCreated(), 50, 50, c_anchorTopLeft, 50, 50, UserDataGetText("TechUnit", libSwaC_gf_ZS_TechUnitOfArmyUnit(lv_indexEvo), "AchiveArmyTooltip", 1), false);
                libSwaC_gv_zS_ArmyCustomArchivesEvolutionCheck[lv_categoryIndex][lv_evoIndex] = DialogControlLastCreated();
                DialogControlSetPositionRelative(DialogControlLastCreated(), PlayerGroupAll(), c_anchorLeft, lv_border, c_anchorLeft, (((lv_evoIndex - 1) * 190) + 12), 0);

campaigns/swarmstory.sc2campaignbase.sc2data/TriggerLibs/SwarmCampaignLib.galaxy:15124

                libNtve_gf_SetDialogItemStyle(DialogControlLastCreated(), "ModCenterSize16", PlayerGroupAll());
                lv_lastItem = DialogControlLastCreated();
                libNtve_gf_CreateDialogItemCheckBox(DialogLastCreated(), 50, 50, c_anchorTopLeft, 0, lv_y, StringToText(""), true);
                libSwaC_gv_zS_DebugStoryTechArmyCategoryCheck[libSwaC_gv_zS_DebugStoryTechArmyCatCount] = DialogControlLastCreated();
                DialogControlSetPositionRelative(DialogControlLastCreated(), PlayerGroupAll(), c_anchorTop, lv_lastItem, c_anchorBottom, 0, -20);

campaigns/swarmstory.sc2campaignbase.sc2data/TriggerLibs/SwarmCampaignLib.galaxy:15137

                    libNtve_gf_SetDialogItemTooltip(DialogControlLastCreated(), libSwaC_gf_ZS_ArmyUnitDescription(lv_indexArmyUnit), PlayerGroupAll());
                    lv_lastItem = DialogControlLastCreated();
                    libNtve_gf_CreateDialogItemCheckBox(DialogLastCreated(), 50, 50, c_anchorTopLeft, 0, lv_y, StringToText(""), true);
                    libSwaC_gv_zS_DebugStoryTechArmyUnitCheck[libSwaC_gv_zS_DebugStoryTechArmyCatCount][lv_unitIndex] = DialogControlLastCreated();
                    DialogControlSetPositionRelative(DialogControlLastCreated(), PlayerGroupAll(), c_anchorTop, lv_lastItem, c_anchorBottom, 0, -20);

campaigns/swarmstory.sc2campaignbase.sc2data/TriggerLibs/SwarmCampaignLib.galaxy:15173

    libNtve_gf_SetDialogItemStyle(DialogControlLastCreated(), "ModCenterSize16", PlayerGroupAll());
    lv_lastItem = DialogControlLastCreated();
    libNtve_gf_CreateDialogItemCheckBox(DialogLastCreated(), 50, 50, c_anchorTopLeft, 0, lv_y, StringToText(""), true);
    libSwaC_gv_zS_DebugStoryTechArmyCategoryCheck[libSwaC_gv_zS_DebugStoryTechArmyCatCount] = DialogControlLastCreated();
    DialogControlSetPositionRelative(DialogControlLastCreated(), PlayerGroupAll(), c_anchorTop, lv_lastItem, c_anchorBottom, 0, -20);

campaigns/swarmstory.sc2campaignbase.sc2data/TriggerLibs/SwarmCampaignLib.galaxy:15185

    libNtve_gf_SetDialogItemStyle(DialogControlLastCreated(), "ModCenterSize16", PlayerGroupAll());
    lv_lastItem = DialogControlLastCreated();
    libNtve_gf_CreateDialogItemCheckBox(DialogLastCreated(), 50, 50, c_anchorTopLeft, 0, lv_y, StringToText(""), true);
    libSwaC_gv_zS_DebugStoryTechArmyCategoryCheck[libSwaC_gv_zS_DebugStoryTechArmyCatCount] = DialogControlLastCreated();
    DialogControlSetPositionRelative(DialogControlLastCreated(), PlayerGroupAll(), c_anchorTop, lv_lastItem, c_anchorBottom, 0, -20);

campaigns/swarmstory.sc2campaignbase.sc2data/TriggerLibs/SwarmCampaignLib.galaxy:15468

        libNtve_gf_SetDialogItemTooltip(DialogControlLastCreated(), libSwaC_gf_ZS_StoryArmyUpgradeTooltip(lv_indexUpgrade), PlayerGroupAll());
        lv_lastItem = DialogControlLastCreated();
        libNtve_gf_CreateDialogItemCheckBox(DialogLastCreated(), 50, 50, c_anchorTopLeft, 0, 0, StringToText(""), true);
        libSwaC_gv_zS_DebugStoryTechUpgradeDlgUpgrades[lv_index] = DialogControlLastCreated();
        DialogControlSetPositionRelative(DialogControlLastCreated(), PlayerGroupAll(), c_anchorTop, lv_lastItem, c_anchorBottom, 0, -20);

campaigns/voidstory.sc2campaignbase.sc2data/TriggerLibs/VoidCampaignLib.galaxy:171

                libNtve_gf_SetDialogItemTooltip(DialogControlLastCreated(), TextExpressionAssemble("Param/Expression/lib_VoiC_9214BE9C"), PlayerGroupAll());
                lv_lastItem = DialogControlLastCreated();
                libNtve_gf_CreateDialogItemCheckBox(DialogLastCreated(), 50, 50, c_anchorTopLeft, 0, lv_y, StringToText(""), true);
                libVoiC_gv_pC_DebugCampaignTechArmyCategoryCheck[libVoiC_gv_pC_DebugCampaignTechArmyCatCount] = DialogControlLastCreated();
                TextExpressionSetToken("Param/Expression/lib_VoiC_1844DDD4", "B", StringToText((libVoiC_gf_PC_ArmyCategoryUnitType(lv_indexArmyCategory))));

campaigns/voidstory.sc2campaignbase.sc2data/TriggerLibs/VoidCampaignLib.galaxy:188

                    libNtve_gf_SetDialogItemTooltip(DialogControlLastCreated(), TextExpressionAssemble("Param/Expression/lib_VoiC_C4273795"), PlayerGroupAll());
                    lv_lastItem = DialogControlLastCreated();
                    libNtve_gf_CreateDialogItemCheckBox(DialogLastCreated(), 50, 50, c_anchorTopLeft, 0, lv_y, StringToText(""), true);
                    libVoiC_gv_pC_DebugCampaignTechArmyUnitCheck[libVoiC_gv_pC_DebugCampaignTechArmyCatCount][lv_unitIndex] = DialogControlLastCreated();
                    TextExpressionSetToken("Param/Expression/lib_VoiC_B0ABD7F6", "A", libVoiC_gf_PC_ArmyUnitDescription(lv_indexArmyUnit));

campaigns/voidstory.sc2campaignbase.sc2data/TriggerLibs/VoidCampaignLib.galaxy:287

                libNtve_gf_SetDialogItemTooltip(DialogControlLastCreated(), libVCUI_gf_PU_SoAPerkTooltip(lv_indexPower), PlayerGroupAll());
                lv_lastItem = DialogControlLastCreated();
                libNtve_gf_CreateDialogItemCheckBox(DialogLastCreated(), 50, 50, c_anchorTopLeft, 0, lv_y, StringToText(""), false);
                libVoiC_gv_pC_DebugCampaignTechSoAPowerCheck[libVoiC_gv_pC_DebugCampaignTechSoATypeCount][lv_index] = DialogControlLastCreated();
                DialogControlSetPositionRelative(DialogControlLastCreated(), PlayerGroupAll(), c_anchorTop, lv_lastItem, c_anchorBottom, 0, -20);

campaigns/voidstory.sc2campaignbase.sc2data/TriggerLibs/VoidCampaignMissionLib.galaxy:6133

        if (((auto4E6B6E6D_var == (c_gameCheatCooldown)) || (auto4E6B6E6D_var == (c_gameCheatFastBuild)) || (auto4E6B6E6D_var == (c_gameCheatGod)) || (auto4E6B6E6D_var == (c_gameCheatShowmap)))) {
            libVCMI_gv_pM_GameCheat_ArrayIndex += 1;
            libNtve_gf_CreateDialogItemCheckBox(libVCMI_gv_pM_GameCheat_Dialog, 25, 25, c_anchorTopLeft, 50, ((libVCMI_gv_pM_GameCheat_ArrayIndex * 50) + 50), StringExternal("Param/Value/lib_VCMI_2974025E"), false);
            libVCMI_gv_pM_GameCheat_CheckBox[auto4E6B6E6D_var] = DialogControlLastCreated();
            if ((libVCMI_gv_pM_GameCheat_CheatState[auto4E6B6E6D_var] == true)) {

mods/heroesdata.stormmodbase.stormdata/TriggerLibs/SupportLib.galaxy:901


    // Implementation
    libNtve_gf_CreateDialogItemCheckBox(libSprt_gv_qACheatsControlsPanel.lv_mainDialog, 25, 25, c_anchorTopLeft, lv_checkboxX, lv_checkboxY, StringExternal("Param/Value/lib_Sprt_99E675E7"), false);
    libSprt_gv_qACheatsControlsPanel.lv_alliedControlCheckbox = DialogControlLastCreated();
    DialogControlCreateFromTemplate(libSprt_gv_qACheatsControlsPanel.lv_mainDialog, c_triggerControlTypeLabel, "InputOptionsPanel/InputLabelTemplate");

mods/heroesdata.stormmodbase.stormdata/TriggerLibs/SupportLib.galaxy:908

    lv_checkboxY = (lv_checkboxY + lv_offsetY);
    lv_labelY = (lv_labelY + lv_offsetY);
    libNtve_gf_CreateDialogItemCheckBox(libSprt_gv_qACheatsControlsPanel.lv_mainDialog, 25, 25, c_anchorTopLeft, lv_checkboxX, lv_checkboxY, StringExternal("Param/Value/lib_Sprt_E24E1AD2"), false);
    libSprt_gv_qACheatsControlsPanel.lv_toggleSelectionCheckbox = DialogControlLastCreated();
    DialogControlCreateFromTemplate(libSprt_gv_qACheatsControlsPanel.lv_mainDialog, c_triggerControlTypeLabel, "InputOptionsPanel/InputLabelTemplate");

mods/heroesdata.stormmodbase.stormdata/TriggerLibs/SupportLib.galaxy:915

    lv_checkboxY = (lv_checkboxY + lv_offsetY);
    lv_labelY = (lv_labelY + lv_offsetY);
    libNtve_gf_CreateDialogItemCheckBox(libSprt_gv_qACheatsControlsPanel.lv_mainDialog, 25, 25, c_anchorTopLeft, lv_checkboxX, lv_checkboxY, StringExternal("Param/Value/lib_Sprt_BDF321A4"), false);
    libSprt_gv_qACheatsControlsPanel.lv_showMapCheckbox = DialogControlLastCreated();
    DialogControlCreateFromTemplate(libSprt_gv_qACheatsControlsPanel.lv_mainDialog, c_triggerControlTypeLabel, "InputOptionsPanel/InputLabelTemplate");

mods/heroesdata.stormmodbase.stormdata/TriggerLibs/SupportLib.galaxy:925

    lv_checkboxY = lv_checkboxStartY;
    lv_checkboxStartX = lv_checkboxX;
    libNtve_gf_CreateDialogItemCheckBox(libSprt_gv_qACheatsControlsPanel.lv_mainDialog, 25, 25, c_anchorTopLeft, lv_checkboxX, lv_checkboxY, StringExternal("Param/Value/lib_Sprt_C9702EBD"), false);
    libSprt_gv_qACheatsControlsPanel.lv_gridCheckbox = DialogControlLastCreated();
    DialogControlCreateFromTemplate(libSprt_gv_qACheatsControlsPanel.lv_mainDialog, c_triggerControlTypeLabel, "InputOptionsPanel/InputLabelTemplate");

mods/heroesdata.stormmodbase.stormdata/TriggerLibs/SupportLib.galaxy:932

    lv_checkboxY = (lv_checkboxY + lv_offsetY);
    lv_labelY = (lv_labelY + lv_offsetY);
    libNtve_gf_CreateDialogItemCheckBox(libSprt_gv_qACheatsControlsPanel.lv_mainDialog, 25, 25, c_anchorTopLeft, lv_checkboxX, lv_checkboxY, StringExternal("Param/Value/lib_Sprt_CEDD647E"), false);
    libSprt_gv_qACheatsControlsPanel.lv_tVECheckbox = DialogControlLastCreated();
    DialogControlCreateFromTemplate(libSprt_gv_qACheatsControlsPanel.lv_mainDialog, c_triggerControlTypeLabel, "InputOptionsPanel/InputLabelTemplate");

mods/heroesdata.stormmodbase.stormdata/TriggerLibs/SupportLib.galaxy:939

    lv_checkboxY = (lv_checkboxY + lv_offsetY);
    lv_labelY = (lv_labelY + lv_offsetY);
    libNtve_gf_CreateDialogItemCheckBox(libSprt_gv_qACheatsControlsPanel.lv_mainDialog, 25, 25, c_anchorTopLeft, lv_checkboxX, lv_checkboxY, StringExternal("Param/Value/lib_Sprt_DFE5FD64"), false);
    libSprt_gv_qACheatsControlsPanel.lv_visionCheckbox = DialogControlLastCreated();
    DialogControlCreateFromTemplate(libSprt_gv_qACheatsControlsPanel.lv_mainDialog, c_triggerControlTypeLabel, "InputOptionsPanel/InputLabelTemplate");

mods/heroesdata.stormmodbase.stormdata/TriggerLibs/SupportLib.galaxy:949

    lv_checkboxY = lv_checkboxStartY;
    lv_checkboxStartX = lv_checkboxX;
    libNtve_gf_CreateDialogItemCheckBox(libSprt_gv_qACheatsControlsPanel.lv_mainDialog, 25, 25, c_anchorTopLeft, lv_checkboxX, lv_checkboxY, StringExternal("Param/Value/lib_Sprt_3620F2BF"), false);
    libSprt_gv_qACheatsControlsPanel.lv_freeCheckbox = DialogControlLastCreated();
    DialogControlCreateFromTemplate(libSprt_gv_qACheatsControlsPanel.lv_mainDialog, c_triggerControlTypeLabel, "InputOptionsPanel/InputLabelTemplate");

mods/heroesdata.stormmodbase.stormdata/TriggerLibs/SupportLib.galaxy:956

    lv_checkboxY = (lv_checkboxY + lv_offsetY);
    lv_labelY = (lv_labelY + lv_offsetY);
    libNtve_gf_CreateDialogItemCheckBox(libSprt_gv_qACheatsControlsPanel.lv_mainDialog, 25, 25, c_anchorTopLeft, lv_checkboxX, lv_checkboxY, StringExternal("Param/Value/lib_Sprt_BA98993A"), false);
    libSprt_gv_qACheatsControlsPanel.lv_cooldownsCheckbox = DialogControlLastCreated();
    DialogControlCreateFromTemplate(libSprt_gv_qACheatsControlsPanel.lv_mainDialog, c_triggerControlTypeLabel, "InputOptionsPanel/InputLabelTemplate");

mods/heroesdata.stormmodbase.stormdata/TriggerLibs/SupportLib.galaxy:963

    lv_checkboxY = (lv_checkboxY + lv_offsetY);
    lv_labelY = (lv_labelY + lv_offsetY);
    libNtve_gf_CreateDialogItemCheckBox(libSprt_gv_qACheatsControlsPanel.lv_mainDialog, 25, 25, c_anchorTopLeft, lv_checkboxX, lv_checkboxY, StringExternal("Param/Value/lib_Sprt_B370BB3D"), false);
    libSprt_gv_qACheatsControlsPanel.lv_toggleWeaponsCheckbox = DialogControlLastCreated();
    DialogControlCreateFromTemplate(libSprt_gv_qACheatsControlsPanel.lv_mainDialog, c_triggerControlTypeLabel, "InputOptionsPanel/InputLabelTemplate");

mods/heroesdata.stormmodbase.stormdata/TriggerLibs/SupportLib.galaxy:1057


    // Implementation
    libNtve_gf_CreateDialogItemCheckBox(libSprt_gv_qACheatsControlsPanel.lv_mainDialog, 25, 25, c_anchorTopLeft, lv_checkboxX, lv_checkboxY, StringExternal("Param/Value/lib_Sprt_16505168"), false);
    libSprt_gv_qACheatsControlsPanel.lv_orderCheckbox = DialogControlLastCreated();
    DialogControlCreateFromTemplate(libSprt_gv_qACheatsControlsPanel.lv_mainDialog, c_triggerControlTypeLabel, "InputOptionsPanel/InputLabelTemplate");

mods/missionpacks/novacampaign.sc2modbase.sc2data/LibNCMI.galaxy:5073

        if (((IntLoopCurrent() == (c_gameCheatCooldown)) || (IntLoopCurrent() == (c_gameCheatFastBuild)) || (IntLoopCurrent() == (c_gameCheatGod)) || (IntLoopCurrent() == (c_gameCheatShowmap)))) {
            libNCMI_gv_NM_GameCheat_ArrayIndex += 1;
            libNtve_gf_CreateDialogItemCheckBox(libNCMI_gv_NM_GameCheat_Dialog, 25, 25, c_anchorTopLeft, 50, ((libNCMI_gv_NM_GameCheat_ArrayIndex * 50) + 50), StringExternal("Param/Value/lib_NCMI_2974025E"), false);
            libNCMI_gv_NM_GameCheat_CheckBox[IntLoopCurrent()] = DialogControlLastCreated();
            if ((libNCMI_gv_NM_GameCheat_CheatState[IntLoopCurrent()] == true)) {

mods/missionpacks/novacampaign.sc2modbase.sc2data/LibNovC.galaxy:291

        libNovC_gv_nC_DebugCampaignTechUpgradesCheckBoxName[lv_armyUnitIndex] = DialogControlLastCreated();
        lv_lastItem = DialogControlLastCreated();
        libNtve_gf_CreateDialogItemCheckBox(DialogLastCreated(), 50, 50, c_anchorTopLeft, lv_x, lv_y, StringToText(""), false);
        DialogControlSetPositionRelative(DialogControlLastCreated(), PlayerGroupAll(), c_anchorTop, lv_lastItem, c_anchorBottom, 0, -20);
        libNovC_gv_nC_DebugCampaignTechUpgradesCheckBox[lv_armyUnitIndex] = DialogControlLastCreated();

mods/missionpacks/novacampaign.sc2modbase.sc2data/LibNovC.galaxy:536

                libNtve_gf_SetDialogItemTooltip(DialogControlLastCreated(), libComC_gf_CC_PerkDescription(lv_indexEquipment), PlayerGroupAll());
                lv_lastItem = DialogControlLastCreated();
                libNtve_gf_CreateDialogItemCheckBox(DialogLastCreated(), 50, 50, c_anchorTopLeft, 0, lv_y, StringToText(""), false);
                libNovC_gv_nC_DebugCampaignTechEquipmentCheckBox[lv_equipmentGroupIndex][lv_equipmentIndex] = DialogControlLastCreated();
                libNovC_gv_nC_DebugCampaignTechEquipment[lv_equipmentGroupIndex][lv_equipmentIndex] = lv_indexEquipment;