Updated the production queue buttons, putting the progress sliders inside the button border.

This was SVN commit r12245.
This commit is contained in:
Deiz
2012-07-31 03:37:04 +00:00
parent b8b6ebb6ec
commit be3ca61d43
2 changed files with 4 additions and 2 deletions
@@ -863,7 +863,7 @@
<repeat count="16">
<object name="unitQueueButton[n]" hidden="true" style="iconButton" type="button" size="0 0 40 40" tooltip_style="sessionToolTipBottom">
<object name="unitQueueIcon[n]" ghost="true" type="image" size="3 3 37 37"/>
<object name="unitQueueProgressSlider[n]" type="image" sprite="queueProgressSlider" ghost="true" size="1 1 100%-1 100%-1" z="20"/>
<object name="unitQueueProgressSlider[n]" type="image" sprite="queueProgressSlider" ghost="true" size="3 3 37 37" z="20"/>
<object name="unitQueueCount[n]" ghost="true" style="groupIconsText" type="text" z="20"/>
</object>
</repeat>
@@ -315,7 +315,9 @@ function setupUnitPanel(guiName, usedPanels, unitEntState, items, callback)
{
getGUIObjectByName("queueProgress").caption = (item.progress ? progress : "");
var size = getGUIObjectByName("unit"+guiName+"ProgressSlider["+i+"]").size;
size.top = Math.round(item.progress*40);
// Buttons are assumed to be square, so left/right offsets can be used for top/bottom.
size.top = size.left + Math.round(item.progress * (size.right - size.left));
getGUIObjectByName("unit"+guiName+"ProgressSlider["+i+"]").size = size;
}
break;