# Game Menu Item Selected
Grammar — Player player selected gameMenuItem|Game Menu Item on the Game Menu Dialog
Flags —Native
|Event
This event fires when a player selects an item on the Game Menu Dialog. Use “Game Menu Item Selected” to get the menu item that the player selected.
# Arguments
int
— Playerint
<preset::GameMenuDialogItem> — Game Menu Item
Returns — void
native void TriggerAddEventGameMenuItemSelected(
trigger t,
int player,
int gameMenuIndex,
);
# Event parameters
- Game Menu Item Selected — EventGameMenuItemSelected
# Related
Category: UI / Game Menu
- Abort Mission —
void
— TriggerAddEventAbortMission - Game Menu Item Selected —
void
— TriggerAddEventGameMenuItemSelected - Game Menu Item Selected —
int
<preset::GameMenuDialogItem> — EventGameMenuItemSelected - Set Game Menu Dialog Item Text —
void
— UISetGameMenuItemText - Set Game Menu Dialog Item Shortcut —
void
— UISetGameMenuItemShortcut - Show/Hide Game Menu Dialog Item —
void
— UISetGameMenuItemVisible - Show Custom Menu —
void
— UIShowCustomMenu - Show Standard Menu —
void
— UIShowStandardMenu - Set Custom Menu Dialog Item Text —
void
— UISetCustomMenuItemText - Set Custom Menu Dialog Item Shortcut —
void
— UISetCustomMenuItemShortcut - Show/Hide Custom Menu Dialog Item —
void
— UISetCustomMenuItemVisible - Hide All Custom Menu Dialog Items —
void
— UIClearCustomMenuItemList
# Examples
campaigns/liberty.sc2campaign — base.sc2maps/maps/campaign/tarcade.sc2map/MapScript.galaxy:8337
void gt_PlayAgainClicked_Init () {
gt_PlayAgainClicked = TriggerCreate("gt_PlayAgainClicked_Func");
TriggerAddEventGameMenuItemSelected(gt_PlayAgainClicked, c_playerAny, c_gameMenuDialogGenericButton1);
}
campaigns/liberty.sc2campaign — base.sc2maps/maps/campaign/tarcade.sc2map/MapScript.galaxy:8358
void gt_QuitClicked_Init () {
gt_QuitClicked = TriggerCreate("gt_QuitClicked_Func");
TriggerAddEventGameMenuItemSelected(gt_QuitClicked, c_playerAny, c_gameMenuDialogGenericButton2);
}
campaigns/liberty.sc2campaign — base.sc2maps/maps/campaign/tarcade.sc2map/MapScript.galaxy:8378
void gt_ReturnToGameClicked_Init () {
gt_ReturnToGameClicked = TriggerCreate("gt_ReturnToGameClicked_Func");
TriggerAddEventGameMenuItemSelected(gt_ReturnToGameClicked, c_playerAny, c_gameMenuDialogReturnToGameplayButton);
}
campaigns/liberty.sc2campaign — base.sc2maps/maps/campaign/tstory01.sc2map/MapScript.galaxy:17517
void gt_PlayerQuitsStorymode_Init () {
gt_PlayerQuitsStorymode = TriggerCreate("gt_PlayerQuitsStorymode_Func");
TriggerAddEventGameMenuItemSelected(gt_PlayerQuitsStorymode, c_playerAny, c_gameMenuDialogQuitButton);
}
campaigns/liberty.sc2campaign/base.sc2maps/maps/campaign/tarcade.sc2map — MapScript.galaxy:8337
void gt_PlayAgainClicked_Init () {
gt_PlayAgainClicked = TriggerCreate("gt_PlayAgainClicked_Func");
TriggerAddEventGameMenuItemSelected(gt_PlayAgainClicked, c_playerAny, c_gameMenuDialogGenericButton1);
}
campaigns/liberty.sc2campaign/base.sc2maps/maps/campaign/tarcade.sc2map — MapScript.galaxy:8358
void gt_QuitClicked_Init () {
gt_QuitClicked = TriggerCreate("gt_QuitClicked_Func");
TriggerAddEventGameMenuItemSelected(gt_QuitClicked, c_playerAny, c_gameMenuDialogGenericButton2);
}
campaigns/liberty.sc2campaign/base.sc2maps/maps/campaign/tarcade.sc2map — MapScript.galaxy:8378
void gt_ReturnToGameClicked_Init () {
gt_ReturnToGameClicked = TriggerCreate("gt_ReturnToGameClicked_Func");
TriggerAddEventGameMenuItemSelected(gt_ReturnToGameClicked, c_playerAny, c_gameMenuDialogReturnToGameplayButton);
}
campaigns/liberty.sc2campaign/base.sc2maps/maps/campaign/tstory01.sc2map — MapScript.galaxy:17517
void gt_PlayerQuitsStorymode_Init () {
gt_PlayerQuitsStorymode = TriggerCreate("gt_PlayerQuitsStorymode_Func");
TriggerAddEventGameMenuItemSelected(gt_PlayerQuitsStorymode, c_playerAny, c_gameMenuDialogQuitButton);
}
campaigns/swarmstoryutil.sc2mod — base.sc2data/Lib281DEC45.galaxy:5848
void lib281DEC45_gt_ZSS_StoryModeMenuQuit_Init () {
lib281DEC45_gt_ZSS_StoryModeMenuQuit = TriggerCreate("lib281DEC45_gt_ZSS_StoryModeMenuQuit_Func");
TriggerAddEventGameMenuItemSelected(lib281DEC45_gt_ZSS_StoryModeMenuQuit, c_playerAny, c_gameMenuDialogQuitButton);
}
campaigns/voidstory.sc2campaign — base.sc2data/TriggerLibs/VoidCampaignStoryLib.galaxy:5011
void libVCST_gt_PS_StoryModeMenuQuit_Init () {
libVCST_gt_PS_StoryModeMenuQuit = TriggerCreate("libVCST_gt_PS_StoryModeMenuQuit_Func");
TriggerAddEventGameMenuItemSelected(libVCST_gt_PS_StoryModeMenuQuit, c_playerAny, c_gameMenuDialogQuitButton);
}
mods/heroes.stormmod — base.stormmaps/maps/heroes/singleplayermaps/startingexperience/tutorial01.stormmap/MapScript.galaxy:4444
void gt_PlayerExitEarly_Init () {
gt_PlayerExitEarly = TriggerCreate("gt_PlayerExitEarly_Func");
TriggerAddEventGameMenuItemSelected(gt_PlayerExitEarly, c_playerAny, c_gameMenuDialogQuitButton);
}
mods/heroes.stormmod — base.stormmaps/maps/heroes/singleplayermaps/startingexperience/tutorialmapmechanics.stormmap/MapScript.galaxy:1224
void gt_PlayerExitEarly_Init () {
gt_PlayerExitEarly = TriggerCreate("gt_PlayerExitEarly_Func");
TriggerAddEventGameMenuItemSelected(gt_PlayerExitEarly, c_playerAny, c_gameMenuDialogQuitButton);
}
mods/heroes.stormmod/base.stormmaps/maps/heroes/singleplayermaps/startingexperience/tutorial01.stormmap — MapScript.galaxy:4444
void gt_PlayerExitEarly_Init () {
gt_PlayerExitEarly = TriggerCreate("gt_PlayerExitEarly_Func");
TriggerAddEventGameMenuItemSelected(gt_PlayerExitEarly, c_playerAny, c_gameMenuDialogQuitButton);
}
mods/heroes.stormmod/base.stormmaps/maps/heroes/singleplayermaps/startingexperience/tutorialmapmechanics.stormmap — MapScript.galaxy:1224
void gt_PlayerExitEarly_Init () {
gt_PlayerExitEarly = TriggerCreate("gt_PlayerExitEarly_Func");
TriggerAddEventGameMenuItemSelected(gt_PlayerExitEarly, c_playerAny, c_gameMenuDialogQuitButton);
}
mods/missionpacks/novacampaign.sc2mod — base.sc2data/LibNCST.galaxy:4374
void libNCST_gt_NS_StoryModeMenuQuit_Init () {
libNCST_gt_NS_StoryModeMenuQuit = TriggerCreate("libNCST_gt_NS_StoryModeMenuQuit_Func");
TriggerAddEventGameMenuItemSelected(libNCST_gt_NS_StoryModeMenuQuit, c_playerAny, c_gameMenuDialogQuitButton);
}
mods/starcoop/starcoop.sc2mod — base.sc2data/LibCOMI.galaxy:29776
libCOMI_gt_CM_AbortMission = TriggerCreate("libCOMI_gt_CM_AbortMission_Func");
TriggerAddEventAbortMission(libCOMI_gt_CM_AbortMission, c_playerAny);
TriggerAddEventGameMenuItemSelected(libCOMI_gt_CM_AbortMission, c_playerAny, c_gameMenuDialogQuitButton);
}