# Set Dialog Size

Grammar — Set size of dialog to (width, height)
FlagsNative | Action

Sets the width and height of a dialog.

# Arguments

  • int<dialog> — Dialog
  • int — Width
  • int — Height

Returns — void

native void DialogSetSize(
	int dialog,
	int width,
	int height,
);

Category: Dialog / Dialog Size And Position

# Examples

campaigns/liberty.sc2campaignbase.sc2maps/maps/campaign/tstory01.sc2map/MapScript.galaxy:4781

    gv_roomCheatSizeY = (gv_roomCheatSizeY + 35);
    DialogSetPosition(gv_roomCheatDialog, c_anchorCenter, (0 - (gv_roomCheatSizeX / 2)), (0 - (gv_roomCheatSizeY / 2)));
    DialogSetSize(gv_roomCheatDialog, gv_roomCheatSizeX, gv_roomCheatSizeY);
}

campaigns/liberty.sc2campaignbase.sc2maps/maps/campaign/tstory01.sc2map/MapScript.galaxy:4857

    gv_roomCameraSizeY = (gv_roomCameraSizeY + 35);
    DialogSetPosition(gv_roomCameraDialog, c_anchorCenter, (0 - (gv_roomCameraSizeX / 2)), (0 - (gv_roomCameraSizeY / 2)));
    DialogSetSize(gv_roomCameraDialog, gv_roomCameraSizeX, gv_roomCameraSizeY);
}

campaigns/liberty.sc2campaignbase.sc2maps/maps/campaign/tstory01.sc2map/MapScript.galaxy:10000

    lv_gradientWidth = FixedToInt((1600.0 * lv_gradientWidthPercent));
    lv_gradientDirection = ConversationDataStateFixedValue(lp_convoID, "Gradient Direction");
    DialogSetSize(gv_armoryGradientDialog, lv_gradientWidth, 1200);
    DialogControlSetSize(gv_armoryGradientDialogImage, PlayerGroupAll(), lv_gradientWidth, 1200);
    DialogSetVisible(gv_armoryGradientDialog, PlayerGroupAll(), true);

campaigns/liberty.sc2campaignbase.sc2maps/maps/campaign/tstory01.sc2map/MapScript.galaxy:19482

    }

    DialogSetSize(gv_debugDialogForSizePos, StringToInt(StringWord(EventChatMessage(false), 2)), StringToInt(StringWord(EventChatMessage(false), 3)));
    return true;
}

campaigns/liberty.sc2campaign/base.sc2maps/maps/campaign/tstory01.sc2mapMapScript.galaxy:4781

    gv_roomCheatSizeY = (gv_roomCheatSizeY + 35);
    DialogSetPosition(gv_roomCheatDialog, c_anchorCenter, (0 - (gv_roomCheatSizeX / 2)), (0 - (gv_roomCheatSizeY / 2)));
    DialogSetSize(gv_roomCheatDialog, gv_roomCheatSizeX, gv_roomCheatSizeY);
}

campaigns/liberty.sc2campaign/base.sc2maps/maps/campaign/tstory01.sc2mapMapScript.galaxy:4857

    gv_roomCameraSizeY = (gv_roomCameraSizeY + 35);
    DialogSetPosition(gv_roomCameraDialog, c_anchorCenter, (0 - (gv_roomCameraSizeX / 2)), (0 - (gv_roomCameraSizeY / 2)));
    DialogSetSize(gv_roomCameraDialog, gv_roomCameraSizeX, gv_roomCameraSizeY);
}

campaigns/liberty.sc2campaign/base.sc2maps/maps/campaign/tstory01.sc2mapMapScript.galaxy:10000

    lv_gradientWidth = FixedToInt((1600.0 * lv_gradientWidthPercent));
    lv_gradientDirection = ConversationDataStateFixedValue(lp_convoID, "Gradient Direction");
    DialogSetSize(gv_armoryGradientDialog, lv_gradientWidth, 1200);
    DialogControlSetSize(gv_armoryGradientDialogImage, PlayerGroupAll(), lv_gradientWidth, 1200);
    DialogSetVisible(gv_armoryGradientDialog, PlayerGroupAll(), true);

campaigns/liberty.sc2campaign/base.sc2maps/maps/campaign/tstory01.sc2mapMapScript.galaxy:19482

    }

    DialogSetSize(gv_debugDialogForSizePos, StringToInt(StringWord(EventChatMessage(false), 2)), StringToInt(StringWord(EventChatMessage(false), 3)));
    return true;
}

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

    lv_h = libCamp_gf_GD_GridToReal(lp_height, libCamp_ge_GRIDDLG_HV_Vertical, libCamp_ge_GRIDDLG_HV2_ClientSize);
    lv_h += (2.0 * libCamp_gv_gRIDDLG_MARGINE_Y);
    DialogSetSize(lp_dialog, FixedToInt(lv_w), FixedToInt(lv_h));
}

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

        }
        lv_sizeX += 36;
        DialogSetSize(libCamp_gv_tS_RoomChangeDialog, lv_sizeX, lv_sizeY);
        DialogControlSetSize(libCamp_gv_tS_RoomChangeDialogBorder, PlayerGroupAll(), lv_sizeX, lv_sizeY);
        DialogSetPosition(libCamp_gv_tS_RoomChangeDialog, c_anchorBottom, 0, 0);

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

    libNtve_gf_CreateDialogItemButton(DialogLastCreated(), 150, 50, c_anchorBottomRight, 50, 50, StringToText(""), StringExternal("Param/Value/lib_SwaC_C65D7C52"), "");
    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/void.sc2campaignbase.sc2maps/maps/campaign/void/pmoebius01.sc2map/MapScript.galaxy:2002

    }

    DialogSetSize(gv_movingPlatform.lv_dialog, 480, 120);
    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");
    gv_iDDQDButton = DialogControlLastCreated();

campaigns/void.sc2campaign/base.sc2maps/maps/campaign/void/pmoebius01.sc2mapMapScript.galaxy:2002

    }

    DialogSetSize(gv_movingPlatform.lv_dialog, 480, 120);
    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");
    gv_iDDQDButton = DialogControlLastCreated();

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

    libNtve_gf_CreateDialogItemButton(DialogLastCreated(), 300, 50, c_anchorTopRight, 50, 50, StringToText(""), StringExternal("Param/Value/lib_VoiC_39E8A069"), "");
    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:6186

    if ((DialogGetHeight(libVCMI_gv_pM_GameCheat_Dialog) < ((libVCMI_gv_pM_GameCheat_ArrayIndex * 50) + 150))) {
        libVCMI_gv_pM_GameCheat_DialogHeight = ((libVCMI_gv_pM_GameCheat_ArrayIndex * 50) + 150);
        DialogSetSize(libVCMI_gv_pM_GameCheat_Dialog, libVCMI_gv_pM_GameCheat_DialogWidth, libVCMI_gv_pM_GameCheat_DialogHeight);
    }

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

    if ((libVCMI_gv_pM_GameCheat_Minimize == EventDialogControl())) {
        if ((libVCMI_gv_pM_GameCheat_Minimized == false)) {
            DialogSetSize(libVCMI_gv_pM_GameCheat_Dialog, 50, 50);
            libNtve_gf_SetDialogItemText(libVCMI_gv_pM_GameCheat_Minimize, StringExternal("Param/Value/lib_VCMI_507ED1DB"), PlayerGroupAll());
            libNtve_gf_SetDialogItemTooltip(libVCMI_gv_pM_GameCheat_Minimize, StringExternal("Param/Value/lib_VCMI_4966D256"), PlayerGroupAll());

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

        }
        else {
            DialogSetSize(libVCMI_gv_pM_GameCheat_Dialog, libVCMI_gv_pM_GameCheat_DialogWidth, libVCMI_gv_pM_GameCheat_DialogHeight);
            libNtve_gf_SetDialogItemText(libVCMI_gv_pM_GameCheat_Minimize, StringExternal("Param/Value/lib_VCMI_B98D5E73"), PlayerGroupAll());
            libNtve_gf_SetDialogItemTooltip(libVCMI_gv_pM_GameCheat_Minimize, StringExternal("Param/Value/lib_VCMI_90FAD008"), PlayerGroupAll());

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


        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());

mods/challenges.sc2modbase.sc2data/LibChal.galaxy:662

    DialogControlSetSize(libChal_gv_cHL_VictoryPanelGradient, PlayerGroupAll(), (libChal_gv_cHLC_VICTORYPANEL_WIDTH - 70), (lv_height - 105));
    DialogControlSetSize(libChal_gv_cHL_VictoryPanelInnerLine, PlayerGroupAll(), (libChal_gv_cHLC_VICTORYPANEL_WIDTH - 74), (lv_height - 110));
    DialogSetSize(libChal_gv_cHL_VictoryPanelDlg, libChal_gv_cHLC_VICTORYPANEL_WIDTH, lv_height);
    DialogControlSetSize(libChal_gv_cHL_VictoryPanelBorder, PlayerGroupAll(), (libChal_gv_cHLC_VICTORYPANEL_WIDTH - 0), (lv_height - 0));
    if ((libChal_gv_cHL_VictoryPanelRetry == null)) {

mods/challenges.sc2modbase.sc2data/LibChal.galaxy:1226

    DialogControlSetSize(libChal_gv_cHL_DefeatPanelGradient, PlayerGroupAll(), (libChal_gv_cHLC_DEFEATPANEL_WIDTH - 70), (lv_height - 105));
    DialogControlSetSize(libChal_gv_cHL_DefeatPanelInnerLine, PlayerGroupAll(), (libChal_gv_cHLC_DEFEATPANEL_WIDTH - 74), (lv_height - 110));
    DialogSetSize(libChal_gv_cHL_DefeatPanelDlg, libChal_gv_cHLC_DEFEATPANEL_WIDTH, lv_height);
    DialogControlSetSize(libChal_gv_cHL_DefeatPanelBorder, PlayerGroupAll(), (libChal_gv_cHLC_DEFEATPANEL_WIDTH - 0), (lv_height - 0));
    if ((libChal_gv_cHL_DefeatPanelRetry == null)) {

mods/challenges.sc2modbase.sc2data/LibChal.galaxy:1729

    DialogControlSetSize(libChal_gv_cHL_WSPanelInnerLine, PlayerGroupAll(), (libChal_gv_cHLC_WSPANEL_WIDTH - 74), (lv_height - 110));
    DialogControlSetSize(libChal_gv_cHL_WSPanelBorder, PlayerGroupAll(), (libChal_gv_cHLC_WSPANEL_WIDTH - 0), (lv_height - 0));
    DialogSetSize(libChal_gv_cHL_WSPanelDlg, libChal_gv_cHLC_WSPANEL_WIDTH, lv_height);
}

mods/core.sc2modbase.sc2data/TriggerLibs/NativeLib.galaxy:3134

    }

    DialogSetSize(libNtve_gv_screenButtonDialogs[lp_screenButtonID], lp_width, lp_height);
    DialogSetPosition(libNtve_gv_screenButtonDialogs[lp_screenButtonID], lp_anchor, lp_offsetX, lp_offsetY);
    if ((libNtve_gv_screenButtons[lp_screenButtonID] == c_invalidDialogControlId)) {

mods/core.sc2modbase.sc2data/TriggerLibs/NativeLib.galaxy:3242


    DialogSetImageVisible(libNtve_gv_screenImageDialogs[lp_screenImageID], false);
    DialogSetSize(libNtve_gv_screenImageDialogs[lp_screenImageID], lp_width, lp_height);
    DialogSetPosition(libNtve_gv_screenImageDialogs[lp_screenImageID], lp_anchor, lp_offsetX, lp_offsetY);
    DialogSetTransparency(libNtve_gv_screenImageDialogs[lp_screenImageID], 0.0);

mods/core.sc2modbase.sc2data/TriggerLibs/NativeLib.galaxy:3316


    DialogSetImageVisible(libNtve_gv_screenLabelDialogs[lp_screenLabelID], false);
    DialogSetSize(libNtve_gv_screenLabelDialogs[lp_screenLabelID], lp_width, lp_height);
    DialogSetPosition(libNtve_gv_screenLabelDialogs[lp_screenLabelID], lp_anchor, lp_offsetX, lp_offsetY);
    if ((libNtve_gv_screenLabelDialogLabels[lp_screenLabelID] == c_invalidDialogControlId)) {

mods/core.stormmodbase.stormdata/TriggerLibs/NativeLib.galaxy:2612

    }

    DialogSetSize(libNtve_gv_screenButtonDialogs[lp_screenButtonID], lp_width, lp_height);
    DialogSetPosition(libNtve_gv_screenButtonDialogs[lp_screenButtonID], lp_anchor, lp_offsetX, lp_offsetY);
    if ((libNtve_gv_screenButtons[lp_screenButtonID] == c_invalidDialogControlId)) {

mods/core.stormmodbase.stormdata/TriggerLibs/NativeLib.galaxy:2720


    DialogSetImageVisible(libNtve_gv_screenImageDialogs[lp_screenImageID], false);
    DialogSetSize(libNtve_gv_screenImageDialogs[lp_screenImageID], lp_width, lp_height);
    DialogSetPosition(libNtve_gv_screenImageDialogs[lp_screenImageID], lp_anchor, lp_offsetX, lp_offsetY);
    DialogSetTransparency(libNtve_gv_screenImageDialogs[lp_screenImageID], 0.0);

mods/core.stormmodbase.stormdata/TriggerLibs/NativeLib.galaxy:2794


    DialogSetImageVisible(libNtve_gv_screenLabelDialogs[lp_screenLabelID], false);
    DialogSetSize(libNtve_gv_screenLabelDialogs[lp_screenLabelID], lp_width, lp_height);
    DialogSetPosition(libNtve_gv_screenLabelDialogs[lp_screenLabelID], lp_anchor, lp_offsetX, lp_offsetY);
    if ((libNtve_gv_screenLabelDialogLabels[lp_screenLabelID] == c_invalidDialogControlId)) {

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

    if ((DialogGetHeight(libNCMI_gv_NM_GameCheat_Dialog) < ((libNCMI_gv_NM_GameCheat_ArrayIndex * 50) + 150))) {
        libNCMI_gv_NM_GameCheat_DialogHeight = ((libNCMI_gv_NM_GameCheat_ArrayIndex * 50) + 150);
        DialogSetSize(libNCMI_gv_NM_GameCheat_Dialog, libNCMI_gv_NM_GameCheat_DialogWidth, libNCMI_gv_NM_GameCheat_DialogHeight);
    }

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

    if ((libNCMI_gv_NM_GameCheat_Minimize == EventDialogControl())) {
        if ((libNCMI_gv_NM_GameCheat_Minimized == false)) {
            DialogSetSize(libNCMI_gv_NM_GameCheat_Dialog, 50, 50);
            libNtve_gf_SetDialogItemText(libNCMI_gv_NM_GameCheat_Minimize, StringExternal("Param/Value/lib_NCMI_507ED1DB"), PlayerGroupAll());
            libNtve_gf_SetDialogItemTooltip(libNCMI_gv_NM_GameCheat_Minimize, StringExternal("Param/Value/lib_NCMI_4966D256"), PlayerGroupAll());

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

        }
        else {
            DialogSetSize(libNCMI_gv_NM_GameCheat_Dialog, libNCMI_gv_NM_GameCheat_DialogWidth, libNCMI_gv_NM_GameCheat_DialogHeight);
            libNtve_gf_SetDialogItemText(libNCMI_gv_NM_GameCheat_Minimize, StringExternal("Param/Value/lib_NCMI_B98D5E73"), PlayerGroupAll());
            libNtve_gf_SetDialogItemTooltip(libNCMI_gv_NM_GameCheat_Minimize, StringExternal("Param/Value/lib_NCMI_90FAD008"), PlayerGroupAll());

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


        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/LibNovC.galaxy:306

    libNtve_gf_CreateDialogItemButton(DialogLastCreated(), 150, 50, c_anchorBottomRight, 50, 50, StringToText(""), StringExternal("Param/Value/lib_NovC_9701AE87"), "");
    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);

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

    libNtve_gf_CreateDialogItemButton(DialogLastCreated(), 300, 50, c_anchorBottomLeft, 50, 50, StringExternal("Param/Value/lib_NovC_C4E15843"), StringExternal("Param/Value/lib_NovC_F5A62B9A"), "");
    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));
}