* Increased Optimus font to 14b.

* Got selection healthbars into correct position.
* Implemented statistic icons. (todo: tooltips)
* Enabled pick lists (had to resort to brute-force
check-every-subsection-of-an-entity-property-whenever-I-use-it method).

This was SVN commit r3621.
This commit is contained in:
Acumen 2006-03-10 21:23:39 +00:00
parent 0defe7a347
commit 2c405028f4
9 changed files with 1274 additions and 1083 deletions

View File

@ -0,0 +1,100 @@
100
128 64
96
16
32 0 64 1 0 0 0 3
33 125 21 3 10 0 10 2
34 99 25 4 5 0 11 3
35 41 21 8 10 0 11 7
36 65 22 6 11 0 10 5
37 21 20 10 9 0 9 9
38 106 10 11 10 0 10 10
39 19 34 3 5 0 11 2
40 28 30 4 10 0 10 3
41 32 30 4 10 0 10 3
42 7 34 5 4 0 10 4
43 51 64 12 11 0 11 10
44 124 45 3 3 0 2 2
45 94 44 5 1 0 5 4
46 48 23 3 2 0 2 2
47 49 21 8 10 0 11 7
48 71 20 8 9 0 9 7
49 33 41 6 9 0 9 5
50 91 20 7 9 0 9 6
51 98 20 7 9 0 9 6
52 79 20 8 9 0 9 7
53 60 39 6 9 0 9 5
54 118 20 7 9 0 9 6
55 0 27 7 9 0 9 6
56 105 27 7 9 0 9 6
57 21 29 7 9 0 10 6
58 66 39 3 6 0 6 2
59 36 27 3 7 0 6 2
60 117 25 4 5 0 8 3
61 39 23 5 2 0 5 4
62 121 25 4 5 0 8 3
63 27 42 6 10 0 10 5
64 89 53 11 9 0 9 10
65 63 64 12 11 0 11 11
66 118 11 9 11 0 10 8
67 84 11 11 11 0 11 10
68 75 64 12 11 0 10 11
69 100 53 8 11 0 11 7
70 108 53 8 11 0 11 7
71 87 64 12 11 0 11 11
72 32 11 13 11 0 10 11
73 123 64 5 11 0 10 4
74 63 53 6 14 -1 10 4
75 99 64 12 11 0 10 11
76 116 53 8 11 0 10 7
77 17 11 15 11 0 11 14
78 45 11 13 11 0 11 12
79 58 11 13 11 0 11 11
80 12 22 9 11 0 10 7
81 0 64 22 14 0 11 12
82 111 64 12 11 0 10 11
83 34 52 7 11 0 11 6
84 69 53 10 11 0 11 9
85 22 53 12 11 0 10 11
86 71 11 13 11 0 10 12
87 22 64 16 11 0 10 15
88 95 11 11 11 0 10 10
89 51 53 12 11 0 10 11
90 79 53 10 11 0 11 9
91 71 30 4 10 0 10 3
92 57 21 8 10 0 11 7
93 75 30 4 10 0 10 3
94 79 25 8 5 0 10 7
95 91 21 8 1 0 -2 6
96 44 23 4 2 0 12 3
97 0 42 9 8 0 9 8
98 12 34 7 8 0 9 6
99 9 42 9 8 0 9 8
100 41 52 10 8 0 9 8
101 79 34 6 8 0 9 5
102 94 34 6 8 0 9 5
103 18 42 9 8 0 9 8
104 0 50 10 8 0 9 9
105 124 53 4 8 0 9 3
106 89 44 5 11 -1 9 3
107 51 42 9 8 0 9 8
108 45 34 7 8 0 9 5
109 0 18 12 8 0 9 11
110 10 50 10 8 0 9 9
111 31 20 10 9 0 9 9
112 52 34 7 8 0 9 6
113 0 10 17 10 0 9 9
114 69 42 9 8 0 9 8
115 39 36 6 9 0 9 5
116 112 42 8 8 0 9 7
117 78 42 9 8 0 9 8
118 41 44 10 8 0 9 9
119 106 18 12 8 0 9 11
120 94 42 9 8 0 9 8
121 103 42 9 8 0 9 8
122 120 42 8 8 0 9 7
123 7 28 5 10 0 10 4
124 87 22 4 11 -1 11 1
125 112 28 5 10 0 10 3
126 0 34 7 4 1 7 8
65533 38 64 13 12 1 11 14

Binary file not shown.

View File

@ -416,6 +416,49 @@
]]></action>
</object>
<object name="snStatusPaneStat_1" style="snStat" type="button" />
<object name="snStatusPaneStat_2" style="snStat" type="button" />
<object name="snStatusPaneStat_3" style="snStat" type="button" />
<object name="snStatusPaneStat_4" style="snStat" type="button" />
<object name="snStatusPaneStat_5" style="snStat" type="button" />
<object name="snStatusPaneStat_6" style="snStat" type="button" />
<object name="snStatusPaneStat_7" style="snStat" type="button" />
<object name="snStatusPaneStat_8" style="snStat" type="button"
>
<action on="Load"><![CDATA[
// Seek through this group of buttons (determining length from last object's name).
max = this.name.substring (this.name.lastIndexOf ("_")+1, this.name.length);
currCrd = getCrd ("snStatusPaneBkg");
currCrd3 = getCrd ("snStatusPanePortrait");
for (loop = 1; loop <= max; loop++)
{
// Get name of current object in group.
tempName = this.name.substring (0, this.name.lastIndexOf ("_")+1) + loop;
// Set width as either icon (odd) or text (even).
if (loop % 2 == 0)
tempWidth = (currCrd.coord[rb].width/max + 7);
else
tempWidth = 20;
if (loop == 1)
{
// Define first stat.
addCrds (tempName, 0, 0, currCrd3.coord[rb].x,
currCrd.coord[rb].y+currCrd.coord[rb].height-28,
tempWidth, 20);
}
else
{
// Get previous stat.
currCrd2 = getCrd (this.name.substring (0, this.name.lastIndexOf ("_")+1) + (loop-1));
// Align to the right of it.
addCrds (tempName, 0, 0, currCrd2.coord[rb].x + currCrd2.coord[rb].width, currCrd2.coord[rb].y, tempWidth, currCrd2.coord[rb].height);
}
}
]]></action>
</object>
</object>
<!-- COMMAND BUTTONS (arc the Status Pane) -->
@ -552,39 +595,29 @@
z="100"
/>
<object name="snStatusPaneCommandGroup8" >
<object style="snPortrait" type="button" name="snStatusPaneCommand8_2">
<object style="snGreenBar" type="progressbar" name="snStatusPaneCommand8_2Bar" />
</object>
<object style="snPortrait" type="button" name="snStatusPaneCommand8_3">
<object style="snGreenBar" type="progressbar" name="snStatusPaneCommand8_3Bar" />
</object>
<object style="snPortrait" type="button" name="snStatusPaneCommand8_4">
<object style="snGreenBar" type="progressbar" name="snStatusPaneCommand8_4Bar" />
</object>
<object style="snPortrait" type="button" name="snStatusPaneCommand8_5">
<object style="snGreenBar" type="progressbar" name="snStatusPaneCommand8_5Bar" />
</object>
<object style="snPortrait" type="button" name="snStatusPaneCommand8_6">
<object style="snGreenBar" type="progressbar" name="snStatusPaneCommand8_6Bar" />
</object>
<object style="snPortrait" type="button" name="snStatusPaneCommand8_7">
<object style="snGreenBar" type="progressbar" name="snStatusPaneCommand8_7Bar" />
</object>
<object style="snPortrait" type="button" name="snStatusPaneCommand8_8">
<object style="snGreenBar" type="progressbar" name="snStatusPaneCommand8_8Bar" />
</object>
<object style="snPortrait" type="button" name="snStatusPaneCommand8_9">
<object style="snGreenBar" type="progressbar" name="snStatusPaneCommand8_9Bar" />
</object>
<object style="snPortrait" type="button" name="snStatusPaneCommand8_10">
<object style="snGreenBar" type="progressbar" name="snStatusPaneCommand8_10Bar" />
</object>
<object style="snPortrait" type="button" name="snStatusPaneCommand8_11">
<object style="snGreenBar" type="progressbar" name="snStatusPaneCommand8_11Bar" />
</object>
<object style="snGreenBar" type="progressbar" name="snStatusPaneCommand8_2Bar" />
<object style="snGreenBar" type="progressbar" name="snStatusPaneCommand8_3Bar" />
<object style="snGreenBar" type="progressbar" name="snStatusPaneCommand8_4Bar" />
<object style="snGreenBar" type="progressbar" name="snStatusPaneCommand8_5Bar" />
<object style="snGreenBar" type="progressbar" name="snStatusPaneCommand8_6Bar" />
<object style="snGreenBar" type="progressbar" name="snStatusPaneCommand8_7Bar" />
<object style="snGreenBar" type="progressbar" name="snStatusPaneCommand8_8Bar" />
<object style="snGreenBar" type="progressbar" name="snStatusPaneCommand8_9Bar" />
<object style="snGreenBar" type="progressbar" name="snStatusPaneCommand8_10Bar" />
<object style="snGreenBar" type="progressbar" name="snStatusPaneCommand8_11Bar" />
<object style="snGreenBar" type="progressbar" name="snStatusPaneCommand8_12Bar" />
<object style="snPortrait" type="button" name="snStatusPaneCommand8_2" />
<object style="snPortrait" type="button" name="snStatusPaneCommand8_3" />
<object style="snPortrait" type="button" name="snStatusPaneCommand8_4" />
<object style="snPortrait" type="button" name="snStatusPaneCommand8_5" />
<object style="snPortrait" type="button" name="snStatusPaneCommand8_6" />
<object style="snPortrait" type="button" name="snStatusPaneCommand8_7" />
<object style="snPortrait" type="button" name="snStatusPaneCommand8_8" />
<object style="snPortrait" type="button" name="snStatusPaneCommand8_9" />
<object style="snPortrait" type="button" name="snStatusPaneCommand8_10" />
<object style="snPortrait" type="button" name="snStatusPaneCommand8_11" />
<object style="snPortrait" type="button" name="snStatusPaneCommand8_12"
>
<object style="snGreenBar" type="progressbar" name="snStatusPaneCommand8_12Bar" />
<action on="Load"><![CDATA[
defineCommandButtons(this.name);
]]></action>

View File

@ -75,9 +75,6 @@ function defineCommandButtons(command)
default:
var buttonX = getCrd ("snStatusPaneCommand" + (snStatusPaneCommand.split+1) + "_" + listLoop).coord[rb].x;
var buttonY = currCrd.coord[rb].y + 3;
var barX = buttonX;
var barY = buttonY;
break;
}
@ -92,6 +89,8 @@ function defineCommandButtons(command)
+snStatusPaneCommand.span;
var buttonY = parentTab.coord[rb].y;
}
var barX = buttonX;
var barY = 0;
}
else // If we're doing the row of tabs,
{
@ -126,8 +125,6 @@ function defineCommandButtons(command)
buttonWidth, 4);
getGUIObjectByName ("snStatusPaneCommand" + tabLoop + "_" + listLoop + "Bar").hidden = false;
getGUIObjectByName ("snStatusPaneCommand" + tabLoop + "_" + listLoop + "Bar").caption = 100;
//console.write ("Done health bar " + "snStatusPaneCommand" + tabLoop + "_" + listLoop + "Bar:" + buttonX + " " + buttonY);
}
/*
// Store indexes to the button for easy future reference.
@ -419,13 +416,18 @@ function refreshCommandButtons()
}
// Update Barter. (Tab button, persistent buttons, click them to do things.)
// updateTab ("barter", "production", "", selection[0].actions.barter.list);
if (selection[0].actions && selection[0].actions.barter && selection[0].actions.barter.list)
updateTab ("barter", "production", "", selection[0].actions.barter.list);
// Update pick lists (formation, stance, trade). (Tab button holds current selection, click a button to select a new option and close the tab.)
// updateTab ("formation", "pick", "", selection[0].traits.formation.type, selection[0].traits.formation.curr);
// updateTab ("stance", "pick", "", selection[0].traits.ai.stance.list, selection[0].traits.ai.stance.curr);
// updateTab ("trade", "pick", "", selection[0].actions.trade.list, selection[0].actions.trade.curr);
// updateTab ("gate", "pick", "", selection[0].actions.gate.list, selection[0].actions.gate.curr);
if (selection[0].traits && selection[0].traits.formation && selection[0].traits.formation.type && selection[0].traits.formation.curr)
updateTab ("formation", "pick", "", selection[0].traits.formation.type, selection[0].traits.formation.curr);
if (selection[0].traits && selection[0].traits.ai && selection[0].traits.ai.stance && selection[0].traits.ai.stance.list && selection[0].traits.ai.stance.curr)
updateTab ("stance", "pick", "", selection[0].traits.ai.stance.list, selection[0].traits.ai.stance.curr);
if (selection[0].actions && selection[0].actions.trade && selection[0].actions.trade.list && selection[0].actions.trade.curr)
updateTab ("trade", "pick", "", selection[0].actions.trade.list, selection[0].actions.trade.curr);
if (selection[0].actions && selection[0].actions.gate && selection[0].actions.gate.list && selection[0].actions.gate.list.curr)
updateTab ("gate", "pick", "", selection[0].actions.gate.list, selection[0].actions.gate.curr);
// Update research. (Tab button, persistent buttons, click them to do things.)
updateTab ("research", "production", "", selection[0].actions.create.list.research, "");
@ -471,6 +473,19 @@ function refreshCommandButtons()
}
}
// Do the selection/garrison list.
tabCounter = snStatusPaneCommand.tab.max;
// If there are entities garrisoned in the current entity,
if (selection[0].traits.garrison && selection[0].traits.garrison.curr > 0)
{
updateTab ("garrison", "production", "", selection, "");
}
else
{
// If more than one entity is selected, list them.
if (selection.length > 1)
updateTab ("selection", "production", "", selection, "");
}
}

View File

@ -74,7 +74,7 @@ function refreshStatusPane()
textCaption += '[font=verdana10][color="' + Math.round(selection[0].player.getColour().r*255) + ' ' + Math.round(selection[0].player.getColour().g*255) + ' ' + Math.round(selection[0].player.getColour().b*255) + '"]' + selection[0].player.name + '[/color][/font]\n';
textCaption += "[font=verdana10][color=white]" + selection[0].traits.id.civ + "[/color][/font]\n";
textCaption += "[font=verdana10][color=white]" + selection[0].traits.id.specific + "[/color][/font]\n";
textCaption += "[font=optimus12][color=gold]" + selection[0].traits.id.generic + "[/color][/font]";
textCaption += "[font=optimus14b][color=gold]" + selection[0].traits.id.generic + "[/color][/font]";
getGUIObjectByName ("snStatusPaneText").caption = textCaption;
}
@ -142,9 +142,38 @@ textCaption += '[font=verdana10][color="' + Math.round(selection[0].player.getCo
getGUIObjectByName ("snStatusPaneSupplyIcon").hidden = true;
}
}
// Update statistic icons.
statCurr = 1;
if (selection[0].actions && selection[0].actions.attack && selection[0].actions.attack.melee && selection[0].actions.attack.melee.damage)
updateStat ("snStatusPaneStat_", "Attack", "rating", selection[0].actions.attack.melee.damage);
if (selection[0].actions && selection[0].actions.attack && selection[0].actions.attack.melee && selection[0].actions.attack.melee.range)
updateStat ("snStatusPaneStat_", "Statistic", "range", selection[0].actions.attack.melee.range);
if (selection[0].actions && selection[0].actions.attack && selection[0].actions.attack.ranged && selection[0].actions.attack.ranged.damage)
updateStat ("snStatusPaneStat_", "Attack", "rating", selection[0].actions.attack.ranged.damage);
if (selection[0].actions && selection[0].actions.attack && selection[0].actions.attack.ranged && selection[0].actions.attack.ranged.range)
updateStat ("snStatusPaneStat_", "Statistic", "range", selection[0].actions.attack.ranged.range);
if (selection[0].traits && selection[0].traits.armour && selection[0].traits.armour.value)
updateStat ("snStatusPaneStat_", "Armour", "rating", selection[0].traits.armour.value);
if (selection[0].traits && selection[0].traits.vision && selection[0].traits.vision.los)
updateStat ("snStatusPaneStat_", "Statistic", "vision", selection[0].traits.vision.los);
// Refresh command buttons.
refreshCommandButtons();
}
// ====================================================================
function updateStat (baseName, cellSheet, cell, statistic)
{
textStat = getGUIObjectByName (baseName + statCurr);
textStat.sprite = "snIconSheet" + cellSheet;
textStat.cell_id = cellGroup[cellSheet][cell].id;
textStat.tooltip = cellGroup[cellSheet][cell].name;
iconStat = getGUIObjectByName (baseName + (statCurr + 1))
iconStat.caption = statistic;
iconStat.tooltip = cellGroup[cellSheet][cell].name + ": " + statistic + ".";
statCurr = (statCurr + 2);
}
// ====================================================================

View File

@ -274,15 +274,8 @@ function refreshResource (resourceName, resourceIndex)
if (coordGroup == GUIType)
{
// Update counter size.
// resourceObject.size = Crd[getCrd(resourceObject.name, true)].size[GUIType];
// resourceIconObject.size = Crd[getCrd(resourceIconObject.name, true)].size[GUIType];
resourceObject.size = Crd[crdResult].size[GUIType];
resourceIconObject.size = Crd[crdIconResult].size[GUIType];
console.write (resourceName + " Counter: " + resourceObject.size);
console.write (resourceName + " Icon: " + resourceIconObject.size);
}
}
}

View File

@ -493,7 +493,16 @@
ghost="true"
sprite="snIconSheetResource"
z="100"
/>
/>
<style name="snStat"
text_align="left"
text_valign="center"
font="tahoma14"
textcolor="white"
tooltip_style="snToolTip"
ghost="true"
/>
<style name="snCounter"
sprite="snCounter"

File diff suppressed because it is too large Load Diff