# Set Dialog Item Hotkey

Grammar — Set dialogItem hotkey to hotkey for players
FlagsAction

Sets the hotkey for a dialog item. Currently supported for all dialog item types.

# Arguments

  • int<control> — Dialog Item
  • int<preset::Hotkey> — Hotkey
  • playergroup — Players

Returns — void

void libNtve_gf_SetDialogItemHotkey(
	int lp_dialogItem,
	int lp_hotkey,
	playergroup lp_players,
);

Category: Dialog / Dialog Item Tools

# Examples

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

        auto408967ED_val = lp_index;
        if (auto408967ED_val == 1) {
            libNtve_gf_SetDialogItemHotkey(libSwaC_gv_zS_SwarmHeroUIDialogButton[1], c_hotkeyHeroSelect0, PlayerGroupAll());
        }
        else if (auto408967ED_val == 2) {

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

        }
        else if (auto408967ED_val == 2) {
            libNtve_gf_SetDialogItemHotkey(libSwaC_gv_zS_SwarmHeroUIDialogButton[2], c_hotkeyHeroSelect1, PlayerGroupAll());
        }
        else {

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

    if (auto7C77441F_val == 1) {
        DialogControlHookupStandard(c_triggerControlTypeUnitTarget, "UIContainer/ConsoleUIContainer/HeroUnitFrame/UnitTargetFrame");
        libNtve_gf_SetDialogItemHotkey(DialogControlLastCreated(), c_hotkeyHeroSelect0, PlayerGroupAll());
    }
    else if (auto7C77441F_val == 2) {

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

    else if (auto7C77441F_val == 2) {
        DialogControlHookupStandard(c_triggerControlTypeUnitTarget, "UIContainer/ConsoleUIContainer/SecondaryHeroUnitFrame/UnitTargetFrame");
        libNtve_gf_SetDialogItemHotkey(DialogControlLastCreated(), c_hotkeyHeroSelect1, PlayerGroupAll());
    }
    else {

campaigns/voidstory.sc2campaignbase.sc2data/TriggerLibs/VoidCampaignUILib.galaxy:3710

        }
        if ((lp_index <= libVCUI_gv_pUC_VoidHerioUIMaxHeroCount)) {
            libNtve_gf_SetDialogItemHotkey(libVCUI_gv_pU_VoidHeroUIDialogButton[lp_index], lv_heroHotkey, PlayerGroupSingle(UnitGetOwner(lp_heroUnit)));
        }
        else {

campaigns/voidstory.sc2campaignbase.sc2data/TriggerLibs/VoidCampaignUILib.galaxy:3793

    if (auto2536CC65_val == 1) {
        DialogControlHookupStandard(c_triggerControlTypeUnitTarget, "UIContainer/ConsoleUIContainer/VoidHeroUnitFrame/UnitTargetFrame");
        libNtve_gf_SetDialogItemHotkey(DialogControlLastCreated(), c_hotkeyHeroSelect0, PlayerGroupAll());
    }
    else if (auto2536CC65_val == 2) {

campaigns/voidstory.sc2campaignbase.sc2data/TriggerLibs/VoidCampaignUILib.galaxy:3797

    else if (auto2536CC65_val == 2) {
        DialogControlHookupStandard(c_triggerControlTypeUnitTarget, "UIContainer/ConsoleUIContainer/SecondaryVoidHeroUnitFrame/UnitTargetFrame");
        libNtve_gf_SetDialogItemHotkey(DialogControlLastCreated(), c_hotkeyHeroSelect1, PlayerGroupAll());
    }
    else {

mods/missionpacks/novacampaign.sc2modbase.sc2data/LibNCUI.galaxy:3291

        }
        if ((lp_index <= libNCUI_gv_nUC_HeroMaxHeroCount)) {
            libNtve_gf_SetDialogItemHotkey(libNCUI_gv_NU_HeroDialogButton[lp_index], lv_heroHotkey, PlayerGroupSingle(UnitGetOwner(lp_heroUnit)));
        }
        else {

mods/missionpacks/novacampaign.sc2modbase.sc2data/LibNCUI.galaxy:3356

    if (auto2536CC65_val == 1) {
        DialogControlHookupStandard(c_triggerControlTypeUnitTarget, "UIContainer/ConsoleUIContainer/VoidHeroUnitFrame/UnitTargetFrame");
        libNtve_gf_SetDialogItemHotkey(DialogControlLastCreated(), c_hotkeyHeroSelect0, PlayerGroupAll());
    }
    else if (auto2536CC65_val == 2) {

mods/missionpacks/novacampaign.sc2modbase.sc2data/LibNCUI.galaxy:3360

    else if (auto2536CC65_val == 2) {
        DialogControlHookupStandard(c_triggerControlTypeUnitTarget, "UIContainer/ConsoleUIContainer/SecondaryVoidHeroUnitFrame/UnitTargetFrame");
        libNtve_gf_SetDialogItemHotkey(DialogControlLastCreated(), c_hotkeyHeroSelect1, PlayerGroupAll());
    }
    else {

mods/starcoop/starcoop.sc2modbase.sc2data/LibCOUI.galaxy:2701

        }
        if ((lp_index <= libCOUI_gv_cUC_HeroMaxCount)) {
            libNtve_gf_SetDialogItemHotkey(libCOUI_gv_cU_HeroDialogButton[lp_index], lv_heroHotkey, lv_heroGroup);
        }
        else {

mods/starcoop/starcoop.sc2modbase.sc2data/LibCOUI.galaxy:2784

    if (auto2536CC65_val == 1) {
        DialogControlHookupStandard(c_triggerControlTypeUnitTarget, "UIContainer/ConsoleUIContainer/VoidHeroUnitFrame/UnitTargetFrame");
        libNtve_gf_SetDialogItemHotkey(DialogControlLastCreated(), c_hotkeyHeroSelect0, PlayerGroupAll());
    }
    else if (auto2536CC65_val == 2) {

mods/starcoop/starcoop.sc2modbase.sc2data/LibCOUI.galaxy:2788

    else if (auto2536CC65_val == 2) {
        DialogControlHookupStandard(c_triggerControlTypeUnitTarget, "UIContainer/ConsoleUIContainer/SecondaryVoidHeroUnitFrame/UnitTargetFrame");
        libNtve_gf_SetDialogItemHotkey(DialogControlLastCreated(), c_hotkeyHeroSelect1, PlayerGroupAll());
    }
    else {

mods/voidprologue.sc2modbase.sc2data/LibA3DDD02B.galaxy:2062

        auto408967ED_val = lp_index;
        if (auto408967ED_val == 1) {
            libNtve_gf_SetDialogItemHotkey(libA3DDD02B_gv_pP_HeroUIDialogButton[1], c_hotkeyHeroSelect0, PlayerGroupAll());
        }
        else if (auto408967ED_val == 2) {

mods/voidprologue.sc2modbase.sc2data/LibA3DDD02B.galaxy:2065

        }
        else if (auto408967ED_val == 2) {
            libNtve_gf_SetDialogItemHotkey(libA3DDD02B_gv_pP_HeroUIDialogButton[2], c_hotkeyHeroSelect1, PlayerGroupAll());
        }
        else {

mods/voidprologue.sc2modbase.sc2data/LibA3DDD02B.galaxy:2154

    if (auto7C77441F_val == 1) {
        DialogControlHookupStandard(c_triggerControlTypeUnitTarget, "UIContainer/ConsoleUIContainer/VoidHeroUnitFrame/UnitTargetFrame");
        libNtve_gf_SetDialogItemHotkey(DialogControlLastCreated(), c_hotkeyHeroSelect0, PlayerGroupAll());
    }
    else if (auto7C77441F_val == 2) {

mods/voidprologue.sc2modbase.sc2data/LibA3DDD02B.galaxy:2158

    else if (auto7C77441F_val == 2) {
        DialogControlHookupStandard(c_triggerControlTypeUnitTarget, "UIContainer/ConsoleUIContainer/SecondaryVoidHeroUnitFrame/UnitTargetFrame");
        libNtve_gf_SetDialogItemHotkey(DialogControlLastCreated(), c_hotkeyHeroSelect1, PlayerGroupAll());
    }
    else {