mirror of
https://gitea.wildfiregames.com/0ad/0ad.git
synced 2026-06-21 02:23:47 +00:00
K776's minor GUI changes
This was SVN commit r12017.
This commit is contained in:
@@ -51,7 +51,7 @@ function displaySingle(entState, template)
|
||||
healthSize.rright = 100*Math.max(0, Math.min(1, entState.hitpoints / entState.maxHitpoints));
|
||||
unitHealthBar.size = healthSize;
|
||||
|
||||
var hitpoints = entState.hitpoints + "/" + entState.maxHitpoints;
|
||||
var hitpoints = entState.hitpoints + " / " + entState.maxHitpoints;
|
||||
getGUIObjectByName("healthStats").caption = hitpoints;
|
||||
getGUIObjectByName("healthSection").hidden = false;
|
||||
}
|
||||
@@ -81,7 +81,7 @@ function displaySingle(entState, template)
|
||||
|
||||
var experience = "[font=\"serif-bold-13\"]Experience: [/font]" + Math.floor(entState.promotion.curr);
|
||||
if (entState.promotion.curr < entState.promotion.req)
|
||||
experience += "/" + entState.promotion.req;
|
||||
experience += " / " + entState.promotion.req;
|
||||
getGUIObjectByName("experience").tooltip = experience;
|
||||
getGUIObjectByName("experience").hidden = false;
|
||||
}
|
||||
@@ -93,7 +93,7 @@ function displaySingle(entState, template)
|
||||
// Resource stats
|
||||
if (entState.resourceSupply)
|
||||
{
|
||||
var resources = Math.ceil(+entState.resourceSupply.amount) + "/" + entState.resourceSupply.max;
|
||||
var resources = Math.ceil(+entState.resourceSupply.amount) + " / " + entState.resourceSupply.max;
|
||||
var resourceType = entState.resourceSupply.type["generic"];
|
||||
if (resourceType == "treasure")
|
||||
resourceType = entState.resourceSupply.type["specific"];
|
||||
@@ -127,7 +127,7 @@ function displaySingle(entState, template)
|
||||
getGUIObjectByName("resourceCarryingIcon").hidden = false;
|
||||
getGUIObjectByName("resourceCarryingText").hidden = false;
|
||||
getGUIObjectByName("resourceCarryingIcon").sprite = "stretched:session/icons/resources/"+carried.type+".png";
|
||||
getGUIObjectByName("resourceCarryingText").caption = carried.amount + "/" + carried.max;
|
||||
getGUIObjectByName("resourceCarryingText").caption = carried.amount + " / " + carried.max;
|
||||
}
|
||||
// Use the same indicators for traders
|
||||
else if (entState.trader && entState.trader.goods.amount > 0)
|
||||
@@ -226,11 +226,10 @@ function displayMultiple(selection, template)
|
||||
healthSize.rtop = 100-100*Math.max(0, Math.min(1, averageHealth / maxHealth));
|
||||
unitHealthBar.size = healthSize;
|
||||
|
||||
var hitpoints = "[font=\"serif-bold-13\"]Hitpoints [/font]" + averageHealth + "/" + maxHealth;
|
||||
var hitpoints = "[font=\"serif-bold-13\"]Hitpoints [/font]" + averageHealth + " / " + maxHealth;
|
||||
var healthMultiple = getGUIObjectByName("healthMultiple");
|
||||
healthMultiple.tooltip = hitpoints;
|
||||
healthMultiple.hidden = false;
|
||||
}
|
||||
healthMultiple.hidden = false; }
|
||||
else
|
||||
{
|
||||
getGUIObjectByName("healthMultiple").hidden = true;
|
||||
|
||||
@@ -659,11 +659,11 @@
|
||||
|
||||
<object size="0 60 100% 96" type="image" sprite="edgedPanelShader">
|
||||
<!-- Attack and Armor -->
|
||||
<object size="90 0 126 36" name="attackAndArmorStats" type="image" sprite="stretched:session/icons/stances/defensive.png" tooltip="Attack and Armor" tooltip_style="sessionToolTip"/>
|
||||
<object size="90 -2 126 34" name="attackAndArmorStats" type="image" sprite="stretched:session/icons/stances/defensive.png" tooltip="Attack and Armor" tooltip_style="sessionToolTip"/>
|
||||
|
||||
<!-- Resource carrying icon/counter -->
|
||||
<object size="100%-72 0 100%-26 36" type="text" name="resourceCarryingText" style="StatsTextRight"/>
|
||||
<object size="100%-32 0 100%+4 36" type="image" name="resourceCarryingIcon"/>
|
||||
<object size="100%-78 -2 100%-28 34" type="text" name="resourceCarryingText" style="CarryingTextRight"/>
|
||||
<object size="100%-36 -2 100% 34" type="image" name="resourceCarryingIcon"/>
|
||||
</object>
|
||||
|
||||
<!-- Big unit icon -->
|
||||
@@ -694,7 +694,7 @@
|
||||
<object size="0 0 100% 20" name="specific" ghost="true" type="text" style="SpecificNameCentered"/>
|
||||
|
||||
<!-- Generic Name -->
|
||||
<object size="0 20 100% 36" name="generic" ghost="true" type="text" style="GenericNameCentered"/>
|
||||
<object size="0 15 100% 36" name="generic" ghost="true" type="text" style="GenericNameCentered"/>
|
||||
</object>
|
||||
|
||||
<!-- Player Name and Civ -->
|
||||
@@ -759,7 +759,7 @@
|
||||
type="image"
|
||||
z="30"
|
||||
>
|
||||
<object size="0 0 100% 100%">
|
||||
<object size="0 1 100% 100%">
|
||||
<repeat count="6">
|
||||
<object name="unitCommandButton[n]" hidden="true" style="iconButton" type="button" size="0 0 32 32" tooltip_style="sessionToolTipBottomBold">
|
||||
<object name="unitCommandIcon[n]" ghost="true" type="image" size="0 0 100% 100%" style="commandIcon"/>
|
||||
|
||||
@@ -126,6 +126,14 @@
|
||||
/>
|
||||
|
||||
<style name="StatsTextRight"
|
||||
font="serif-stroke-12"
|
||||
textcolor="white"
|
||||
text_align="right"
|
||||
text_valign="center"
|
||||
ghost="true"
|
||||
/>
|
||||
|
||||
<style name="CarryingTextRight"
|
||||
font="serif-bold-stroke-13"
|
||||
textcolor="white"
|
||||
text_align="right"
|
||||
@@ -142,7 +150,7 @@
|
||||
/>
|
||||
|
||||
<style name="GenericNameCentered"
|
||||
font="serif-stroke-13"
|
||||
font="serif-stroke-12"
|
||||
textcolor="white"
|
||||
text_align="center"
|
||||
text_valign="center"
|
||||
|
||||
Reference in New Issue
Block a user