1
0
forked from 0ad/0ad

Updated GUI/entities to use Philip's spiffy new icon sheets. :)

This was SVN commit r1520.
This commit is contained in:
Acumen 2004-12-17 17:22:27 +00:00
parent 6526301cfe
commit cd35701f70
43 changed files with 87 additions and 3486 deletions

View File

@ -5,7 +5,7 @@
<Id
generic="Civilian Centre"
icon_cell="48"
icon_cell="47"
rollover="The heart of the player's empire. Trains economic units, and can only be built on settlements."

View File

@ -5,7 +5,7 @@
<Id
generic="Temple"
icon_cell="59"
icon_cell="58"
rollover="The Temple trains physicians, researches medical technologies, and provides healing to nearby allied organic units."

View File

@ -5,7 +5,7 @@
<Id
generic="House"
icon_cell="49"
icon_cell="48"
rollover="A civic building that increases the player's population."

View File

@ -5,7 +5,7 @@
<Id
generic="Outpost"
icon_cell="54"
icon_cell="53"
rollover="Outposts can be built anywhere on a player's land, and garrisoned to provide reconnaissance and defense against attackers."

View File

@ -5,7 +5,7 @@
<Id
generic="Wall"
icon_cell="55"
icon_cell="54"
rollover="Build walls to protect a town, close off choke points, and defend resource sites."

View File

@ -5,7 +5,7 @@
<Id
generic="Gate"
icon_cell="57"
icon_cell="56"
rollover="Gates allow allied units access through a wall, but are also its most vulnerable point."

View File

@ -5,7 +5,7 @@
<Id
generic="Tower"
icon_cell="56"
icon_cell="55"
rollover="Towers can be garrisoned to defend a city wall against attackers."

View File

@ -5,7 +5,7 @@
<Id
generic="Farmstead"
icon_cell="50"
icon_cell="49"
rollover="The Farmstead is the centre for food gathering operations. Fields and Corrals must be built at lots adjacent to it."

View File

@ -5,7 +5,7 @@
<Id
generic="Mill"
icon_cell="53"
icon_cell="52"
rollover="A Mill must be constructed near a source of Wood, Stone or Ore in order to collect them. It also provides technologies that improve gathering of these resources."

View File

@ -5,7 +5,7 @@
<Id
generic="Market"
icon_cell="61"
icon_cell="60"
rollover="The Market creates trade units and allows resources to be bartered. Traders travel between Markets, generating resources on a successful round-trip."

View File

@ -5,7 +5,7 @@
<Id
generic="Fortress"
icon_cell="62"
icon_cell="61"
rollover="The Fortress represents the pinnacle of a civilisation's military prowess. Heroes, powerful advanced units, and unique technologies are available from this structure."

View File

@ -5,7 +5,7 @@
<Id
generic="Barracks"
icon_cell="60"
icon_cell="59"
rollover="The Barracks trains military units. Technologies may also be researched to improve their equipment."

View File

@ -5,7 +5,7 @@
<Id
generic="Dock"
icon_cell="58"
icon_cell="57"
rollover="Naval vessels are manufactured at this building. A Dock must be built on the shoreline of a body of water."

View File

@ -5,7 +5,7 @@
<Id
generic="Special Building"
icon_cell="63"
icon_cell="62"
rollover="This is a special building unique to a particular civilisation."

View File

@ -5,7 +5,7 @@
<Id
generic="Corral"
icon_cell="52"
icon_cell="51"
rollover="Herd domestic animals into a Corral, and they will provide Food for your civilisation."

View File

@ -5,7 +5,7 @@
<Id
generic="Field"
icon_cell="51"
icon_cell="50"
rollover="Assign an economic unit to a Field to harvest grain and generate Food."

View File

@ -5,7 +5,7 @@
<Id
generic="Cavalry Spearman"
icon_cell="16"
icon_cell="15"
type.unit.mounted.spear="true"
type.unit.weapon.spear="true"

View File

@ -5,7 +5,7 @@
<Id
generic="Cavalry Swordsman"
icon_cell="19"
icon_cell="18"
type.unit.mounted.sword="true"
type.unit.weapon.sword="true"

View File

@ -5,7 +5,7 @@
<Id
generic="Cavalry Archer"
icon_cell="25"
icon_cell="24"
type.unit.mounted.bow="true"
type.unit.weapon.bow="true"

View File

@ -5,7 +5,7 @@
<Id
generic="Cavalry Javelinist"
icon_cell="22"
icon_cell="21"
type.unit.mounted.javelin="true"
type.unit.weapon.javelin="true"

View File

@ -5,7 +5,7 @@
<Id
generic="Infantry Spearman"
icon_cell="4"
icon_cell="3"
type.unit.foot.spear="true"
type.unit.weapon.spear="true"

View File

@ -5,7 +5,7 @@
<Id
generic="Infantry Swordsman"
icon_cell="1"
icon_cell="0"
type.unit.foot.sword="true"
type.unit.weapon.sword="true"

View File

@ -5,7 +5,7 @@
<Id
generic="Infantry Archer"
icon_cell="10"
icon_cell="9"
type.unit.foot.bow="true"
type.unit.weapon.bow="true"

View File

@ -5,7 +5,7 @@
<Id
generic="Infantry Javelinist"
icon_cell="7"
icon_cell="6"
type.unit.foot.javelin="true"
type.unit.weapon.javelin="true"

View File

@ -5,7 +5,7 @@
<Id
generic="Infantry Slinger"
icon_cell="13"
icon_cell="12"
type.unit.foot.sling="true"
type.unit.weapon.sling="true"

View File

@ -5,7 +5,7 @@
<Id
generic="Bireme"
icon_cell="40"
icon_cell="39"
type.unit.group.warship="true"
/>

View File

@ -5,7 +5,7 @@
<Id
generic="Merchant Ship"
icon_cell="39"
icon_cell="38"
type.unit.group.military="false"
type.unit.group.trade="true"

View File

@ -5,7 +5,7 @@
<Id
generic="Quinquereme"
icon_cell="42"
icon_cell="41"
type.unit.group.warship="true"
/>

View File

@ -5,7 +5,7 @@
<Id
generic="Trireme"
icon_cell="41"
icon_cell="40"
type.unit.group.warship="true"
/>

View File

@ -5,7 +5,7 @@
<Id
generic="Ballista"
icon_cell="38"
icon_cell="37"
type.unit.attack.ranged="true"
/>

View File

@ -5,7 +5,7 @@
<Id
generic="Onager"
icon_cell="36"
icon_cell="35"
type.unit.attack.ranged="true"
/>

View File

@ -5,7 +5,7 @@
<Id
generic="Ram"
icon_cell="37"
icon_cell="36"
type.unit.attack.melee="true"
/>

View File

@ -5,7 +5,7 @@
<Id
generic="Super Cavalry Unit"
icon_cell="44"
icon_cell="43"
class3="Super Cavalry Unit"

View File

@ -5,7 +5,7 @@
<Id
generic="Super Infantry Unit"
icon_cell="43"
icon_cell="42"
class3="Super Infantry Unit"

View File

@ -5,7 +5,7 @@
<Id
generic="Super Siege Unit"
icon_cell="44"
icon_cell="43"
class3="Super Siege Unit"

View File

@ -5,7 +5,7 @@
<Id
generic="Female Citizen"
icon_cell="33"
icon_cell="32"
/>
</Traits>
<Actions>

View File

@ -5,7 +5,7 @@
<Id
generic="Healer"
icon_cell="34"
icon_cell="33"
/>
</Traits>
</Entity>

View File

@ -5,7 +5,7 @@
<Id
generic="Trader"
icon_cell="35"
icon_cell="34"
type.unit.group.trade="true"
/>

View File

@ -12,7 +12,7 @@ function manualDisplay()
if (selection[0].traits.id.icon)
{
if (selection[0].traits.id.icon_cell && selection[0].traits.id.icon_cell != "")
setPortrait("manual_portrait", selection[0].traits.id.icon + "_" + selection[0].traits.id.icon_cell);
setPortrait("manual_portrait", selection[0].traits.id.icon, selection[0].traits.id.icon_cell);
else
setPortrait("manual_portrait", selection[0].traits.id.icon);
}

View File

@ -46,7 +46,7 @@ function loadSession()
// ====================================================================
function setPortrait(objectName, portraitString)
function setPortrait(objectName, portraitString, portraitCell)
{
// Use this function as a shortcut to change a portrait object to a different portrait image.
@ -64,6 +64,10 @@ function setPortrait(objectName, portraitString)
// Note we need to use a special syntax here (object["param"] instead of object.param because dashes aren't actually in JS's variable-naming conventions.
GUIObject["sprite-over"] = GUIObject.sprite + "-lit";
GUIObject["sprite-disabled"] = GUIObject.sprite + "-grey";
// If the source texture is a multi-frame image (icon sheet), specify correct cell.
if (portraitCell)
GUIObject["icon-id"] = portraitCell;
}
// ====================================================================

View File

@ -187,11 +187,11 @@ function UpdateGroupPane()
groupPanePortrait.hidden = false;
groupPaneBar.hidden = false;
// Set progress bar for hitpoints.
if (selection[groupPaneLoop-1].traits.health.curr && selection[groupPaneLoop-1].traits.health.hitpoints)
groupPaneBar.caption = ((Math.round(selection[groupPaneLoop-1].traits.health.curr) * 100 ) / Math.round(selection[groupPaneLoop-1].traits.health.hitpoints));
if (selection[groupPaneLoop-1].traits.health.curr && selection[groupPaneLoop-1].traits.health.max)
groupPaneBar.caption = ((Math.round(selection[groupPaneLoop-1].traits.health.curr) * 100 ) / Math.round(selection[groupPaneLoop-1].traits.health.max));
// Set portrait.
if (selection[groupPaneLoop-1].traits.id.icon_cell && selection[groupPaneLoop-1].traits.id.icon_cell != "")
setPortrait("session_group_pane_portrait_" + groupPaneLoop, selection[groupPaneLoop-1].traits.id.icon + "_" + selection[groupPaneLoop-1].traits.id.icon_cell);
setPortrait("session_group_pane_portrait_" + groupPaneLoop, selection[groupPaneLoop-1].traits.id.icon, selection[groupPaneLoop-1].traits.id.icon_cell);
else
setPortrait("session_group_pane_portrait_" + groupPaneLoop, selection[groupPaneLoop-1].traits.id.icon);
}

View File

@ -619,7 +619,7 @@ function UpdateList(listIcon, listCol)
if (createLoop < listArray.length+1)
{
if (getEntityTemplate(listArray[createLoop-1]).traits.id.icon_cell && getEntityTemplate(listArray[createLoop-1]).traits.id.icon_cell != "")
setPortrait("session_panel_status_command_pri_" + listCol + "_" + createLoop, getEntityTemplate(listArray[createLoop-1]).traits.id.icon + "_" + getEntityTemplate(listArray[createLoop-1]).traits.id.icon_cell);
setPortrait("session_panel_status_command_pri_" + listCol + "_" + createLoop, getEntityTemplate(listArray[createLoop-1]).traits.id.icon, getEntityTemplate(listArray[createLoop-1]).traits.id.icon_cell);
else
setPortrait("session_panel_status_command_pri_" + listCol + "_" + createLoop, getEntityTemplate(listArray[createLoop-1]).traits.id.icon);
GUIObjectUnhide("session_panel_status_command_pri_" + listCol + "_" + createLoop);
@ -734,7 +734,7 @@ function UpdateStatusOrb()
if (selection[0].traits.id.icon)
{
if (selection[0].traits.id.icon_cell && selection[0].traits.id.icon_cell != "")
setPortrait("session_panel_status_portrait", selection[0].traits.id.icon + "_" + selection[0].traits.id.icon_cell);
setPortrait("session_panel_status_portrait", selection[0].traits.id.icon, selection[0].traits.id.icon_cell);
else
setPortrait("session_panel_status_portrait", selection[0].traits.id.icon);
}

File diff suppressed because it is too large Load Diff