# Dialog Item Width
Grammar — Width of dialogItem for player
Flags —Native
|Function
Returns the width of a dialog item.
# Arguments
int
<control> — Dialog Itemint
— Player
Returns — int
native int DialogControlGetWidth(int control, int player);
# Related
Category: Dialog / Dialog Item Size And Position
- Move Dialog Item —
void
— DialogControlSetPosition - Attach Dialog Item To Dialog Item —
void
— DialogControlSetPositionRelative - Set Dialog Item Rotation —
void
— libNtve_gf_SetDialogItemRotation - Set Dialog Item to Use Aspect Uncorrection —
void
— libNtve_gf_SetDialogItemtoUseAspectUncorrection - Set Dialog Item Size to Parent —
void
— DialogControlSetFullDialog - Set Dialog Item Size —
void
— DialogControlSetSize - Dialog Item Width —
int
— DialogControlGetWidth - Dialog Item Height —
int
— DialogControlGetHeight - Dialog Item Offset X —
int
— DialogControlGetOffsetX - Dialog Item Offset Y —
int
— DialogControlGetOffsetY - Dialog Item Anchor —
int
<preset::Anchor> — DialogControlGetAnchor - Dialog Item Relative Anchor —
int
<preset::Anchor> — DialogControlGetRelativeAnchor - Relative Dialog Item —
int
<control> — DialogControlGetRelativeControl - Dialog Item Is Full Dialog —
bool
— DialogControlIsFullDialog
# Examples
campaigns/liberty.sc2campaign — base.sc2maps/maps/campaign/tarcade.sc2map/MapScript.galaxy:8072
}
lv_widthOld = DialogControlGetWidth(gv_bossHPBar, gv_p1_USER);
lv_widthNew = FixedToInt((IntToFixed(gv_bossHPBarInnerWidth) * ((UnitGetPropertyFixed(gv_boss, c_unitPropLife, c_unitPropCurrent) + UnitGetPropertyFixed(gv_boss, c_unitPropShields, c_unitPropCurrent)) / (UnitGetPropertyFixed(gv_boss, c_unitPropLifeMax, c_unitPropCurrent) + UnitGetPropertyFixed(gv_boss, c_unitPropShieldsMax, c_unitPropCurrent)))));
DialogControlSetSize(gv_bossHPBar, PlayerGroupAll(), lv_widthNew, DialogControlGetHeight(gv_bossHPBar, gv_p1_USER));
campaigns/liberty.sc2campaign — base.sc2maps/maps/campaign/tarcade.sc2map/MapScript.galaxy:8141
else {
}
lv_widthOld = DialogControlGetWidth(gv_unitHPBarDialogBar, gv_p1_USER);
lv_widthNew = FixedToInt((IntToFixed(gv_unitHPBarInnerWidth) * ((UnitGetPropertyFixed(gv_unitHPBarUnit, c_unitPropLife, c_unitPropCurrent) + UnitGetPropertyFixed(gv_unitHPBarUnit, c_unitPropShields, c_unitPropCurrent)) / (UnitGetPropertyFixed(gv_unitHPBarUnit, c_unitPropLifeMax, c_unitPropCurrent) + UnitGetPropertyFixed(gv_unitHPBarUnit, c_unitPropShieldsMax, c_unitPropCurrent)))));
DialogControlSetSize(gv_unitHPBarDialogBar, PlayerGroupAll(), lv_widthNew, DialogControlGetHeight(gv_unitHPBarDialogBar, gv_p1_USER));
campaigns/liberty.sc2campaign/base.sc2maps/maps/campaign/tarcade.sc2map — MapScript.galaxy:8072
}
lv_widthOld = DialogControlGetWidth(gv_bossHPBar, gv_p1_USER);
lv_widthNew = FixedToInt((IntToFixed(gv_bossHPBarInnerWidth) * ((UnitGetPropertyFixed(gv_boss, c_unitPropLife, c_unitPropCurrent) + UnitGetPropertyFixed(gv_boss, c_unitPropShields, c_unitPropCurrent)) / (UnitGetPropertyFixed(gv_boss, c_unitPropLifeMax, c_unitPropCurrent) + UnitGetPropertyFixed(gv_boss, c_unitPropShieldsMax, c_unitPropCurrent)))));
DialogControlSetSize(gv_bossHPBar, PlayerGroupAll(), lv_widthNew, DialogControlGetHeight(gv_bossHPBar, gv_p1_USER));
campaigns/liberty.sc2campaign/base.sc2maps/maps/campaign/tarcade.sc2map — MapScript.galaxy:8141
else {
}
lv_widthOld = DialogControlGetWidth(gv_unitHPBarDialogBar, gv_p1_USER);
lv_widthNew = FixedToInt((IntToFixed(gv_unitHPBarInnerWidth) * ((UnitGetPropertyFixed(gv_unitHPBarUnit, c_unitPropLife, c_unitPropCurrent) + UnitGetPropertyFixed(gv_unitHPBarUnit, c_unitPropShields, c_unitPropCurrent)) / (UnitGetPropertyFixed(gv_unitHPBarUnit, c_unitPropLifeMax, c_unitPropCurrent) + UnitGetPropertyFixed(gv_unitHPBarUnit, c_unitPropShieldsMax, c_unitPropCurrent)))));
DialogControlSetSize(gv_unitHPBarDialogBar, PlayerGroupAll(), lv_widthNew, DialogControlGetHeight(gv_unitHPBarDialogBar, gv_p1_USER));
campaigns/libertystory.sc2campaign — base.sc2data/TriggerLibs/CampaignLib.galaxy:1755
// Automatic Variable Declarations
// Implementation
return libCamp_gf_GD_IntegerToGrid(DialogControlGetWidth(lp_dialogItem, lp_player), libCamp_ge_GRIDDLG_HV_Horizontal, libCamp_ge_GRIDDLG_HV2_ClientSize);
}
campaigns/libertystory.sc2campaign — base.sc2data/TriggerLibs/CampaignLib.galaxy:5878
libNtve_gf_SetDialogItemImageType(DialogControlLastCreated(), c_triggerImageTypeBorder, PlayerGroupAll());
libNtve_gf_SetDialogItemImage(DialogControlLastCreated(), "Assets\\Textures\\ui_options_selectonbutton_anim_terran.dds", PlayerGroupAll());
DialogControlSetSize(DialogControlLastCreated(), PlayerGroupAll(), (DialogControlGetWidth(libCamp_gv_tS_RoomChangeButtons[lp_buttonId], 1) + 18), (DialogControlGetHeight(libCamp_gv_tS_RoomChangeButtons[lp_buttonId], 1) + 24));
DialogControlSetPositionRelative(DialogControlLastCreated(), PlayerGroupAll(), c_anchorCenter, libCamp_gv_tS_RoomChangeButtons[lp_buttonId], c_anchorCenter, 0, -1);
while (true) {
campaigns/swarmstory.sc2campaign — base.sc2data/TriggerLibs/SwarmCampaignLib.galaxy:9854
}
DialogControlSetSize(libSwaC_gv_zS_ArmyCustomArchivesPanel, PlayerGroupAll(), lv_sizeX, lv_sizeY);
DialogControlSetSize(libSwaC_gv_zS_ArmyCustomArchivesUpgradeBorder, PlayerGroupAll(), DialogControlGetWidth(libSwaC_gv_zS_ArmyCustomArchivesUpgradeBorder, 1), (lv_sizeY - 400));
DialogControlSetSize(libSwaC_gv_zS_ArmyCustomArchivesEvolutionBorder, PlayerGroupAll(), DialogControlGetWidth(libSwaC_gv_zS_ArmyCustomArchivesEvolutionBorder, 1), (lv_sizeY - 400));
Wait(0.125, c_timeGame);
campaigns/swarmstory.sc2campaign — base.sc2data/TriggerLibs/SwarmCampaignLib.galaxy:9855
DialogControlSetSize(libSwaC_gv_zS_ArmyCustomArchivesPanel, PlayerGroupAll(), lv_sizeX, lv_sizeY);
DialogControlSetSize(libSwaC_gv_zS_ArmyCustomArchivesUpgradeBorder, PlayerGroupAll(), DialogControlGetWidth(libSwaC_gv_zS_ArmyCustomArchivesUpgradeBorder, 1), (lv_sizeY - 400));
DialogControlSetSize(libSwaC_gv_zS_ArmyCustomArchivesEvolutionBorder, PlayerGroupAll(), DialogControlGetWidth(libSwaC_gv_zS_ArmyCustomArchivesEvolutionBorder, 1), (lv_sizeY - 400));
Wait(0.125, c_timeGame);
libSwaC_gv_zS_ArmyCustomArchivesUpdatingData = false;
campaigns/voidstory.sc2campaign — base.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.sc2campaign — base.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.sc2campaign — base.sc2data/TriggerLibs/VoidCampaignUILib.galaxy:5074
libNtve_gf_CreateDialogItemImage(DialogLastCreated(), 55, 55, c_anchorLeft, 26, 3, StringToText(""), lp_abilityIcon, c_triggerImageTypeNormal, false, Color(100,100,100), c_triggerBlendModeNormal);
libNtve_gf_CreateDialogItemImage(DialogLastCreated(), lv_startwidth, 47, c_anchorLeft, 79, 3, StringToText(""), "", c_triggerImageTypeNormal, false, ColorWithAlpha(0.00, 0.00, 62.75, 74.90), c_triggerBlendModeNormal);
while ((DialogControlGetWidth(DialogControlLastCreated(), 1) > 0)) {
Wait(0.0625, c_timeGame);
lv_updatewidth -= ((lv_startwidth/lp_duration)*0.0625);
mods/heroesbrawlmods/brawlmapmods/coop/deadmansstand.stormmod — base.stormdata/LibPEB1.galaxy:4510
libPEB1_gv_baseHealthShrinkCurrentMarker[lv_barIndex] += 1;
lv_localMarker = libPEB1_gv_baseHealthShrinkCurrentMarker[lv_barIndex];
lv_oldWidth = DialogControlGetWidth(lp_bar, 1);
lv_itDelta = ((lp_newWidth - lv_oldWidth) / 24.0);
lv_itIndex = 1;
mods/missionpacks/novacampaign.sc2mod — base.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.sc2mod — base.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));
}