# Create Dialog Item From Template

Grammar — Create a type for dialog dialog using the template template
FlagsNative | Action

Creates a dialog item, of the specified type, using the specified template for the specified dialog. Dialog item templates are preset, and cannot be user defined. A new dialog item will always be anchored to the top left of its parent dialog, with no offset. It can be moved and resized using the “Move Dialog Item” and “Set Dialog Item Size” actions. Flash dialog items will only work on Blizzard maps.

# Arguments

  • int [ dialog ] — Dialog
  • int [ preset::ControlType ] — Type
  • string [ layoutframe ] — Template

Returns — int [ control ]

native int DialogControlCreateFromTemplate(
	int dialog,
	int type,
	string inTemplate,
);

Category: Dialog / Dialog Items

# Examples

# campaigns/liberty.sc2campaign

MapScript.galaxy

// L10422
DialogControlCreateFromTemplate(DialogLastCreated(), c_triggerControlTypeButton, "CampaignTemplates/CampaignActionButtonTemplate")
// L10430
DialogControlCreateFromTemplate(DialogLastCreated(), c_triggerControlTypePulldown, "TriggerDialogFrame/DifficultyPulldownTemplate")
// L13783
DialogControlCreateFromTemplate(DialogLastCreated(), c_triggerControlTypeButton, "TriggerDialogFrame/CampaignButton")
// L10422
DialogControlCreateFromTemplate(DialogLastCreated(), c_triggerControlTypeButton, "CampaignTemplates/CampaignActionButtonTemplate")
// L10430
DialogControlCreateFromTemplate(DialogLastCreated(), c_triggerControlTypePulldown, "TriggerDialogFrame/DifficultyPulldownTemplate")
// L13783
DialogControlCreateFromTemplate(DialogLastCreated(), c_triggerControlTypeButton, "TriggerDialogFrame/CampaignButton")

# campaigns/libertystory.sc2campaign

CampaignLib.galaxy

// L2033
DialogControlCreateFromTemplate(DialogLastCreated(), c_triggerControlTypePanel, "CampaignTrialDialog/CampaignTrialDialogTemplate")

# campaigns/swarm.sc2campaign

MapScript.galaxy

// L2350
DialogControlCreateFromTemplate(DialogLastCreated(), c_triggerControlTypePanel, "HotS_GameUnitFrame/SmallProgressUnitFrameTemplate")
// L9865
DialogControlCreateFromTemplate(DialogLastCreated(), c_triggerControlTypePanel, "HotS_CampaignIntro/CampaignIntroPanel")
// L6412
DialogControlCreateFromTemplate(gv_dialogSecurityComputer_ReleaseZerg, c_triggerControlTypePanel, "HotS_GameUnitFrame/LabGreenButtonTemplate")
// L6427
DialogControlCreateFromTemplate(DialogLastCreated(), c_triggerControlTypePanel, "HotS_GameUnitFrame/LabGreenButtonTemplate")
// L724
DialogControlCreateFromTemplate(DialogLastCreated(), c_triggerControlTypeImage, "HotS_FullscreenImage/FullscreenImageTemplate")
// L2846
DialogControlCreateFromTemplate(DialogLastCreated(), c_triggerControlTypeButton, "HotS_SwarmTemplates/HotS_LargeOrangeButtonTemplate")
// L2350
DialogControlCreateFromTemplate(DialogLastCreated(), c_triggerControlTypePanel, "HotS_GameUnitFrame/SmallProgressUnitFrameTemplate")
// L9865
DialogControlCreateFromTemplate(DialogLastCreated(), c_triggerControlTypePanel, "HotS_CampaignIntro/CampaignIntroPanel")
// L6412
DialogControlCreateFromTemplate(gv_dialogSecurityComputer_ReleaseZerg, c_triggerControlTypePanel, "HotS_GameUnitFrame/LabGreenButtonTemplate")
// L6427
DialogControlCreateFromTemplate(DialogLastCreated(), c_triggerControlTypePanel, "HotS_GameUnitFrame/LabGreenButtonTemplate")
// L724
DialogControlCreateFromTemplate(DialogLastCreated(), c_triggerControlTypeImage, "HotS_FullscreenImage/FullscreenImageTemplate")
// L2846
DialogControlCreateFromTemplate(DialogLastCreated(), c_triggerControlTypeButton, "HotS_SwarmTemplates/HotS_LargeOrangeButtonTemplate")

# campaigns/swarmstory.sc2campaign

SwarmCampaignLib.galaxy

// L4425
DialogControlCreateFromTemplate(lv_achievementDialog, c_triggerControlTypePanel, "HotS_Mission/AchievementFrameDebugTemplate")
// L7408
DialogControlCreateFromTemplate(DialogLastCreated(), c_triggerControlTypePanel, "EggRoom/EggRoomTemplate")
// L8424
DialogControlCreateFromTemplate(DialogLastCreated(), c_triggerControlTypePanel, "HotS_Callouts/UnitCalloutArmyFrameLeftTemplate")
// L8429
DialogControlCreateFromTemplate(DialogLastCreated(), c_triggerControlTypePanel, "HotS_Callouts/UnitCalloutArmyFrameRightTemplate")
// L8486
DialogControlCreateFromTemplate(DialogLastCreated(), c_triggerControlTypePanel, "ArmyCustomization/UnitPanelTemplate")
// L8872
DialogControlCreateFromTemplate(DialogLastCreated(), c_triggerControlTypePanel, "ArmyCustomization/CategoryPanelTemplate")
// L9408
DialogControlCreateFromTemplate(DialogLastCreated(), c_triggerControlTypePanel, "HotS_BonusMissionSelection/MissionPanelTemplate")
// L9644
DialogControlCreateFromTemplate(libSwaC_gv_zS_ArmyCustomArchivesDialog, c_triggerControlTypePanel, "HotS_ArmyUpgradeDialog/ArmyUpgradeDialog")
// L11470
DialogControlCreateFromTemplate(DialogLastCreated(), c_triggerControlTypePanel, "HotS_KerriganCustomizationPanel/KerriganCustomizationPanelTemplate")
// L14264
DialogControlCreateFromTemplate(DialogLastCreated(), c_triggerControlTypePanel, "HotS_ScoreScreen/ScoreScreenTemplate")

# campaigns/swarmstoryutil.sc2mod

Lib281DEC45.galaxy

// L5035
DialogControlCreateFromTemplate(DialogLastCreated(), c_triggerControlTypePanel, "HotS_Callouts/UnitCalloutStoryFrameLeftTemplate")
// L5040
DialogControlCreateFromTemplate(DialogLastCreated(), c_triggerControlTypePanel, "HotS_Callouts/UnitCalloutStoryFrameRightTemplate")
// L6304
DialogControlCreateFromTemplate(DialogLastCreated(), c_triggerControlTypePanel, "HotS_TravelPanel/TravelPanelTemplate")
// L6660
DialogControlCreateFromTemplate(DialogLastCreated(), c_triggerControlTypePanel, "HotS_MissionPanel/MissionPanelTemplate")
// L7100
DialogControlCreateFromTemplate(lib281DEC45_gv_zSS_ScreenDialog, c_triggerControlTypePanel, "StorySet/StorySetTemplate")

# campaigns/void.sc2campaign

MapScript.galaxy

// L2190
DialogControlCreateFromTemplate(gv_zergSelectArmyF2Directive, c_triggerControlTypePanel, "LotV_TutorialUI/TutorialArmySelectDirective")
// L2573
DialogControlCreateFromTemplate(DialogLastCreated(), c_triggerControlTypePanel, "LotV_TutorialUI/VictoryUI")
// L2656
DialogControlCreateFromTemplate(gv_friendlyFireDirective, c_triggerControlTypePanel, "LotV_TutorialUI/TutorialFriendlyFireDirective")
// L2667
DialogControlCreateFromTemplate(gv_moveOrderDirective, c_triggerControlTypePanel, "LotV_TutorialUI/TutorialMoveOrderDirective")
// L2678
DialogControlCreateFromTemplate(gv_supplyHelperUI, c_triggerControlTypePanel, "LotV_TutorialUI/TutorialSupplyHelperDirective")
// L2190
DialogControlCreateFromTemplate(gv_zergSelectArmyF2Directive, c_triggerControlTypePanel, "LotV_TutorialUI/TutorialArmySelectDirective")
// L2573
DialogControlCreateFromTemplate(DialogLastCreated(), c_triggerControlTypePanel, "LotV_TutorialUI/VictoryUI")
// L2656
DialogControlCreateFromTemplate(gv_friendlyFireDirective, c_triggerControlTypePanel, "LotV_TutorialUI/TutorialFriendlyFireDirective")
// L2667
DialogControlCreateFromTemplate(gv_moveOrderDirective, c_triggerControlTypePanel, "LotV_TutorialUI/TutorialMoveOrderDirective")
// L2678
DialogControlCreateFromTemplate(gv_supplyHelperUI, c_triggerControlTypePanel, "LotV_TutorialUI/TutorialSupplyHelperDirective")

# campaigns/voidstory.sc2campaign

VoidCampaignLib.galaxy

// L1615
DialogControlCreateFromTemplate(lv_achievementDialog, c_triggerControlTypePanel, "LotV_Debug/AchievementFrameDebugTemplate")

# campaigns/voidstory.sc2campaign

VoidCampaignStoryLib.galaxy

// L4363
DialogControlCreateFromTemplate(DialogLastCreated(), c_triggerControlTypePanel, "LotV_StorySet/UnitCalloutRightTemplate")
// L4366
DialogControlCreateFromTemplate(DialogLastCreated(), c_triggerControlTypePanel, "LotV_StorySet/UnitCalloutLeftTemplate")

# campaigns/voidstory.sc2campaign

VoidCampaignUILib.galaxy

// L587
DialogControlCreateFromTemplate(DialogLastCreated(), c_triggerControlTypePanel, "LotV_ArmyUpgradeUI/ArmyUpgradeTemplate")
// L2290
DialogControlCreateFromTemplate(DialogLastCreated(), c_triggerControlTypePanel, "LotV_ShipUpgradeUI/ShipUpgradeTemplate")
// L4349
DialogControlCreateFromTemplate(DialogLastCreated(), c_triggerControlTypePanel, "HotS_GameUnitFrame/SmallProgressUnitFrameTemplate")
// L5124
DialogControlCreateFromTemplate(DialogLastCreated(), c_triggerControlTypePanel, "LotV_GameUI/SoATargetingUITemplate")
// L5146
DialogControlCreateFromTemplate(DialogLastCreated(), c_triggerControlTypePortrait, "LotV_GameUI/SoAOverlayTemplate")
// L5319
DialogControlCreateFromTemplate(lv_creditsDialog, c_triggerControlTypePanel, "LotV_VoidCredits/VoidCreditsTemplate")
// L5340
DialogControlCreateFromTemplate(libVCUI_gv_pU_LoreCreditsDialog, c_triggerControlTypePanel, "LotV_LoreCredits/LoreCreditsTemplate")
// L5375
DialogControlCreateFromTemplate(DialogLastCreated(), c_triggerControlTypePanel, "HotS_ScoreScreen/ScoreScreenTemplate")
// L5563
DialogControlCreateFromTemplate(DialogLastCreated(), c_triggerControlTypePanel, "VoidShared_ScoreScreen/ScoreScreenTemplate")
// L6864
DialogControlCreateFromTemplate(DialogLastCreated(), c_triggerControlTypePanel, "LotV_StorySet/StorySetTemplate")

# mods/challenges.sc2mod

LibChal.galaxy

// L531
DialogControlCreateFromTemplate(DialogLastCreated(), c_triggerControlTypeButton, "TriggerDialogFrame/TriggerControlRightChallengeButton")
// L542
DialogControlCreateFromTemplate(DialogLastCreated(), c_triggerControlTypeButton, "TriggerDialogFrame/TriggerControlLeftChallengeButton")
// L1121
DialogControlCreateFromTemplate(DialogLastCreated(), c_triggerControlTypeButton, "TriggerDialogFrame/TriggerControlRightChallengeButton")
// L1132
DialogControlCreateFromTemplate(DialogLastCreated(), c_triggerControlTypeButton, "TriggerDialogFrame/TriggerControlLeftChallengeButton")
// L1666
DialogControlCreateFromTemplate(DialogLastCreated(), c_triggerControlTypeButton, "TriggerDialogFrame/TriggerControlRightChallengeButton")

# mods/heroes.stormmod

MapScript.galaxy

// L3240
DialogControlCreateFromTemplate(DialogLastCreated(), c_triggerControlTypePanel, "TopBar/TopBarPanelTemplate")
// L8680
DialogControlCreateFromTemplate(DialogLastCreated(), c_triggerControlTypePanel, "Tutorial01_GameUI/VTutorialXPFrame")
// L9484
DialogControlCreateFromTemplate(DialogLastCreated(), c_triggerControlTypePanel, "Tutorial01_GameUI/VTutorialXPFrame")
// L3240
DialogControlCreateFromTemplate(DialogLastCreated(), c_triggerControlTypePanel, "TopBar/TopBarPanelTemplate")
// L8680
DialogControlCreateFromTemplate(DialogLastCreated(), c_triggerControlTypePanel, "Tutorial01_GameUI/VTutorialXPFrame")
// L9484
DialogControlCreateFromTemplate(DialogLastCreated(), c_triggerControlTypePanel, "Tutorial01_GameUI/VTutorialXPFrame")

# mods/heroesbrawlmods/arenamodemods/arenamode.stormmod

LibAREN.galaxy

// L1407
DialogControlCreateFromTemplate(DialogLastCreated(), c_triggerControlTypePanel, lp_template)

# mods/heroesbrawlmods/arenamodemods/attackdefend.stormmod

LibAtDe.galaxy

// L794
DialogControlCreateFromTemplate(libAtDe_gv_mAtD_TeamInstructions[libAtDe_gv_attackDefend.lv_attackingTeam].lv_instructionDialog, c_triggerControlTypePanel, "BlackheartsRevenge_LoadingAttackers/ScreenMapLoading_BlackheartsBay")
// L810
DialogControlCreateFromTemplate(libAtDe_gv_mAtD_TeamInstructions[libAtDe_gv_attackDefend.lv_defendingTeam].lv_instructionDialog, c_triggerControlTypePanel, "BlackheartsRevenge_LoadingDefenders/ScreenMapLoading_BlackheartsBay")

# mods/heroesbrawlmods/brawlmapmods/coop/pvebrawlmod.stormmod

LibPVEB.galaxy

// L2407
DialogControlCreateFromTemplate(libPVEB_gv_pvEResurrectRevivingDialog[lv_targetPlayer].lv_panel, c_triggerControlTypeLabel, "Auriel/AurielResurrectionNotificationTemplate")
// L2488
DialogControlCreateFromTemplate(libPVEB_gv_pvEResurrectRevivingDialog[lv_targetPlayer].lv_panel, c_triggerControlTypeLabel, "Auriel/AurielResurrectionNotificationTemplate")

# mods/heroesbrawlmods/brawlmapmods/coop/pvebrawluimod.stormmod

LibPBUI.galaxy

// L229
DialogControlCreateFromTemplate(DialogLastCreated(), c_triggerControlTypePanel, "PVEBrawlCurateHeroSelection/CurateHeroSelectionPanelTemplate")

# mods/heroesbrawlmods/brawlmapmods/coop/pvemod.stormmod

LibPVEM.galaxy

// L1960
DialogControlCreateFromTemplate(libPVEM_gv_pvEResurrectRevivingDialog[lv_targetPlayer].lv_panel, c_triggerControlTypeLabel, "Auriel/AurielResurrectionNotificationTemplate")
// L2045
DialogControlCreateFromTemplate(libPVEM_gv_pvEResurrectRevivingDialog[lv_targetPlayer].lv_panel, c_triggerControlTypeLabel, "Auriel/AurielResurrectionNotificationTemplate")

# mods/heroesbrawlmods/brawlmapmods/coop/pvemod.stormmod

LibPVEU.galaxy

// L256
DialogControlCreateFromTemplate(DialogLastCreated(), c_triggerControlTypePanel, "PVECurateHeroSelection/CurateHeroSelectionPanelTemplate")

# mods/heroesbrawlmods/heroselectionmods/ingameheroselection.stormmod

LibIGHS.galaxy

// L834
DialogControlCreateFromTemplate(DialogLastCreated(), c_triggerControlTypePanel, "ArenaModePickHeroUI/ArenaPickHeroPanelTemplate")

# mods/heroesdata.stormmod

StartingExperienceLib.galaxy

// L216
DialogControlCreateFromTemplate(libStEx_gv_sE_HintMsgDialog, c_triggerControlTypePanel, "TutorialUI/TutorialTextBoxTemplate")
// L287
DialogControlCreateFromTemplate(libStEx_gv_sE_VOMsgDialog, c_triggerControlTypePanel, "TutorialUI/TutorialTextBoxTemplate")
// L2039
DialogControlCreateFromTemplate(DialogLastCreated(), c_triggerControlTypeButton, "StandardTemplates/StandardButtonSmallTemplate")
// L2043
DialogControlCreateFromTemplate(DialogLastCreated(), c_triggerControlTypeButton, "StandardTemplates/StandardButtonSmallTemplate")
// L2047
DialogControlCreateFromTemplate(DialogLastCreated(), c_triggerControlTypeButton, "StandardTemplates/StandardButtonSmallTemplate")

# mods/heroesdata.stormmod

SupportLib.galaxy

// L850
DialogControlCreateFromTemplate(libSprt_gv_qACheatsControlsPanel.lv_mainDialog, c_triggerControlTypeButton, "GameMenuDialog/GameMenuButtonTemplate/Button")
// L857
DialogControlCreateFromTemplate(libSprt_gv_qACheatsControlsPanel.lv_mainDialog, c_triggerControlTypeButton, "GameMenuDialog/GameMenuButtonTemplate/Button")
// L864
DialogControlCreateFromTemplate(libSprt_gv_qACheatsControlsPanel.lv_mainDialog, c_triggerControlTypeButton, "GameMenuDialog/GameMenuButtonTemplate/Button")
// L903
DialogControlCreateFromTemplate(libSprt_gv_qACheatsControlsPanel.lv_mainDialog, c_triggerControlTypeLabel, "InputOptionsPanel/InputLabelTemplate")
// L910
DialogControlCreateFromTemplate(libSprt_gv_qACheatsControlsPanel.lv_mainDialog, c_triggerControlTypeLabel, "InputOptionsPanel/InputLabelTemplate")
// L917
DialogControlCreateFromTemplate(libSprt_gv_qACheatsControlsPanel.lv_mainDialog, c_triggerControlTypeLabel, "InputOptionsPanel/InputLabelTemplate")
// L927
DialogControlCreateFromTemplate(libSprt_gv_qACheatsControlsPanel.lv_mainDialog, c_triggerControlTypeLabel, "InputOptionsPanel/InputLabelTemplate")
// L934
DialogControlCreateFromTemplate(libSprt_gv_qACheatsControlsPanel.lv_mainDialog, c_triggerControlTypeLabel, "InputOptionsPanel/InputLabelTemplate")
// L941
DialogControlCreateFromTemplate(libSprt_gv_qACheatsControlsPanel.lv_mainDialog, c_triggerControlTypeLabel, "InputOptionsPanel/InputLabelTemplate")
// L951
DialogControlCreateFromTemplate(libSprt_gv_qACheatsControlsPanel.lv_mainDialog, c_triggerControlTypeLabel, "InputOptionsPanel/InputLabelTemplate")

# mods/heromods/auriel.stormmod

LibHAUR.galaxy

// L1874
DialogControlCreateFromTemplate(libHAUR_gv_heroAurielResurrectRevivingDialog[lv_targetPlayer], c_triggerControlTypeLabel, "Auriel/AurielResurrectionNotificationTemplate")
// L1982
DialogControlCreateFromTemplate(libHAUR_gv_heroAurielResurrectRevivingDialog[lv_targetPlayer], c_triggerControlTypeLabel, "Auriel/AurielResurrectionNotificationTemplate")

# mods/missionpacks/campaigncommon.sc2mod

LibComC.galaxy

// L106
DialogControlCreateFromTemplate(lv_achievementDialog, c_triggerControlTypePanel, "LotV_Debug/AchievementFrameDebugTemplate")

# mods/missionpacks/novacampaign.sc2mod

LibNCST.galaxy

// L3707
DialogControlCreateFromTemplate(DialogLastCreated(), c_triggerControlTypePanel, "LotV_StorySet/UnitCalloutRightTemplate")
// L3710
DialogControlCreateFromTemplate(DialogLastCreated(), c_triggerControlTypePanel, "LotV_StorySet/UnitCalloutLeftTemplate")

# mods/missionpacks/novacampaign.sc2mod

LibNCUI.galaxy

// L902
DialogControlCreateFromTemplate(DialogLastCreated(), c_triggerControlTypePanel, "NovaMissionPreview/MissionPreviewPanel")
// L1632
DialogControlCreateFromTemplate(libNCUI_gv_nU_UpgradesDialog, c_triggerControlTypePanel, "NovaMissionUpgrades/MissionUpgradesPanel")