# Dialog Item Height

Grammar — Height of dialogItem for player
FlagsNative | Function

Returns the height of a dialog item.

# Arguments

  • int<control> — Dialog Item
  • int — Player

Returns — int

native int DialogControlGetHeight(int control, int player);

Category: Dialog / Dialog Item Size And Position

# Examples

campaigns/liberty.sc2campaignbase.sc2maps/maps/campaign/tarcade.sc2map/MapScript.galaxy:8074

    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));
    return true;
}

campaigns/liberty.sc2campaignbase.sc2maps/maps/campaign/tarcade.sc2map/MapScript.galaxy:8143

    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));
    TimerStart(gv_unitHPBarFadeTimer, 5.0, false, c_timeGame);
    return true;

campaigns/liberty.sc2campaign/base.sc2maps/maps/campaign/tarcade.sc2mapMapScript.galaxy:8074

    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));
    return true;
}

campaigns/liberty.sc2campaign/base.sc2maps/maps/campaign/tarcade.sc2mapMapScript.galaxy:8143

    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));
    TimerStart(gv_unitHPBarFadeTimer, 5.0, false, c_timeGame);
    return true;

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

    // Automatic Variable Declarations
    // Implementation
    return libCamp_gf_GD_IntegerToGrid(DialogControlGetHeight(lp_dialogItem, lp_player), libCamp_ge_GRIDDLG_HV_Vertical, libCamp_ge_GRIDDLG_HV2_ClientSize);
}

campaigns/libertystory.sc2campaignbase.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.sc2campaignbase.sc2data/TriggerLibs/SwarmCampaignLib.galaxy:14611

    lv_button2 = DialogControlLastCreated();
    libNtve_gf_SaveDataTableValueDialogItem(true, libSwaC_gf_ZS_DebugProgressDataTableID("PlayButton", (lp_mission)), DialogControlLastCreated());
    DialogControlSetSize(DialogControlLastCreated(), PlayerGroupAll(), 35, DialogControlGetHeight(lv_button, 1));
    DialogControlSetPositionRelative(DialogControlLastCreated(), PlayerGroupAll(), c_anchorRight, lv_button, c_anchorLeft, 0, 0);
    TextExpressionSetToken("Param/Expression/lib_SwaC_E70F05CA", "A", libSwaC_gf_StoryMapName(lp_mission));

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

        lv_damageBarWidth = FixedToInt((((UnitGetPropertyFixed(libSwaC_gv_zS_SwarmHeroUIUnit[lv_index], c_unitPropEnergy, c_unitPropCurrent) - EventUnitPropertyChangeFixed()) / UnitGetPropertyFixed(libSwaC_gv_zS_SwarmHeroUIUnit[lv_index], c_unitPropEnergyMax, c_unitPropCurrent)) * 224.0));
        lv_damageBarWidth = MaxI(1, lv_damageBarWidth);
        lv_damageBarHeight = DialogControlGetHeight(libSwaC_gv_zS_SwarmHeroUIDialogEnergyBarImage[lv_index], 1);
    }
    else if (auto9FAC268D_val == c_unitPropLife) {

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

        lv_damageBarWidth = FixedToInt((((UnitGetPropertyFixed(libSwaC_gv_zS_SwarmHeroUIUnit[lv_index], c_unitPropLife, c_unitPropCurrent) - EventUnitPropertyChangeFixed()) / UnitGetPropertyFixed(libSwaC_gv_zS_SwarmHeroUIUnit[lv_index], c_unitPropLifeMax, c_unitPropCurrent)) * 224.0));
        lv_damageBarWidth = MaxI(1, lv_damageBarWidth);
        lv_damageBarHeight = DialogControlGetHeight(libSwaC_gv_zS_SwarmHeroUIDialogHealthBarImage[lv_index], 1);
    }
    else {

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


        if ((libVCMI_gv_pM_MissionCheat_Panel[lv_panelIndex] != c_invalidDialogControlId)) {
            lv_cheatUIHeight += DialogControlGetHeight(libVCMI_gv_pM_MissionCheat_Panel[lv_panelIndex], 1);
        }

campaigns/voidstory.sc2campaignbase.sc2data/TriggerLibs/VoidCampaignUILib.galaxy:9688

        DialogControlSetPositionRelative(DialogControlLastCreated(), PlayerGroupAll(), c_anchorLeft, libVCUI_gv_pU_VoidHeroUIDialogEnergyBarImage[lv_index], c_anchorLeft, 0, 0);
        lv_damageBarWidth = FixedToInt((((UnitGetPropertyFixed(libVCUI_gv_pU_VoidHeroUIUnit[lv_index], c_unitPropEnergy, c_unitPropCurrent) - EventUnitPropertyChangeFixed()) / UnitGetPropertyFixed(libVCUI_gv_pU_VoidHeroUIUnit[lv_index], c_unitPropEnergyMax, c_unitPropCurrent)) * IntToFixed(libVCUI_gv_pUC_HEROUIBARWIDTH)));
        lv_damageBarHeight = DialogControlGetHeight(libVCUI_gv_pU_VoidHeroUIDialogEnergyBarImage[lv_index], 1);
    }
    else if (autoB2BDD4C2_val == c_unitPropLife) {

campaigns/voidstory.sc2campaignbase.sc2data/TriggerLibs/VoidCampaignUILib.galaxy:9694

        DialogControlSetPositionRelative(DialogControlLastCreated(), PlayerGroupAll(), c_anchorLeft, libVCUI_gv_pU_VoidHeroUIDialogHealthBarImage[lv_index], c_anchorLeft, 0, 0);
        lv_damageBarWidth = FixedToInt((((UnitGetPropertyFixed(libVCUI_gv_pU_VoidHeroUIUnit[lv_index], c_unitPropLife, c_unitPropCurrent) - EventUnitPropertyChangeFixed()) / UnitGetPropertyFixed(libVCUI_gv_pU_VoidHeroUIUnit[lv_index], c_unitPropLifeMax, c_unitPropCurrent)) * IntToFixed(libVCUI_gv_pUC_HEROUIBARWIDTH)));
        lv_damageBarHeight = DialogControlGetHeight(libVCUI_gv_pU_VoidHeroUIDialogHealthBarImage[lv_index], 1);
    }
    else if (autoB2BDD4C2_val == c_unitPropShields) {

campaigns/voidstory.sc2campaignbase.sc2data/TriggerLibs/VoidCampaignUILib.galaxy:9700

        DialogControlSetPositionRelative(DialogControlLastCreated(), PlayerGroupAll(), c_anchorLeft, libVCUI_gv_pU_VoidHeroUIDialogShieldBarImage[lv_index], c_anchorLeft, 0, 0);
        lv_damageBarWidth = FixedToInt((((UnitGetPropertyFixed(libVCUI_gv_pU_VoidHeroUIUnit[lv_index], c_unitPropShields, c_unitPropCurrent) - EventUnitPropertyChangeFixed()) / UnitGetPropertyFixed(libVCUI_gv_pU_VoidHeroUIUnit[lv_index], c_unitPropShieldsMax, c_unitPropCurrent)) * IntToFixed(libVCUI_gv_pUC_HEROUIBARWIDTH)));
        lv_damageBarHeight = DialogControlGetHeight(libVCUI_gv_pU_VoidHeroUIDialogShieldBarImage[lv_index], 1);
    }
    else {

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


        if ((libNCMI_gv_NM_MissionCheat_Panel[lv_panelIndex] != c_invalidDialogControlId)) {
            lv_cheatUIHeight += DialogControlGetHeight(libNCMI_gv_NM_MissionCheat_Panel[lv_panelIndex], 1);
        }

mods/missionpacks/novacampaign.sc2modbase.sc2data/LibNCUI.galaxy:6828

        DialogControlSetPositionRelative(DialogControlLastCreated(), PlayerGroupAll(), c_anchorLeft, libNCUI_gv_NU_HeroDialogEnergyBarImage[lv_index], c_anchorLeft, 0, 0);
        lv_damageBarWidth = FixedToInt((((UnitGetPropertyFixed(libNCUI_gv_NU_HeroUnit[lv_index], c_unitPropEnergy, c_unitPropCurrent) - EventUnitPropertyChangeFixed()) / UnitGetPropertyFixed(libNCUI_gv_NU_HeroUnit[lv_index], c_unitPropEnergyMax, c_unitPropCurrent)) * IntToFixed(libNCUI_gv_nUC_HEROUIBARWIDTH)));
        lv_damageBarHeight = DialogControlGetHeight(libNCUI_gv_NU_HeroDialogEnergyBarImage[lv_index], 1);
    }
    else if (autoB2BDD4C2_val == c_unitPropLife) {

mods/missionpacks/novacampaign.sc2modbase.sc2data/LibNCUI.galaxy:6834

        DialogControlSetPositionRelative(DialogControlLastCreated(), PlayerGroupAll(), c_anchorLeft, libNCUI_gv_NU_HeroDialogHealthBarImage[lv_index], c_anchorLeft, 0, 0);
        lv_damageBarWidth = FixedToInt((((UnitGetPropertyFixed(libNCUI_gv_NU_HeroUnit[lv_index], c_unitPropLife, c_unitPropCurrent) - EventUnitPropertyChangeFixed()) / UnitGetPropertyFixed(libNCUI_gv_NU_HeroUnit[lv_index], c_unitPropLifeMax, c_unitPropCurrent)) * IntToFixed(libNCUI_gv_nUC_HEROUIBARWIDTH)));
        lv_damageBarHeight = DialogControlGetHeight(libNCUI_gv_NU_HeroDialogHealthBarImage[lv_index], 1);
    }
    else if (autoB2BDD4C2_val == c_unitPropShields) {

mods/missionpacks/novacampaign.sc2modbase.sc2data/LibNCUI.galaxy:6845

            lv_damageBarWidth = 0;
        }
        lv_damageBarHeight = DialogControlGetHeight(libNCUI_gv_nU_HeroDialogShieldBarImage[lv_index], 1);
    }
    else {

mods/starcoop/starcoop.sc2modbase.sc2data/LibCOUI.galaxy:8112

        DialogControlSetPositionRelative(DialogControlLastCreated(), lv_heroGroup, c_anchorLeft, libCOUI_gv_cU_HeroDialogEnergyBarImage[lv_index], c_anchorLeft, 0, 0);
        lv_damageBarWidth = FixedToInt((((UnitGetPropertyFixed(libCOUI_gv_cU_HeroUnit[lv_index][lv_player], c_unitPropEnergy, c_unitPropCurrent) - EventUnitPropertyChangeFixed()) / UnitGetPropertyFixed(libCOUI_gv_cU_HeroUnit[lv_index][lv_player], c_unitPropEnergyMax, c_unitPropCurrent)) * IntToFixed(libCOUI_gv_cUC_HEROUIBARWIDTH)));
        lv_damageBarHeight = DialogControlGetHeight(libCOUI_gv_cU_HeroDialogEnergyBarImage[lv_index], lv_player);
    }
    else if (autoB2BDD4C2_val == c_unitPropLife) {

mods/starcoop/starcoop.sc2modbase.sc2data/LibCOUI.galaxy:8118

        DialogControlSetPositionRelative(DialogControlLastCreated(), lv_heroGroup, c_anchorLeft, libCOUI_gv_cU_HeroDialogHealthBarImage[lv_index], c_anchorLeft, 0, 0);
        lv_damageBarWidth = FixedToInt((((UnitGetPropertyFixed(libCOUI_gv_cU_HeroUnit[lv_index][lv_player], c_unitPropLife, c_unitPropCurrent) - EventUnitPropertyChangeFixed()) / UnitGetPropertyFixed(libCOUI_gv_cU_HeroUnit[lv_index][lv_player], c_unitPropLifeMax, c_unitPropCurrent)) * IntToFixed(libCOUI_gv_cUC_HEROUIBARWIDTH)));
        lv_damageBarHeight = DialogControlGetHeight(libCOUI_gv_cU_HeroDialogHealthBarImage[lv_index], lv_player);
    }
    else if (autoB2BDD4C2_val == c_unitPropShields) {

mods/starcoop/starcoop.sc2modbase.sc2data/LibCOUI.galaxy:8129

            lv_damageBarWidth = 0;
        }
        lv_damageBarHeight = DialogControlGetHeight(libCOUI_gv_cU_HeroDialogShieldBarImage[lv_index], lv_player);
    }
    else {

mods/voidprologue.sc2modbase.sc2data/LibA3DDD02B.galaxy:8565

        DialogControlSetPositionRelative(DialogControlLastCreated(), PlayerGroupAll(), c_anchorLeft, libA3DDD02B_gv_pP_HeroUIDialogEnergyBarImage[lv_index], c_anchorLeft, 0, 0);
        lv_damageBarWidth = FixedToInt((((UnitGetPropertyFixed(libA3DDD02B_gv_pP_HeroUIUnit[lv_index], c_unitPropEnergy, c_unitPropCurrent) - EventUnitPropertyChangeFixed()) / UnitGetPropertyFixed(libA3DDD02B_gv_pP_HeroUIUnit[lv_index], c_unitPropEnergyMax, c_unitPropCurrent)) * libA3DDD02B_gv_pPC_HEROUIBARWIDTH));
        lv_damageBarHeight = DialogControlGetHeight(libA3DDD02B_gv_pP_HeroUIDialogEnergyBarImage[lv_index], 1);
    }
    else if (auto9FAC268D_val == c_unitPropLife) {

mods/voidprologue.sc2modbase.sc2data/LibA3DDD02B.galaxy:8571

        DialogControlSetPositionRelative(DialogControlLastCreated(), PlayerGroupAll(), c_anchorLeft, libA3DDD02B_gv_pP_HeroUIDialogHealthBarImage[lv_index], c_anchorLeft, 0, 0);
        lv_damageBarWidth = FixedToInt((((UnitGetPropertyFixed(libA3DDD02B_gv_pP_HeroUIUnit[lv_index], c_unitPropLife, c_unitPropCurrent) - EventUnitPropertyChangeFixed()) / UnitGetPropertyFixed(libA3DDD02B_gv_pP_HeroUIUnit[lv_index], c_unitPropLifeMax, c_unitPropCurrent)) * libA3DDD02B_gv_pPC_HEROUIBARWIDTH));
        lv_damageBarHeight = DialogControlGetHeight(libA3DDD02B_gv_pP_HeroUIDialogHealthBarImage[lv_index], 1);
    }
    else if (auto9FAC268D_val == c_unitPropShields) {

mods/voidprologue.sc2modbase.sc2data/LibA3DDD02B.galaxy:8577

        DialogControlSetPositionRelative(DialogControlLastCreated(), PlayerGroupAll(), c_anchorLeft, libA3DDD02B_gv_pP_HeroUIDialogShieldsBarImage[lv_index], c_anchorLeft, 0, 0);
        lv_damageBarWidth = FixedToInt((((UnitGetPropertyFixed(libA3DDD02B_gv_pP_HeroUIUnit[lv_index], c_unitPropShields, c_unitPropCurrent) - EventUnitPropertyChangeFixed()) / UnitGetPropertyFixed(libA3DDD02B_gv_pP_HeroUIUnit[lv_index], c_unitPropShieldsMax, c_unitPropCurrent)) * libA3DDD02B_gv_pPC_HEROUIBARWIDTH));
        lv_damageBarHeight = DialogControlGetHeight(libA3DDD02B_gv_pP_HeroUIDialogShieldsBarImage[lv_index], 1);
    }
    else {