# Create Dialog Item (Button)

Grammar — Create a button for dialog dialog with the dimensions (width, height) anchored to anchor with an offset of (offsetX, offsetY) setting the tooltip to tooltip with button text buttonText and the hover image set to hoverImage
FlagsAction

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

# Arguments

  • int [ dialog ] — Dialog
  • int — Width
  • int — Height
  • int [ preset::Anchor ] — Anchor
  • int — Offset X
  • int — Offset Y
  • text — Tooltip
  • text — Button Text
  • string [ filepath ] — Hover Image

Returns — int [ control ]

int libNtve_gf_CreateDialogItemButton(
	int lp_dialog,
	int lp_width,
	int lp_height,
	int lp_anchor,
	int lp_offsetX,
	int lp_offsetY,
	text lp_tooltip,
	text lp_buttonText,
	string lp_hoverImage,
);

Category: Dialog / Create Specific Dialog Item Actions

# Examples

# campaigns/liberty.sc2campaign

MapScript.galaxy

// L584
libNtve_gf_CreateDialogItemButton(gv_mainDialog, lp_width, lp_height, c_anchorTop, lp_x, lp_y, StringExternal("Param/Value/1B0FAE53"), TextCase(lp_buttonText, true), "")
// L584
libNtve_gf_CreateDialogItemButton(gv_mainDialog, lp_width, lp_height, c_anchorTop, lp_x, lp_y, StringExternal("Param/Value/1B0FAE53"), TextCase(lp_buttonText, true), "")

# campaigns/libertystory.sc2campaign

CampaignLib.galaxy

// L10954
libNtve_gf_CreateDialogItemButton(DialogLastCreated(), lv_c_WIDTH, 100, c_anchorTopLeft, 50, 50, StringToText(""), libCamp_gf_MissionName(lv_indexMission), "")
// L10968
libNtve_gf_CreateDialogItemButton(DialogLastCreated(), 150, 50, c_anchorBottomRight, 20, 20, StringToText(""), StringExternal("Param/Value/lib_Camp_55E536B7"), "")

# campaigns/swarmstory.sc2campaign

SwarmCampaignLib.galaxy

// L14664
libNtve_gf_CreateDialogItemButton(DialogLastCreated(), 150, 50, c_anchorBottomRight, 190, 30, StringToText(""), StringExternal("Param/Value/lib_SwaC_486AB24C"), "")
// L14667
libNtve_gf_CreateDialogItemButton(DialogLastCreated(), 150, 50, c_anchorBottomRight, 40, 30, StringToText(""), StringExternal("Param/Value/lib_SwaC_73CE9158"), "")
// L14670
libNtve_gf_CreateDialogItemButton(DialogLastCreated(), 150, 50, c_anchorBottomLeft, 40, 30, StringToText(""), StringExternal("Param/Value/lib_SwaC_51BC3001"), "")
// L15144
libNtve_gf_CreateDialogItemButton(DialogLastCreated(), 120, 50, c_anchorTopLeft, 0, 0, StringToText(""), StringExternal("Param/Value/lib_SwaC_FD82C21A"), "")
// L15190
libNtve_gf_CreateDialogItemButton(DialogLastCreated(), 150, 50, c_anchorBottomRight, 200, 50, StringToText(""), StringExternal("Param/Value/lib_SwaC_53E5CB52"), "")
// L15192
libNtve_gf_CreateDialogItemButton(DialogLastCreated(), 150, 50, c_anchorBottomRight, 50, 50, StringToText(""), StringExternal("Param/Value/lib_SwaC_C65D7C52"), "")
// L15481
libNtve_gf_CreateDialogItemButton(DialogLastCreated(), 150, 50, c_anchorBottomRight, 200, 50, StringToText(""), StringExternal("Param/Value/lib_SwaC_5F4EF89F"), "")
// L15483
libNtve_gf_CreateDialogItemButton(DialogLastCreated(), 150, 50, c_anchorBottomRight, 50, 50, StringToText(""), StringExternal("Param/Value/lib_SwaC_38F91ABC"), "")
// L15755
libNtve_gf_CreateDialogItemButton(lp_dialog, 200, 60, c_anchorTopLeft, 25, 100, StringToText(""), StringExternal("Param/Value/lib_SwaC_4D587262"), "")
// L15757
libNtve_gf_CreateDialogItemButton(lp_dialog, 200, 60, c_anchorTopLeft, 25, 160, StringToText(""), StringExternal("Param/Value/lib_SwaC_B5464DFF"), "")

# campaigns/swarmstoryutil.sc2mod

Lib281DEC45.galaxy

// L2183
libNtve_gf_CreateDialogItemButton(DialogLastCreated(), 630, 50, c_anchorTopLeft, 60, lib281DEC45_gv_zSS_DebugSceneButtonY, StringToText(""), lv_label, "")
// L2397
libNtve_gf_CreateDialogItemButton(lib281DEC45_gv_zSS_DebugStoryDialog, 150, 50, c_anchorTopLeft, 50, 50, StringToText(""), StringExternal("Param/Value/lib_281DEC45_D6CDD844"), "")
// L7279
libNtve_gf_CreateDialogItemButton(lib281DEC45_gv_zSS_DebugSceneDialog, 200, 50, c_anchorBottom, 0, 50, StringToText(""), StringExternal("Param/Value/lib_281DEC45_11F60812"), "")
// L7748
libNtve_gf_CreateDialogItemButton(lib281DEC45_gv_zSS_DebugStoryDialog, 200, 50, c_anchorBottomLeft, 50, 50, StringToText(""), StringExternal("Param/Value/lib_281DEC45_E71A5EF8"), "")
// L7751
libNtve_gf_CreateDialogItemButton(lib281DEC45_gv_zSS_DebugStoryDialog, 200, 50, c_anchorBottomRight, 50, 50, StringToText(""), StringExternal("Param/Value/lib_281DEC45_3FDA3873"), "")
// L7753
libNtve_gf_CreateDialogItemButton(lib281DEC45_gv_zSS_DebugStoryDialog, 200, 50, c_anchorBottomLeft, 50, 50, StringToText(""), StringExternal("Param/Value/lib_281DEC45_9185878E"), "")

# campaigns/void.sc2campaign

MapScript.galaxy

// L991
libNtve_gf_CreateDialogItemButton(DialogLastCreated(), 200, 100, c_anchorTopLeft, 0, 0, StringExternal("Param/Value/9989B3AF"), StringExternal("Param/Value/F42EC24F"), "")
// L1346
libNtve_gf_CreateDialogItemButton(gv_movingPlatform.lv_dialog, 80, 80, c_anchorTopLeft, 29, 23, StringExternal("Param/Value/65E28230"), StringToText(""), "Assets\\Textures\\ui_research_button_protoss_normaloverpressedover.dds")
// L1357
libNtve_gf_CreateDialogItemButton(gv_movingPlatform.lv_dialog, 80, 80, c_anchorTopLeft, 100, 23, StringExternal("Param/Value/00C778D9"), StringToText(""), "Assets\\Textures\\ui_research_button_protoss_normaloverpressedover.dds")
// L1368
libNtve_gf_CreateDialogItemButton(gv_movingPlatform.lv_dialog, 80, 80, c_anchorTopLeft, 170, 23, StringExternal("Param/Value/390F85F3"), StringToText(""), "Assets\\Textures\\ui_research_button_protoss_normaloverpressedover.dds")
// L1375
libNtve_gf_CreateDialogItemButton(gv_movingPlatform.lv_dialog, 80, 80, c_anchorTopLeft, 241, 23, StringExternal("Param/Value/B8916A75"), StringToText(""), "Assets\\Textures\\ui_research_button_protoss_normaloverpressedover.dds")
// L1386
libNtve_gf_CreateDialogItemButton(gv_movingPlatform.lv_dialog, 80, 80, c_anchorTopLeft, 310, 23, StringExternal("Param/Value/62E288E2"), StringToText(""), "Assets\\Textures\\ui_research_button_protoss_normaloverpressedover.dds")
// L2001
libNtve_gf_CreateDialogItemButton(gv_movingPlatform.lv_dialog, 80, 80, c_anchorTopRight, 23, 23, StringExternal("Param/Value/7595DED8"), StringToText(""), "Assets\\Textures\\ui_research_button_protoss_normaloverpressedover.dds")
// L1508
libNtve_gf_CreateDialogItemButton(gv_overloadTempleDialog, 341, 100, c_anchorTopRight, 0, 0, StringToText(""), StringExternal("Param/Value/0606FE01"), "Assets\\Textures\\ui_button_confirmation_normaloverpressedover_protoss.dds")
// L1512
libNtve_gf_CreateDialogItemButton(gv_overloadTempleDialog, 341, 100, c_anchorTopRight, 0, 0, StringToText(""), StringExternal("Param/Value/A0ABD598"), "Assets\\Textures\\ui_button_confirmation_normaloverpressedover_protoss.dds")
// L991
libNtve_gf_CreateDialogItemButton(DialogLastCreated(), 200, 100, c_anchorTopLeft, 0, 0, StringExternal("Param/Value/9989B3AF"), StringExternal("Param/Value/F42EC24F"), "")
// L1346
libNtve_gf_CreateDialogItemButton(gv_movingPlatform.lv_dialog, 80, 80, c_anchorTopLeft, 29, 23, StringExternal("Param/Value/65E28230"), StringToText(""), "Assets\\Textures\\ui_research_button_protoss_normaloverpressedover.dds")
// L1357
libNtve_gf_CreateDialogItemButton(gv_movingPlatform.lv_dialog, 80, 80, c_anchorTopLeft, 100, 23, StringExternal("Param/Value/00C778D9"), StringToText(""), "Assets\\Textures\\ui_research_button_protoss_normaloverpressedover.dds")
// L1368
libNtve_gf_CreateDialogItemButton(gv_movingPlatform.lv_dialog, 80, 80, c_anchorTopLeft, 170, 23, StringExternal("Param/Value/390F85F3"), StringToText(""), "Assets\\Textures\\ui_research_button_protoss_normaloverpressedover.dds")
// L1375
libNtve_gf_CreateDialogItemButton(gv_movingPlatform.lv_dialog, 80, 80, c_anchorTopLeft, 241, 23, StringExternal("Param/Value/B8916A75"), StringToText(""), "Assets\\Textures\\ui_research_button_protoss_normaloverpressedover.dds")
// L1386
libNtve_gf_CreateDialogItemButton(gv_movingPlatform.lv_dialog, 80, 80, c_anchorTopLeft, 310, 23, StringExternal("Param/Value/62E288E2"), StringToText(""), "Assets\\Textures\\ui_research_button_protoss_normaloverpressedover.dds")
// L2001
libNtve_gf_CreateDialogItemButton(gv_movingPlatform.lv_dialog, 80, 80, c_anchorTopRight, 23, 23, StringExternal("Param/Value/7595DED8"), StringToText(""), "Assets\\Textures\\ui_research_button_protoss_normaloverpressedover.dds")
// L1508
libNtve_gf_CreateDialogItemButton(gv_overloadTempleDialog, 341, 100, c_anchorTopRight, 0, 0, StringToText(""), StringExternal("Param/Value/0606FE01"), "Assets\\Textures\\ui_button_confirmation_normaloverpressedover_protoss.dds")
// L1512
libNtve_gf_CreateDialogItemButton(gv_overloadTempleDialog, 341, 100, c_anchorTopRight, 0, 0, StringToText(""), StringExternal("Param/Value/A0ABD598"), "Assets\\Textures\\ui_button_confirmation_normaloverpressedover_protoss.dds")

# campaigns/voidstory.sc2campaign

VoidCampaignLib.galaxy

// L208
libNtve_gf_CreateDialogItemButton(DialogLastCreated(), 150, 50, c_anchorBottomRight, 200, 50, StringToText(""), StringExternal("Param/Value/lib_VoiC_447CE194"), "")
// L210
libNtve_gf_CreateDialogItemButton(DialogLastCreated(), 150, 50, c_anchorBottomRight, 50, 50, StringToText(""), StringExternal("Param/Value/lib_VoiC_8D985BFF"), "")
// L212
libNtve_gf_CreateDialogItemButton(DialogLastCreated(), 300, 50, c_anchorBottomLeft, 50, 50, StringExternal("Param/Value/lib_VoiC_C4E15843"), StringExternal("Param/Value/lib_VoiC_F5A62B9A"), "")
// L214
libNtve_gf_CreateDialogItemButton(DialogLastCreated(), 300, 50, c_anchorTopRight, 50, 50, StringToText(""), StringExternal("Param/Value/lib_VoiC_39E8A069"), "")
// L297
libNtve_gf_CreateDialogItemButton(DialogLastCreated(), 150, 50, c_anchorBottomRight, 200, 50, StringToText(""), StringExternal("Param/Value/lib_VoiC_42542011"), "")
// L299
libNtve_gf_CreateDialogItemButton(DialogLastCreated(), 150, 50, c_anchorBottomRight, 50, 50, StringToText(""), StringExternal("Param/Value/lib_VoiC_EED2BB5F"), "")
// L973
libNtve_gf_CreateDialogItemButton(DialogLastCreated(), 150, 50, c_anchorBottomRight, 190, 30, StringToText(""), StringExternal("Param/Value/lib_VoiC_7BCF9B13"), "")
// L976
libNtve_gf_CreateDialogItemButton(DialogLastCreated(), 150, 50, c_anchorBottomRight, 40, 30, StringToText(""), StringExternal("Param/Value/lib_VoiC_208828FC"), "")
// L979
libNtve_gf_CreateDialogItemButton(DialogLastCreated(), 150, 50, c_anchorBottomLeft, 40, 30, StringToText(""), StringExternal("Param/Value/lib_VoiC_87B797D4"), "")
// L982
libNtve_gf_CreateDialogItemButton(DialogLastCreated(), 300, 60, c_anchorTopRight, 40, 40, StringExternal("Param/Value/lib_VoiC_1AC0C55D"), StringExternal("Param/Value/lib_VoiC_88E4833D"), "")

# campaigns/voidstory.sc2campaign

VoidCampaignMissionLib.galaxy

// L6127
libNtve_gf_CreateDialogItemButton(libVCMI_gv_pM_GameCheat_Dialog, 40, 40, c_anchorTopRight, 0, 0, StringExternal("Param/Value/lib_VCMI_21C58550"), StringExternal("Param/Value/lib_VCMI_E5CED145"), "")
// L6176
libNtve_gf_CreateDialogItemButton(libVCMI_gv_pM_GameCheat_Dialog, 200, 50, c_anchorTopLeft, 50, ((libVCMI_gv_pM_GameCheat_ArrayIndex * 50) + 50), lv_tooltip, lv_label, "")
// L6182
libNtve_gf_CreateDialogItemButton(libVCMI_gv_pM_GameCheat_Dialog, 200, 50, c_anchorTopLeft, 50, ((libVCMI_gv_pM_GameCheat_ArrayIndex * 50) + 50), StringExternal("Param/Value/lib_VCMI_CBE06FD6"), StringExternal("Param/Value/lib_VCMI_52B3321E"), "")
// L6448
libNtve_gf_CreateDialogItemButton(libVCMI_gv_pM_MissionCheat_Dialog, (( lv_buttonWidth * 3 ) / 4), lv_buttonHeight, c_anchorBottomRight, 3, 3, StringToText(""), StringExternal("Param/Value/lib_VCMI_619B3399"), "")

# campaigns/voidstory.sc2campaign

VoidCampaignStoryLib.galaxy

// L4738
libNtve_gf_CreateDialogItemButton(libVCST_gv_pS_DebugStoryDialog, 200, 50, c_anchorBottomLeft, 50, 50, StringToText(""), StringExternal("Param/Value/lib_VCST_DC70862E"), "")
// L4740
libNtve_gf_CreateDialogItemButton(libVCST_gv_pS_DebugStoryDialog, 200, 50, c_anchorBottomRight, 50, 50, StringToText(""), StringExternal("Param/Value/lib_VCST_3D85F733"), "")

# mods/heroesdata.stormmod

SupportLib.galaxy

// L784
libNtve_gf_CreateDialogItemButton(DialogLastCreated(), 35, 35, c_anchorTopRight, 5, 5, StringToText(""), StringExternal("Param/Value/lib_Sprt_4377DBE5"), "")

# mods/missionpacks/novacampaign.sc2mod

LibNCMI.galaxy

// L5067
libNtve_gf_CreateDialogItemButton(libNCMI_gv_NM_GameCheat_Dialog, 40, 40, c_anchorTopRight, 0, 0, StringExternal("Param/Value/lib_NCMI_21C58550"), StringExternal("Param/Value/lib_NCMI_E5CED145"), "")
// L5117
libNtve_gf_CreateDialogItemButton(libNCMI_gv_NM_GameCheat_Dialog, 200, 50, c_anchorTopLeft, 50, ((libNCMI_gv_NM_GameCheat_ArrayIndex * 50) + 50), lv_tooltip, lv_label, "")
// L5124
libNtve_gf_CreateDialogItemButton(libNCMI_gv_NM_GameCheat_Dialog, 200, 50, c_anchorTopLeft, 50, ((libNCMI_gv_NM_GameCheat_ArrayIndex * 50) + 50), StringExternal("Param/Value/lib_NCMI_CBE06FD6"), StringExternal("Param/Value/lib_NCMI_52B3321E"), "")
// L5388
libNtve_gf_CreateDialogItemButton(libNCMI_gv_NM_MissionCheat_Dialog, (( lv_buttonWidth * 3 ) / 4), lv_buttonHeight, c_anchorBottomRight, 3, 3, StringToText(""), StringExternal("Param/Value/lib_NCMI_619B3399"), "")

# mods/missionpacks/novacampaign.sc2mod

LibNCST.galaxy

// L4112
libNtve_gf_CreateDialogItemButton(libNCST_gv_nS_DebugStoryDialog, 200, 50, c_anchorBottomLeft, 50, 50, StringToText(""), StringExternal("Param/Value/lib_NCST_DC70862E"), "")
// L4114
libNtve_gf_CreateDialogItemButton(libNCST_gv_nS_DebugStoryDialog, 200, 50, c_anchorBottomRight, 50, 50, StringToText(""), StringExternal("Param/Value/lib_NCST_3D85F733"), "")

# mods/missionpacks/novacampaign.sc2mod

LibNovC.galaxy

// L264
libNtve_gf_CreateDialogItemButton(DialogLastCreated(), 180, 80, c_anchorTopLeft, lv_x, lv_y, StringToText(""), libNovC_gf_NC_ArmyTechItemName(lv_indexTechItem), "")
// L302
libNtve_gf_CreateDialogItemButton(DialogLastCreated(), 150, 50, c_anchorBottomRight, 200, 50, StringToText(""), StringExternal("Param/Value/lib_NovC_0128CD2B"), "")
// L304
libNtve_gf_CreateDialogItemButton(DialogLastCreated(), 150, 50, c_anchorBottomRight, 50, 50, StringToText(""), StringExternal("Param/Value/lib_NovC_9701AE87"), "")
// L547
libNtve_gf_CreateDialogItemButton(DialogLastCreated(), 150, 50, c_anchorBottomRight, 200, 50, StringToText(""), StringExternal("Param/Value/lib_NovC_447CE194"), "")
// L549
libNtve_gf_CreateDialogItemButton(DialogLastCreated(), 150, 50, c_anchorBottomRight, 50, 50, StringToText(""), StringExternal("Param/Value/lib_NovC_8D985BFF"), "")
// L551
libNtve_gf_CreateDialogItemButton(DialogLastCreated(), 300, 50, c_anchorTopRight, 50, 50, StringToText(""), StringExternal("Param/Value/lib_NovC_502FE759"), "")
// L553
libNtve_gf_CreateDialogItemButton(DialogLastCreated(), 300, 50, c_anchorBottomLeft, 50, 50, StringExternal("Param/Value/lib_NovC_C4E15843"), StringExternal("Param/Value/lib_NovC_F5A62B9A"), "")
// L872
libNtve_gf_CreateDialogItemButton(DialogLastCreated(), 150, 50, c_anchorBottomRight, 190, 30, StringToText(""), StringExternal("Param/Value/lib_NovC_7BCF9B13"), "")
// L875
libNtve_gf_CreateDialogItemButton(DialogLastCreated(), 150, 50, c_anchorBottomRight, 40, 30, StringToText(""), StringExternal("Param/Value/lib_NovC_208828FC"), "")
// L878
libNtve_gf_CreateDialogItemButton(DialogLastCreated(), 150, 50, c_anchorBottomLeft, 40, 30, StringToText(""), StringExternal("Param/Value/lib_NovC_87B797D4"), "")

# mods/novastoryassets.sc2mod

MapScript.galaxy

// L1332
libNtve_gf_CreateDialogItemButton(gv_gorgonDialog.lv_dialog, 80, 80, c_anchorLeft, 28, 2, TextExpressionAssemble("Param/Expression/8B406251"), StringToText(""), "Assets\\Textures\\ui_heroicons_frame_normaloverpressedover_terran.dds")
// L1338
libNtve_gf_CreateDialogItemButton(gv_gorgonDialog.lv_dialog, 80, 80, c_anchorLeft, 108, 2, TextExpressionAssemble("Param/Expression/88FF0399"), StringToText(""), "Assets\\Textures\\ui_heroicons_frame_normaloverpressedover_terran.dds")
// L1344
libNtve_gf_CreateDialogItemButton(gv_gorgonDialog.lv_dialog, 80, 80, c_anchorLeft, 188, 2, TextExpressionAssemble("Param/Expression/F8FE1F29"), StringToText(""), "Assets\\Textures\\ui_heroicons_frame_normaloverpressedover_terran.dds")
// L1332
libNtve_gf_CreateDialogItemButton(gv_gorgonDialog.lv_dialog, 80, 80, c_anchorLeft, 28, 2, TextExpressionAssemble("Param/Expression/8B406251"), StringToText(""), "Assets\\Textures\\ui_heroicons_frame_normaloverpressedover_terran.dds")
// L1338
libNtve_gf_CreateDialogItemButton(gv_gorgonDialog.lv_dialog, 80, 80, c_anchorLeft, 108, 2, TextExpressionAssemble("Param/Expression/88FF0399"), StringToText(""), "Assets\\Textures\\ui_heroicons_frame_normaloverpressedover_terran.dds")
// L1344
libNtve_gf_CreateDialogItemButton(gv_gorgonDialog.lv_dialog, 80, 80, c_anchorLeft, 188, 2, TextExpressionAssemble("Param/Expression/F8FE1F29"), StringToText(""), "Assets\\Textures\\ui_heroicons_frame_normaloverpressedover_terran.dds")

# mods/starcoop/starcoop.sc2mod

LibCOUI.galaxy

// L523
libNtve_gf_CreateDialogItemButton(libCOUI_gv_cU_AIChoiceDialog, 75, 50, c_anchorBottom, 0, 25, StringToText(""), StringExternal("Param/Value/lib_COUI_1B86DACB"), "")
// L633
libNtve_gf_CreateDialogItemButton(libCOUI_gv_cU_RandomMutationSelectDialog, 75, 50, c_anchorBottom, 0, 25, StringToText(""), StringToText("OK"), "")