# Enable/Disable Dialog Item

GrammarenableOption|Enable/Disable dialogItem for players
FlagsNative | Action

Enable or disable a dialog item. A disabled dialog item is greyed out, and cannot be used.

# Arguments

  • int [ control ] — Dialog Item
  • playergroup — Players
  • bool [ preset::Enable_Disable_Option ] — Enable Option

Returns — void

native void DialogControlSetEnabled(
	int control,
	playergroup players,
	bool isEnabled,
);

Category: Dialog / Dialog Items

# Examples

# campaigns/liberty.sc2campaign

MapScript.galaxy

// L4687
DialogControlSetEnabled(DialogControlLastCreated(), PlayerGroupAll(), false)
// L4888
DialogControlSetEnabled(DialogControlLastCreated(), PlayerGroupAll(), false)
// L4987
DialogControlSetEnabled(DialogControlLastCreated(), PlayerGroupAll(), false)
// L1204
DialogControlSetEnabled(libNtve_gf_ScreenButton(1), PlayerGroupAll(), false)
// L1217
DialogControlSetEnabled(libNtve_gf_ScreenButton(1), PlayerGroupAll(), true)
// L1222
DialogControlSetEnabled(libNtve_gf_ScreenButton(1), PlayerGroupAll(), false)
// L4499
DialogControlSetEnabled(libNtve_gf_ScreenButton(1), PlayerGroupAll(), false)
// L4752
DialogControlSetEnabled(libNtve_gf_ScreenButton(1), PlayerGroupAll(), false)
// L5556
DialogControlSetEnabled(libNtve_gf_ScreenButton(1), PlayerGroupAll(), false)
// L4687
DialogControlSetEnabled(DialogControlLastCreated(), PlayerGroupAll(), false)
// L4888
DialogControlSetEnabled(DialogControlLastCreated(), PlayerGroupAll(), false)
// L4987
DialogControlSetEnabled(DialogControlLastCreated(), PlayerGroupAll(), false)
// L1204
DialogControlSetEnabled(libNtve_gf_ScreenButton(1), PlayerGroupAll(), false)
// L1217
DialogControlSetEnabled(libNtve_gf_ScreenButton(1), PlayerGroupAll(), true)
// L1222
DialogControlSetEnabled(libNtve_gf_ScreenButton(1), PlayerGroupAll(), false)
// L4499
DialogControlSetEnabled(libNtve_gf_ScreenButton(1), PlayerGroupAll(), false)
// L4752
DialogControlSetEnabled(libNtve_gf_ScreenButton(1), PlayerGroupAll(), false)
// L5556
DialogControlSetEnabled(libNtve_gf_ScreenButton(1), PlayerGroupAll(), false)

# campaigns/libertystory.sc2campaign

CampaignLib.galaxy

// L5831
DialogControlSetEnabled(libCamp_gv_tS_RoomChangeButtons[lp_buttonId], PlayerGroupAll(), true)
// L5837
DialogControlSetEnabled(libCamp_gv_tS_RoomChangeButtons[lp_buttonId], PlayerGroupAll(), false)
// L5843
DialogControlSetEnabled(libCamp_gv_tS_RoomChangeButtons[lp_buttonId], PlayerGroupAll(), false)
// L10819
DialogControlSetEnabled(libCamp_gv_tS_DebugProgressMissionButtons[(lv_indexMission)], PlayerGroupAll(), false)
// L10820
DialogControlSetEnabled(libCamp_gv_tS_DebugProgressMissionLabelsStates[(lv_indexMission)], PlayerGroupAll(), false)
// L10825
DialogControlSetEnabled(libCamp_gv_tS_DebugProgressMissionButtons[lv_indexMission], PlayerGroupAll(), true)
// L10826
DialogControlSetEnabled(libCamp_gv_tS_DebugProgressMissionLabelsStates[lv_indexMission], PlayerGroupAll(), true)
// L10831
DialogControlSetEnabled(libCamp_gv_tS_DebugProgressMissionButtons[lv_indexMission], PlayerGroupAll(), false)
// L10832
DialogControlSetEnabled(libCamp_gv_tS_DebugProgressMissionLabelsStates[lv_indexMission], PlayerGroupAll(), false)
// L10860
DialogControlSetEnabled(libCamp_gv_tS_DebugProgressMissionButtonUnlockSecret, PlayerGroupAll(), true)

# campaigns/swarm.sc2campaign

MapScript.galaxy

// L2864
DialogControlSetEnabled(gv_spawnLocustButton, PlayerGroupAll(), true)
// L2874
DialogControlSetEnabled(gv_spawnLocustButton, PlayerGroupAll(), false)
// L2864
DialogControlSetEnabled(gv_spawnLocustButton, PlayerGroupAll(), true)
// L2874
DialogControlSetEnabled(gv_spawnLocustButton, PlayerGroupAll(), false)

# campaigns/swarmstory.sc2campaign

SwarmCampaignLib.galaxy

// L7460
DialogControlSetEnabled(libSwaC_gv_zS_ArmyCustomEggRoomEvolutionMissionButton, PlayerGroupAll(), false)
// L7468
DialogControlSetEnabled(libSwaC_gv_zS_ArmyCustomEggRoomEvolutionMissionButton, PlayerGroupAll(), true)
// L9223
DialogControlSetEnabled(libSwaC_gv_zS_ArmyCustomEvolutionAcceptButton1, PlayerGroupAll(), false)
// L9224
DialogControlSetEnabled(libSwaC_gv_zS_ArmyCustomEvolutionAcceptButton2, PlayerGroupAll(), false)
// L9245
DialogControlSetEnabled(libSwaC_gv_zS_ArmyCustomEvolutionAcceptButton1, PlayerGroupAll(), true)
// L9246
DialogControlSetEnabled(libSwaC_gv_zS_ArmyCustomEvolutionAcceptButton2, PlayerGroupAll(), false)
// L9252
DialogControlSetEnabled(libSwaC_gv_zS_ArmyCustomEvolutionAcceptButton1, PlayerGroupAll(), false)
// L9253
DialogControlSetEnabled(libSwaC_gv_zS_ArmyCustomEvolutionAcceptButton2, PlayerGroupAll(), true)
// L11639
DialogControlSetEnabled(libSwaC_gv_zS_KerriganUITierButtons[lv_tier][lv_tierIndex], PlayerGroupAll(), true)
// L11641
DialogControlSetEnabled(libSwaC_gv_zS_KerriganUITierButtonIcons[lv_tier][lv_tierIndex], PlayerGroupAll(), true)

# campaigns/swarmstoryutil.sc2mod

Lib281DEC45.galaxy

// L1126
DialogControlSetEnabled(lib281DEC45_gv_zSS_UITravelBackButton, PlayerGroupAll(), false)
// L1832
DialogControlSetEnabled(lib281DEC45_gv_zSS_UIMainBottomButtons[(lp_buttonIndex)], PlayerGroupAll(), true)
// L1836
DialogControlSetEnabled(lib281DEC45_gv_zSS_UIMainBottomButtons[(lp_buttonIndex)], PlayerGroupAll(), false)
// L2356
DialogControlSetEnabled(lib281DEC45_gv_zSS_DebugStoryPlayButton, PlayerGroupAll(), false)
// L2359
DialogControlSetEnabled(lib281DEC45_gv_zSS_DebugStoryPlayButton, PlayerGroupAll(), true)
// L6828
DialogControlSetEnabled(lib281DEC45_gv_zSS_MissionDifficultyDropdown, PlayerGroupAll(), false)
// L7887
DialogControlSetEnabled(lib281DEC45_gv_zSS_DebugStoryPlayButton, PlayerGroupAll(), true)

# campaigns/void.sc2campaign

MapScript.galaxy

// L848
DialogControlSetEnabled(gv_victoryUI_StageSelectButtons[1], PlayerGroupAll(), true)
// L849
DialogControlSetEnabled(gv_victoryUI_StageSelectButtons[2], PlayerGroupAll(), true)
// L850
DialogControlSetEnabled(gv_victoryUI_StageSelectButtons[3], PlayerGroupAll(), false)
// L851
DialogControlSetEnabled(gv_victoryUI_StageSelectButtons[4], PlayerGroupAll(), false)
// L860
DialogControlSetEnabled(gv_victoryUI_StageSelectButtons[1], PlayerGroupAll(), true)
// L861
DialogControlSetEnabled(gv_victoryUI_StageSelectButtons[2], PlayerGroupAll(), true)
// L862
DialogControlSetEnabled(gv_victoryUI_StageSelectButtons[3], PlayerGroupAll(), true)
// L863
DialogControlSetEnabled(gv_victoryUI_StageSelectButtons[4], PlayerGroupAll(), false)
// L872
DialogControlSetEnabled(gv_victoryUI_StageSelectButtons[1], PlayerGroupAll(), true)
// L873
DialogControlSetEnabled(gv_victoryUI_StageSelectButtons[2], PlayerGroupAll(), true)
// L1043
DialogControlSetEnabled(gv_toggleButton, PlayerGroupAll(), false)
// L1081
DialogControlSetEnabled(gv_toggleButton, PlayerGroupAll(), true)
// L1350
DialogControlSetEnabled(gv_movingPlatform.lv_leftButton, PlayerGroupAll(), false)
// L1361
DialogControlSetEnabled(gv_movingPlatform.lv_downButton, PlayerGroupAll(), false)
// L1379
DialogControlSetEnabled(gv_movingPlatform.lv_rightButton, PlayerGroupAll(), false)
// L1539
DialogControlSetEnabled(gv_movingPlatform.lv_leftButton, PlayerGroupAll(), false)
// L1543
DialogControlSetEnabled(gv_movingPlatform.lv_downButton, PlayerGroupAll(), false)
// L1547
DialogControlSetEnabled(gv_movingPlatform.lv_upButton, PlayerGroupAll(), false)
// L1551
DialogControlSetEnabled(gv_movingPlatform.lv_rightButton, PlayerGroupAll(), false)
// L1555
DialogControlSetEnabled(gv_movingPlatform.lv_townBellButton, PlayerGroupAll(), false)
// L1593
DialogControlSetEnabled(gv_movingPlatform.lv_leftButton, PlayerGroupAll(), true)
// L1600
DialogControlSetEnabled(gv_movingPlatform.lv_downButton, PlayerGroupAll(), true)
// L1528
DialogControlSetEnabled(gv_overloadTempleButton, PlayerGroupAll(), false)
// L1533
DialogControlSetEnabled(gv_overloadTempleButton, PlayerGroupAll(), true)
// L1588
DialogControlSetEnabled(gv_overloadTempleButton, PlayerGroupAll(), false)
// L3395
DialogControlSetEnabled(gv_overloadTempleButton, PlayerGroupAll(), false)
// L848
DialogControlSetEnabled(gv_victoryUI_StageSelectButtons[1], PlayerGroupAll(), true)
// L849
DialogControlSetEnabled(gv_victoryUI_StageSelectButtons[2], PlayerGroupAll(), true)
// L850
DialogControlSetEnabled(gv_victoryUI_StageSelectButtons[3], PlayerGroupAll(), false)
// L851
DialogControlSetEnabled(gv_victoryUI_StageSelectButtons[4], PlayerGroupAll(), false)
// L860
DialogControlSetEnabled(gv_victoryUI_StageSelectButtons[1], PlayerGroupAll(), true)
// L861
DialogControlSetEnabled(gv_victoryUI_StageSelectButtons[2], PlayerGroupAll(), true)
// L862
DialogControlSetEnabled(gv_victoryUI_StageSelectButtons[3], PlayerGroupAll(), true)
// L863
DialogControlSetEnabled(gv_victoryUI_StageSelectButtons[4], PlayerGroupAll(), false)
// L872
DialogControlSetEnabled(gv_victoryUI_StageSelectButtons[1], PlayerGroupAll(), true)
// L873
DialogControlSetEnabled(gv_victoryUI_StageSelectButtons[2], PlayerGroupAll(), true)
// L1043
DialogControlSetEnabled(gv_toggleButton, PlayerGroupAll(), false)
// L1081
DialogControlSetEnabled(gv_toggleButton, PlayerGroupAll(), true)
// L1350
DialogControlSetEnabled(gv_movingPlatform.lv_leftButton, PlayerGroupAll(), false)
// L1361
DialogControlSetEnabled(gv_movingPlatform.lv_downButton, PlayerGroupAll(), false)
// L1379
DialogControlSetEnabled(gv_movingPlatform.lv_rightButton, PlayerGroupAll(), false)
// L1539
DialogControlSetEnabled(gv_movingPlatform.lv_leftButton, PlayerGroupAll(), false)
// L1543
DialogControlSetEnabled(gv_movingPlatform.lv_downButton, PlayerGroupAll(), false)
// L1547
DialogControlSetEnabled(gv_movingPlatform.lv_upButton, PlayerGroupAll(), false)
// L1551
DialogControlSetEnabled(gv_movingPlatform.lv_rightButton, PlayerGroupAll(), false)
// L1555
DialogControlSetEnabled(gv_movingPlatform.lv_townBellButton, PlayerGroupAll(), false)
// L1593
DialogControlSetEnabled(gv_movingPlatform.lv_leftButton, PlayerGroupAll(), true)
// L1600
DialogControlSetEnabled(gv_movingPlatform.lv_downButton, PlayerGroupAll(), true)
// L1528
DialogControlSetEnabled(gv_overloadTempleButton, PlayerGroupAll(), false)
// L1533
DialogControlSetEnabled(gv_overloadTempleButton, PlayerGroupAll(), true)
// L1588
DialogControlSetEnabled(gv_overloadTempleButton, PlayerGroupAll(), false)