# Dialog Width

Grammardialog width
FlagsNative | Function

Returns the width of a dialog.

# Arguments

  • int<dialog> — Dialog

Returns — int

native int DialogGetWidth(int dialog);

Category: Dialog / Dialog Size And Position

# Examples

campaigns/libertystory.sc2campaignbase.sc2data/TriggerLibs/CampaignLib.galaxy:1731

    // Automatic Variable Declarations
    // Implementation
    return libCamp_gf_GD_IntegerToGrid(DialogGetWidth(lp_dialog), libCamp_ge_GRIDDLG_HV_Horizontal, libCamp_ge_GRIDDLG_HV2_ClientSize);
}

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

        DialogControlCreateFromTemplate(DialogLastCreated(), c_triggerControlTypePanel, "HotS_Callouts/UnitCalloutArmyFrameRightTemplate");
        DialogControlSetPosition(DialogControlLastCreated(), PlayerGroupAll(), c_anchorRight, 0, 0);
        DialogSetPositionRelativeToUnit(DialogLastCreated(), lp_attachUnit, UserDataGetImageAttachPoint("CalloutAttachment", lp_attachment, "Attachment", 1), (0 - DialogGetWidth(DialogLastCreated())), (0 - (DialogGetHeight(DialogLastCreated()) / 2)));
    }
    DialogSetVisible(DialogLastCreated(), PlayerGroupAll(), true);

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

    DialogCreate(1500, 1100, c_anchorCenter, 0, 0, true);
    libSwaC_gv_zS_DebugProgressDialog = DialogLastCreated();
    libNtve_gf_CreateDialogItemImage(DialogLastCreated(), (DialogGetWidth(DialogLastCreated()) - 60), (DialogGetHeight(DialogLastCreated()) - 60), c_anchorCenter, 0, 0, StringToText(""), "Assets\\Textures\\white32.dds", c_triggerImageTypeNormal, true, Color(100,100,100), c_triggerBlendModeNormal);
    libNtve_gf_SetDialogItemColor(DialogControlLastCreated(), Color(0,0,0), PlayerGroupAll());
    DialogControlFadeTransparency(DialogControlLastCreated(), PlayerGroupAll(), 0.0, 20.0);

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

    DialogCreate(1200, 1000, c_anchorCenter, 0, 0, true);
    libSwaC_gv_zS_DebugStoryTechDialog = DialogLastCreated();
    libNtve_gf_CreateDialogItemImage(DialogLastCreated(), (DialogGetWidth(DialogLastCreated()) - 60), (DialogGetHeight(DialogLastCreated()) - 60), c_anchorCenter, 0, 0, StringToText(""), "Assets\\Textures\\white32.dds", c_triggerImageTypeNormal, true, Color(100,100,100), c_triggerBlendModeNormal);
    lv_dlgBg = DialogControlLastCreated();
    libNtve_gf_SetDialogItemColor(DialogControlLastCreated(), Color(0,0,0), PlayerGroupAll());

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

    libSwaC_gv_zS_DebugStoryTechCancel = DialogControlLastCreated();
    DialogSetSize(DialogLastCreated(), 1150, (lv_y + 150));
    DialogControlSetSize(lv_dlgBg, PlayerGroupAll(), (DialogGetWidth(libSwaC_gv_zS_DebugStoryTechDialog) - 60), (DialogGetHeight(libSwaC_gv_zS_DebugStoryTechDialog) - 60));
}

campaigns/swarmstoryutil.sc2modbase.sc2data/Lib281DEC45.galaxy:5042

                    DialogControlCreateFromTemplate(DialogLastCreated(), c_triggerControlTypePanel, "HotS_Callouts/UnitCalloutStoryFrameRightTemplate");
                    DialogControlSetPosition(DialogControlLastCreated(), PlayerGroupAll(), c_anchorRight, 0, 0);
                    DialogSetPositionRelativeToUnit(DialogLastCreated(), lv_indexUnit, UserDataGetImageAttachPoint("CalloutAttachment", lib281DEC45_gf_ZSS_CharacterCalloutData(lp_character), "Attachment", 1), (0 - DialogGetWidth(DialogLastCreated())), (0 - (DialogGetHeight(DialogLastCreated()) / 2)));
                }
                else {

campaigns/voidstory.sc2campaignbase.sc2data/TriggerLibs/VoidCampaignLib.galaxy:140

    DialogCreate(1200, 1000, c_anchorCenter, 0, 0, true);
    libVoiC_gv_pC_DebugCampaignTechDialog = DialogLastCreated();
    libNtve_gf_CreateDialogItemImage(DialogLastCreated(), (DialogGetWidth(DialogLastCreated()) - 60), (DialogGetHeight(DialogLastCreated()) - 60), c_anchorCenter, 0, 0, StringToText(""), "Assets\\Textures\\white32.dds", c_triggerImageTypeNormal, true, Color(100,100,100), c_triggerBlendModeNormal);
    lv_dlgBg = DialogControlLastCreated();
    libNtve_gf_SetDialogItemColor(DialogControlLastCreated(), Color(0,0,0), PlayerGroupAll());

campaigns/voidstory.sc2campaignbase.sc2data/TriggerLibs/VoidCampaignLib.galaxy:217

    libVoiC_gv_pC_DebugCampaignTechSwitchToSoa = DialogControlLastCreated();
    DialogSetSize(DialogLastCreated(), 1150, (lv_y + 150));
    DialogControlSetSize(lv_dlgBg, PlayerGroupAll(), (DialogGetWidth(libVoiC_gv_pC_DebugCampaignTechDialog) - 60), (DialogGetHeight(libVoiC_gv_pC_DebugCampaignTechDialog) - 60));
}

campaigns/voidstory.sc2campaignbase.sc2data/TriggerLibs/VoidCampaignMissionLib.galaxy:6438

        }

        if ((libVCMI_gv_pM_MissionCheat_Panel[lv_panelIndex] != c_invalidDialogControlId) && (DialogGetWidth(libVCMI_gv_pM_MissionCheat_Dialog) < DialogControlGetWidth(libVCMI_gv_pM_MissionCheat_Panel[lv_panelIndex], 1))) {
            DialogSetSize(libVCMI_gv_pM_MissionCheat_Dialog, (DialogControlGetWidth(libVCMI_gv_pM_MissionCheat_Panel[lv_panelIndex], 1) + 0), DialogGetHeight(libVCMI_gv_pM_MissionCheat_Dialog));
        }

campaigns/voidstory.sc2campaignbase.sc2data/TriggerLibs/VoidCampaignMissionLib.galaxy:6447


    }
    DialogSetSize(libVCMI_gv_pM_MissionCheat_Dialog, DialogGetWidth(libVCMI_gv_pM_MissionCheat_Dialog), (lv_cheatUIHeight + 75));
    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"), "");
    libNtve_gf_SetDialogItemStyle(DialogControlLastCreated(), lv_closeButtonTextStyle, PlayerGroupAll());

campaigns/voidstory.sc2campaignbase.sc2data/TriggerLibs/VoidCampaignStoryLib.galaxy:4380

    if ((libVCST_gv_pS_Clickable[libVCST_gf_PS_ClickableIndex(lp_clickableInstance)].lv_callout != c_invalidDialogControlId)) {
        if ((libVCST_gf_PS_ClickableCalloutAnchorToRight(lp_clickableInstance) == true)) {
            DialogSetPositionRelativeToUnit(libVCST_gv_pS_Clickable[libVCST_gf_PS_ClickableIndex(lp_clickableInstance)].lv_calloutDialog, libVCST_gf_ClickableUnit(lp_clickableInstance), lv_attachmentPoint, (0 - DialogGetWidth(libVCST_gv_pS_Clickable[libVCST_gf_PS_ClickableIndex(lp_clickableInstance)].lv_calloutDialog)), (0 - (DialogGetHeight(libVCST_gv_pS_Clickable[libVCST_gf_PS_ClickableIndex(lp_clickableInstance)].lv_calloutDialog) / 2)));
        }
        else {

mods/missionpacks/novacampaign.sc2modbase.sc2data/LibNCMI.galaxy:5378

        }

        if ((libNCMI_gv_NM_MissionCheat_Panel[lv_panelIndex] != c_invalidDialogControlId) && (DialogGetWidth(libNCMI_gv_NM_MissionCheat_Dialog) < DialogControlGetWidth(libNCMI_gv_NM_MissionCheat_Panel[lv_panelIndex], 1))) {
            DialogSetSize(libNCMI_gv_NM_MissionCheat_Dialog, (DialogControlGetWidth(libNCMI_gv_NM_MissionCheat_Panel[lv_panelIndex], 1) + 0), DialogGetHeight(libNCMI_gv_NM_MissionCheat_Dialog));
        }

mods/missionpacks/novacampaign.sc2modbase.sc2data/LibNCMI.galaxy:5387


    }
    DialogSetSize(libNCMI_gv_NM_MissionCheat_Dialog, DialogGetWidth(libNCMI_gv_NM_MissionCheat_Dialog), (lv_cheatUIHeight + 75));
    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"), "");
    libNtve_gf_SetDialogItemStyle(DialogControlLastCreated(), lv_closeButtonTextStyle, PlayerGroupAll());

mods/missionpacks/novacampaign.sc2modbase.sc2data/LibNCST.galaxy:3724

    if ((libNCST_gv_nS_Clickable[libNCST_gf_NS_ClickableIndex(lp_clickableInstance)].lv_callout != c_invalidDialogControlId)) {
        if ((libNCST_gf_NS_ClickableCalloutAnchorToRight(lp_clickableInstance) == true)) {
            DialogSetPositionRelativeToUnit(libNCST_gv_nS_Clickable[libNCST_gf_NS_ClickableIndex(lp_clickableInstance)].lv_calloutDialog, libNCST_gf_ClickableUnit(lp_clickableInstance), lv_attachmentPoint, (0 - DialogGetWidth(libNCST_gv_nS_Clickable[libNCST_gf_NS_ClickableIndex(lp_clickableInstance)].lv_calloutDialog)), (0 - (DialogGetHeight(libNCST_gv_nS_Clickable[libNCST_gf_NS_ClickableIndex(lp_clickableInstance)].lv_calloutDialog) / 2)));
        }
        else {

mods/missionpacks/novacampaign.sc2modbase.sc2data/LibNovC.galaxy:245

    DialogCreate(1600, 1000, c_anchorCenter, 0, 0, true);
    libNovC_gv_nC_DebugCampaignTechUpgradesDialog = DialogLastCreated();
    libNtve_gf_CreateDialogItemImage(DialogLastCreated(), (DialogGetWidth(DialogLastCreated()) - 60), (DialogGetHeight(DialogLastCreated()) - 60), c_anchorCenter, 0, 0, StringToText(""), "Assets\\Textures\\white32.dds", c_triggerImageTypeNormal, true, Color(100,100,100), c_triggerBlendModeNormal);
    lv_dialogBackground = DialogControlLastCreated();
    libNtve_gf_SetDialogItemColor(DialogControlLastCreated(), Color(0,0,0), PlayerGroupAll());

mods/missionpacks/novacampaign.sc2modbase.sc2data/LibNovC.galaxy:307

    libNovC_gv_nC_DebugCampaignTechUpgradesCancel = DialogControlLastCreated();
    DialogSetSize(libNovC_gv_nC_DebugCampaignTechUpgradesDialog, 1350, (lv_y + 250));
    DialogControlSetSize(lv_dialogBackground, PlayerGroupAll(), (DialogGetWidth(libNovC_gv_nC_DebugCampaignTechUpgradesDialog) - 60), (DialogGetHeight(libNovC_gv_nC_DebugCampaignTechUpgradesDialog) - 60));
    DialogSetVisible(libNovC_gv_nC_DebugCampaignTechUpgradesDialog, PlayerGroupAll(), true);
    while (!((libNovC_gv_nC_DebugCampaignTechUpgradesDialog == c_invalidDialogId))) {

mods/missionpacks/novacampaign.sc2modbase.sc2data/LibNovC.galaxy:504

    DialogCreate(1200, 1000, c_anchorCenter, 0, 0, true);
    libNovC_gv_NC_DebugCampaignTechDialog = DialogLastCreated();
    libNtve_gf_CreateDialogItemImage(DialogLastCreated(), (DialogGetWidth(DialogLastCreated()) - 60), (DialogGetHeight(DialogLastCreated()) - 60), c_anchorCenter, 0, 0, StringToText(""), "Assets\\Textures\\white32.dds", c_triggerImageTypeNormal, true, Color(100,100,100), c_triggerBlendModeNormal);
    lv_dialogBackground = DialogControlLastCreated();
    libNtve_gf_SetDialogItemColor(DialogControlLastCreated(), Color(0,0,0), PlayerGroupAll());

mods/missionpacks/novacampaign.sc2modbase.sc2data/LibNovC.galaxy:556

    libNovC_gv_NC_DebugCampaignTechRandomizeTechButton = DialogControlLastCreated();
    DialogSetSize(DialogLastCreated(), 1250, (lv_y + 150));
    DialogControlSetSize(lv_dialogBackground, PlayerGroupAll(), (DialogGetWidth(libNovC_gv_NC_DebugCampaignTechDialog) - 60), (DialogGetHeight(libNovC_gv_NC_DebugCampaignTechDialog) - 60));
}