# Create Dialog Item From Template
Grammar — Create a type for dialog dialog using the template template
Flags —Native
|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 ] — Dialogint
[ preset::ControlType ] — Typestring
[ layoutframe ] — Template
Returns — int
[ control ]
native int DialogControlCreateFromTemplate(
int dialog,
int type,
string inTemplate,
);
# Related
Category: Dialog / Dialog Items
- [F] —
int
[ control ] — Create Dialog Item — ( DialogControlCreate ) - [F] —
int
[ control ] — Create Dialog Item In Panel — ( DialogControlCreateInPanel ) - [F] —
int
[ control ] — Create Dialog Item From Template — ( DialogControlCreateFromTemplate ) - [F] —
int
[ control ] — Create Dialog Item In Panel From Template — ( DialogControlCreateInPanelFromTemplate ) - [F] —
int
[ control ] — Hookup Dialog Item — ( DialogControlHookup ) - [F] —
int
[ control ] — Hookup Standard Dialog Item — ( DialogControlHookupStandard ) - [F] —
int
[ control ] — Hookup Unit Status Dialog Item — ( DialogControlHookupUnitStatus ) - [F] —
void
— Show/Hide Dialog Item — ( DialogControlSetVisible ) - [F] —
void
— Enable/Disable Dialog Item — ( DialogControlSetEnabled ) - [F] —
void
— Set Dialog Item Text — ( libNtve_gf_SetDialogItemText ) - [F] —
void
— Set Dialog Item Observed Type — ( DialogControlSetObservedType ) - [F] —
int
[ control ] — Last Created Dialog Item — ( DialogControlLastCreated ) - [F] —
bool
— Dialog Item Is Visible — ( DialogControlIsVisible ) - [F] —
bool
— Dialog Item Is Enabled — ( DialogControlIsEnabled ) - [F] —
text
— Dialog Item Text — ( libNtve_gf_DialogItemText ) - [F] —
void
— Dialog Item Is Used — ( TriggerAddEventDialogControl ) - [F] —
int
[ control ] — Used Dialog Item — ( EventDialogControl ) - [F] —
int
[ preset::ControlEventType ] — Dialog Item Event Type — ( EventDialogControlEventType ) - [F] —
int
[ preset::MouseButton ] — Dialog Item Mouse Button — ( EventDialogControlMouseButton )
# Examples
# campaigns/liberty.sc2campaign
// 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
// L2033
DialogControlCreateFromTemplate(DialogLastCreated(), c_triggerControlTypePanel, "CampaignTrialDialog/CampaignTrialDialogTemplate")
# campaigns/swarm.sc2campaign
// 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
// 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
// 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
// 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
// L1615
DialogControlCreateFromTemplate(lv_achievementDialog, c_triggerControlTypePanel, "LotV_Debug/AchievementFrameDebugTemplate")
# campaigns/voidstory.sc2campaign
// L4363
DialogControlCreateFromTemplate(DialogLastCreated(), c_triggerControlTypePanel, "LotV_StorySet/UnitCalloutRightTemplate")
// L4366
DialogControlCreateFromTemplate(DialogLastCreated(), c_triggerControlTypePanel, "LotV_StorySet/UnitCalloutLeftTemplate")
# campaigns/voidstory.sc2campaign
// 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
// 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
// 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
// L1407
DialogControlCreateFromTemplate(DialogLastCreated(), c_triggerControlTypePanel, lp_template)
# mods/heroesbrawlmods/arenamodemods/attackdefend.stormmod
// 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
// 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
// L229
DialogControlCreateFromTemplate(DialogLastCreated(), c_triggerControlTypePanel, "PVEBrawlCurateHeroSelection/CurateHeroSelectionPanelTemplate")
# mods/heroesbrawlmods/brawlmapmods/coop/pvemod.stormmod
// 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
// L256
DialogControlCreateFromTemplate(DialogLastCreated(), c_triggerControlTypePanel, "PVECurateHeroSelection/CurateHeroSelectionPanelTemplate")
# mods/heroesbrawlmods/heroselectionmods/ingameheroselection.stormmod
// 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
// 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
// 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
// L106
DialogControlCreateFromTemplate(lv_achievementDialog, c_triggerControlTypePanel, "LotV_Debug/AchievementFrameDebugTemplate")
# mods/missionpacks/novacampaign.sc2mod
// L3707
DialogControlCreateFromTemplate(DialogLastCreated(), c_triggerControlTypePanel, "LotV_StorySet/UnitCalloutRightTemplate")
// L3710
DialogControlCreateFromTemplate(DialogLastCreated(), c_triggerControlTypePanel, "LotV_StorySet/UnitCalloutLeftTemplate")
# mods/missionpacks/novacampaign.sc2mod
// L902
DialogControlCreateFromTemplate(DialogLastCreated(), c_triggerControlTypePanel, "NovaMissionPreview/MissionPreviewPanel")
// L1632
DialogControlCreateFromTemplate(libNCUI_gv_nU_UpgradesDialog, c_triggerControlTypePanel, "NovaMissionUpgrades/MissionUpgradesPanel")