Finally put the command buttons back in, but the GUI doesn't seem to be accessible when a unit is clicked, so I can't be sure it works. I think it may be due to no left-click options in Simon's world click event handler. Need to ask him about it.

Also it's much slower as the buttons are constantly updated ... Mark's
shouldUpdateStat() doesn't seem to be registering in this case. Need to
check with him about that too.

This was SVN commit r2697.
This commit is contained in:
Acumen 2005-09-10 17:30:57 +00:00
parent d64e2ed19f
commit d3f41e1b9f
9 changed files with 1048 additions and 235 deletions

View File

@ -48,6 +48,8 @@
<script file="gui/test/functions_page_session_status_pane.js" />
<script file="gui/test/functions_page_session_status_commands.js" />
<!--
==========================================
- INCLUDE SCRIPT - SIMULATION FUNCTIONS

View File

@ -517,7 +517,9 @@
}
// Set default value (pick whatever's at the top of the list).
getGUIObjectByName(this.name).selected = 0;
// getGUIObjectByName(this.name).selected = 0;
// No, on second thought, set it to the randomly generated map until we can remember the last choice.
setCurrItemValue (this.name, "cantabrian_generated");
]]></action>
</object>

View File

@ -29,7 +29,7 @@
<!-- GROUP: MINIMAP -->
<object name="snMiniMap"
style="session_minimap"
style="snObject"
type="minimap"
hotkey="session.minimap.toggle"
>
@ -47,35 +47,249 @@
<!-- GROUP: STATUS PANE -->
<object name="snStatusPane"
style="skin*Hele*Window"
type="image"
hotkey="session.statuspane.toggle"
>
<action on="Load"><![CDATA[
addCrd (this.name, rb, 0, 100, 0, 0, 200, 120);
addCrd (this.name, lb, 100, 100);
addCrd (this.name, lt, 100, 0);
addCrd (this.name, rt, 0, 0);
]]></action>
<action on="Press"><![CDATA[
guiToggle (this.name);
]]></action>
<object name="snStatusPanePortrait"
style="portrait"
type="button"
hotkey="selection.snap"
<!-- STATUS PANE -->
<object name="snStatusPaneBkg"
style="skin*Hele*Window"
type="image"
>
<action on="Load"><![CDATA[
addCrd (this.name, rb, 0, 0, 5, 5, 64, 64);
addCrd (this.name, rb, 0, 100, 0, 0, 240, 150);
addCrd (this.name, lb, 100, 100);
addCrd (this.name, lt, 100, 0);
addCrd (this.name, rt, 0, 0);
]]></action>
<action on="Press"><![CDATA[
// Focus the camera on the unit when his portrait is clicked.
if (selection[0].position)
setCameraTarget(selection[0].position);
<object name="snStatusPanePortrait"
style="portrait"
type="button"
hotkey="selection.snap"
>
<action on="Load"><![CDATA[
addCrd (this.name, rb, 0, 0, 5, 5,
snConst.Portrait.Lrg.Width, snConst.Portrait.Lrg.Height);
]]></action>
<action on="Press"><![CDATA[
// Focus the camera on the unit when his portrait is clicked.
if (selection[0].position)
setCameraTarget(selection[0].position);
]]></action>
</object>
</object>
<!-- COMMAND BUTTONS (arc the Status Pane) -->
<object name="snStatusPaneCommand1_1"
type="button"
/>
<object name="snStatusPaneCommandGroup1" >
<object type="button" name="snStatusPaneCommand1_2" />
<object type="button" name="snStatusPaneCommand1_3" />
<object type="button" name="snStatusPaneCommand1_4" />
<object type="button" name="snStatusPaneCommand1_5" />
<object type="button" name="snStatusPaneCommand1_6" />
<object type="button" name="snStatusPaneCommand1_7" />
<object type="button" name="snStatusPaneCommand1_8" />
<object type="button" name="snStatusPaneCommand1_9" />
<object type="button" name="snStatusPaneCommand1_10" />
<object type="button" name="snStatusPaneCommand1_11" />
<object type="button" name="snStatusPaneCommand1_12" />
</object>
<object type="button" name="snStatusPaneCommand2_1" />
<object name="snStatusPaneCommandGroup2" >
<object type="button" name="snStatusPaneCommand2_2" />
<object type="button" name="snStatusPaneCommand2_3" />
<object type="button" name="snStatusPaneCommand2_4" />
<object type="button" name="snStatusPaneCommand2_5" />
<object type="button" name="snStatusPaneCommand2_6" />
<object type="button" name="snStatusPaneCommand2_7" />
<object type="button" name="snStatusPaneCommand2_8" />
<object type="button" name="snStatusPaneCommand2_9" />
<object type="button" name="snStatusPaneCommand2_10" />
<object type="button" name="snStatusPaneCommand2_11" />
<object type="button" name="snStatusPaneCommand2_12" />
</object>
<object type="button" name="snStatusPaneCommand3_1" />
<object name="snStatusPaneCommandGroup3" >
<object type="button" name="snStatusPaneCommand3_2" />
<object type="button" name="snStatusPaneCommand3_3" />
<object type="button" name="snStatusPaneCommand3_4" />
<object type="button" name="snStatusPaneCommand3_5" />
<object type="button" name="snStatusPaneCommand3_6" />
<object type="button" name="snStatusPaneCommand3_7" />
<object type="button" name="snStatusPaneCommand3_8" />
<object type="button" name="snStatusPaneCommand3_9" />
<object type="button" name="snStatusPaneCommand3_10" />
<object type="button" name="snStatusPaneCommand3_11" />
<object type="button" name="snStatusPaneCommand3_12" />
</object>
<object type="button" name="snStatusPaneCommand4_1" />
<object name="snStatusPaneCommandGroup4" >
<object type="button" name="snStatusPaneCommand4_2" />
<object type="button" name="snStatusPaneCommand4_3" />
<object type="button" name="snStatusPaneCommand4_4" />
<object type="button" name="snStatusPaneCommand4_5" />
<object type="button" name="snStatusPaneCommand4_6" />
<object type="button" name="snStatusPaneCommand4_7" />
<object type="button" name="snStatusPaneCommand4_8" />
<object type="button" name="snStatusPaneCommand4_9" />
<object type="button" name="snStatusPaneCommand4_10" />
<object type="button" name="snStatusPaneCommand4_11" />
<object type="button" name="snStatusPaneCommand4_12" />
</object>
<object type="button" name="snStatusPaneCommand5_1" />
<object name="snStatusPaneCommandGroup5" >
<object type="button" name="snStatusPaneCommand5_2" />
<object type="button" name="snStatusPaneCommand5_3" />
<object type="button" name="snStatusPaneCommand5_4" />
<object type="button" name="snStatusPaneCommand5_5" />
<object type="button" name="snStatusPaneCommand5_6" />
<object type="button" name="snStatusPaneCommand5_7" />
<object type="button" name="snStatusPaneCommand5_8" />
<object type="button" name="snStatusPaneCommand5_9" />
<object type="button" name="snStatusPaneCommand5_10" />
<object type="button" name="snStatusPaneCommand5_11" />
<object type="button" name="snStatusPaneCommand5_12" />
</object>
<object type="button" name="snStatusPaneCommand6_1" />
<object name="snStatusPaneCommandGroup6" >
<object type="button" name="snStatusPaneCommand6_2" />
<object type="button" name="snStatusPaneCommand6_3" />
<object type="button" name="snStatusPaneCommand6_4" />
<object type="button" name="snStatusPaneCommand6_5" />
<object type="button" name="snStatusPaneCommand6_6" />
<object type="button" name="snStatusPaneCommand6_7" />
<object type="button" name="snStatusPaneCommand6_8" />
<object type="button" name="snStatusPaneCommand6_9" />
<object type="button" name="snStatusPaneCommand6_10" />
<object type="button" name="snStatusPaneCommand6_11" />
<object type="button" name="snStatusPaneCommand6_12" />
</object>
<object type="button" name="snStatusPaneCommand7_1" />
<object name="snStatusPaneCommandGroup7" >
<object type="button" name="snStatusPaneCommand7_2" />
<object type="button" name="snStatusPaneCommand7_3" />
<object type="button" name="snStatusPaneCommand7_4" />
<object type="button" name="snStatusPaneCommand7_5" />
<object type="button" name="snStatusPaneCommand7_6" />
<object type="button" name="snStatusPaneCommand7_7" />
<object type="button" name="snStatusPaneCommand7_8" />
<object type="button" name="snStatusPaneCommand7_9" />
<object type="button" name="snStatusPaneCommand7_10" />
<object type="button" name="snStatusPaneCommand7_11" />
<object type="button" name="snStatusPaneCommand7_12" />
</object>
<object type="button" name="snStatusPaneCommand8_1" />
<object name="snStatusPaneCommandGroup8" >
<object type="button" name="snStatusPaneCommand8_2" />
<object type="button" name="snStatusPaneCommand8_3" />
<object type="button" name="snStatusPaneCommand8_4" />
<object type="button" name="snStatusPaneCommand8_5" />
<object type="button" name="snStatusPaneCommand8_6" />
<object type="button" name="snStatusPaneCommand8_7" />
<object type="button" name="snStatusPaneCommand8_8" />
<object type="button" name="snStatusPaneCommand8_9" />
<object type="button" name="snStatusPaneCommand8_10" />
<object type="button" name="snStatusPaneCommand8_11" />
<object type="button" name="snStatusPaneCommand8_12" />
</object>
<object type="button" name="snStatusPaneCommand9_1" />
<object name="snStatusPaneCommandGroup9" >
<object type="button" name="snStatusPaneCommand9_2" />
<object type="button" name="snStatusPaneCommand9_3" />
<object type="button" name="snStatusPaneCommand9_4" />
<object type="button" name="snStatusPaneCommand9_5" />
<object type="button" name="snStatusPaneCommand9_6" />
<object type="button" name="snStatusPaneCommand9_7" />
<object type="button" name="snStatusPaneCommand9_8" />
<object type="button" name="snStatusPaneCommand9_9" />
<object type="button" name="snStatusPaneCommand9_10" />
<object type="button" name="snStatusPaneCommand9_11" />
<object type="button" name="snStatusPaneCommand9_12" />
</object>
<object type="button" name="snStatusPaneCommand10_1" />
<object name="snStatusPaneCommandGroup10" >
<object type="button" name="snStatusPaneCommand10_2" />
<object type="button" name="snStatusPaneCommand10_3" />
<object type="button" name="snStatusPaneCommand10_4" />
<object type="button" name="snStatusPaneCommand10_5" />
<object type="button" name="snStatusPaneCommand10_6" />
<object type="button" name="snStatusPaneCommand10_7" />
<object type="button" name="snStatusPaneCommand10_8" />
<object type="button" name="snStatusPaneCommand10_9" />
<object type="button" name="snStatusPaneCommand10_10" />
<object type="button" name="snStatusPaneCommand10_11" />
<object type="button" name="snStatusPaneCommand10_12" />
</object>
<object type="button" name="snStatusPaneCommand11_1" />
<object name="snStatusPaneCommandGroup11" >
<object type="button" name="snStatusPaneCommand11_2" />
<object type="button" name="snStatusPaneCommand11_3" />
<object type="button" name="snStatusPaneCommand11_4" />
<object type="button" name="snStatusPaneCommand11_5" />
<object type="button" name="snStatusPaneCommand11_6" />
<object type="button" name="snStatusPaneCommand11_7" />
<object type="button" name="snStatusPaneCommand11_8" />
<object type="button" name="snStatusPaneCommand11_9" />
<object type="button" name="snStatusPaneCommand11_10" />
<object type="button" name="snStatusPaneCommand11_11" />
<object type="button" name="snStatusPaneCommand11_12" />
</object>
<object type="button" name="snStatusPaneCommand12_1" />
<object name="snStatusPaneCommandGroup12" >
<object type="button" name="snStatusPaneCommand12_2" />
<object type="button" name="snStatusPaneCommand12_3" />
<object type="button" name="snStatusPaneCommand12_4" />
<object type="button" name="snStatusPaneCommand12_5" />
<object type="button" name="snStatusPaneCommand12_6" />
<object type="button" name="snStatusPaneCommand12_7" />
<object type="button" name="snStatusPaneCommand12_8" />
<object type="button" name="snStatusPaneCommand12_9" />
<object type="button" name="snStatusPaneCommand12_10" />
<object type="button" name="snStatusPaneCommand12_11" />
<object type="button" name="snStatusPaneCommand12_12" />
</object>
<object type="button" name="snStatusPaneCommand13_1" />
<object name="snStatusPaneCommandGroup13" >
<object type="button" name="snStatusPaneCommand13_2" />
<object type="button" name="snStatusPaneCommand13_3" />
<object type="button" name="snStatusPaneCommand13_4" />
<object type="button" name="snStatusPaneCommand13_5" />
<object type="button" name="snStatusPaneCommand13_6" />
<object type="button" name="snStatusPaneCommand13_7" />
<object type="button" name="snStatusPaneCommand13_8" />
<object type="button" name="snStatusPaneCommand13_9" />
<object type="button" name="snStatusPaneCommand13_10" />
<object type="button" name="snStatusPaneCommand13_11" />
<object type="button" name="snStatusPaneCommand13_12" />
// Setup all.
<action on="Load"><![CDATA[
defineCommandButtons();
]]></action>
</object>
<object name="snStatusPaneCommandProgress"
style="snPortraitProgress"
type="progressbar"
hidden="true"
>
<action on="Load"><![CDATA[
addCrd (this.name, rb, 0, 100,
getCrd ("snStatusPaneBkg").coord[rb].x
+getCrd ("snStatusPaneBkg").coord[rb].width,
getCrd ("snStatusPaneBkg").coord[rb].y,
snConst.Portrait.Sml.Width, snConst.Portrait.Sml.Height);
addCrd (this.name, lb, 100, 100);
addCrd (this.name, lt, 100, 0);
addCrd (this.name, rt, 0, 0);
]]></action>
</object>
</object>
</object>

View File

@ -9,15 +9,21 @@ function initSession()
{
// ============================================= CONSTANTS =================================================
// Standard portrait widths.
crd_portrait_lrg_width = 64;
crd_portrait_lrg_height = crd_portrait_lrg_width;
crd_portrait_sml_width = 32;
crd_portrait_sml_height = crd_portrait_sml_width;
snConst = new Object();
// Portraits (large and small).
snConst.Portrait = new Object();
snConst.Portrait.Sml = new Object();
snConst.Portrait.Sml.Width = 36;
snConst.Portrait.Sml.Height = snConst.Portrait.Sml.Width;
snConst.Portrait.Lrg = new Object();
snConst.Portrait.Lrg.Width = 64;
snConst.Portrait.Lrg.Height = snConst.Portrait.Lrg.Width;
// Small icons (eg Movement Rate, Food).
crd_mini_icon_width = 20;
crd_mini_icon_height = crd_mini_icon_width;
snConst.MiniIcon = new Object();
snConst.MiniIcon.Width = 20;
snConst.MiniIcon.Height = snConst.MiniIcon.Width;
// ============================================= GLOBALS =================================================
@ -97,15 +103,22 @@ function setPortrait(objectName, portraitString, portraitSuffix, portraitCell)
{
// Use this function as a shortcut to change a portrait object to a different portrait image.
// Accepts an object and specifies its default, rollover (lit) and disabled (grey) sprites.
// Accepts an object and specifies its default, rollover (lit) and disabled (gray) sprites.
// Sprite Format: "ui_portrait_"portraitString"_"portraitSuffix
// Sprite Format: "ui_portrait_"portraitString"_"portraitSuffix"_lit"
// Sprite Format: "ui_portrait_"portraitString"_"portraitSuffix"_grey"
// Sprite Format: "ui_portrait_"portraitString"_"portraitSuffix"_gray"
// Note: Make sure the file follows this naming convention or bad things could happen.
// Get GUI object
setPortraitGUIObject = getGUIObjectByName(objectName);
// Report error if object not found.
if (!setPortraitGUIObject)
{
console.write ("setPortrait(): Failed to find object " + objectName + ".");
return 1;
}
// Set the three portraits.
if (portraitSuffix && portraitSuffix != "")
setPortraitGUIObject.sprite = "ui_portrait_" + portraitString + "_" + portraitSuffix;
@ -113,13 +126,15 @@ function setPortrait(objectName, portraitString, portraitSuffix, portraitCell)
setPortraitGUIObject.sprite = "ui_portrait_" + portraitString;
setPortraitGUIObject.sprite_over = setPortraitGUIObject.sprite + "_lit";
setPortraitGUIObject.sprite_disabled = setPortraitGUIObject.sprite + "_grey";
setPortraitGUIObject.sprite_disabled = setPortraitGUIObject.sprite + "_gray";
// If the source texture is a multi-frame image (icon sheet), specify correct cell.
if (portraitCell && portraitCell != "")
setPortraitGUIObject.cell_id = portraitCell;
else
setPortraitGUIObject.cell_id = "";
return 0;
}
// ====================================================================
@ -329,3 +344,5 @@ function snRefresh()
// refreshTeamTray();
}
}
// ====================================================================

View File

@ -0,0 +1,365 @@
/*
DESCRIPTION : Functions for the Command Buttons orbitting the Status Pane.
NOTES :
*/
// ====================================================================
function defineCommandButtons()
{
snStatusPaneCommand = new Array();
snStatusPaneCommand.tab = new Object();
snStatusPaneCommand.list = new Object();
snStatusPaneCommand.button = new Object();
// Maximum number of buttons (either single or lists).
snStatusPaneCommand.tab.max = 10;
// Maximum number of entries in a list.
snStatusPaneCommand.list.max = 12;
// Number of tabs that are single buttons (no list).
snStatusPaneCommand.button.max = 5;
// When we reach this button, split the rows (remainder are vertical, not horizontal).
snStatusPaneCommand.split = 7;
// Spacing between lists.
snStatusPaneCommand.span = 2;
// Get the coordinates of the Status Pane background (referenced to determine command button locations).
currCrd = getCrd ("snStatusPaneBkg");
// Update each tab.
for (var tabLoop = 1; tabLoop <= snStatusPaneCommand.tab.max; tabLoop++)
{
snStatusPaneCommand[tabLoop] = new Array();
tempGroupObject = getGUIObjectByName("snStatusPaneCommand" +
"Group" + tabLoop);
// Update each list under each tab.
for (var listLoop = 1; listLoop <= snStatusPaneCommand.list.max; listLoop++)
{
tempListObject = getGUIObjectByName("snStatusPaneCommand" +
tabLoop + "_" + listLoop);
// Define properties of list buttons.
tempListObject.style = "snAction";
// Set portrait to default.
setPortrait (tempListObject.name, "default_square");
// Create parameters where command button information will later be stored.
snStatusPaneCommand[tabLoop][listLoop] = new Array();
snStatusPaneCommand[tabLoop][listLoop].type = new Object();
snStatusPaneCommand[tabLoop][listLoop].name = new Object();
snStatusPaneCommand[tabLoop][listLoop].last = new Object();
// Determine x and y position for current button.
if (tabLoop >= snStatusPaneCommand.split)
{
if (listLoop == 1)
{
var x = currCrd.coord[rb].x+currCrd.coord[rb].width;
if (tabLoop == snStatusPaneCommand.split && listLoop == 1)
var y = currCrd.coord[rb].y;
else
var y = Crd[Crd.last].coord[rb].y+Crd[Crd.last].coord[rb].height
+snStatusPaneCommand.span;
}
else
{
var x = Crd[Crd.last].coord[rb].x+Crd[Crd.last].coord[rb].width
+snStatusPaneCommand.span;
var y = Crd[Crd.last].coord[rb].y;
}
}
else
{
if (listLoop == 1)
{
if (tabLoop == 1 && listLoop == 1)
var x = currCrd.coord[rb].x;
else
var x = Crd[Crd.last].coord[rb].x+Crd[Crd.last].coord[rb].width
+snStatusPaneCommand.span;;
var y = currCrd.coord[rb].y+currCrd.coord[rb].height;
}
else
{
var x = Crd[Crd.last].coord[rb].x;
var y = Crd[Crd.last].coord[rb].y+Crd[Crd.last].coord[rb].height
+snStatusPaneCommand.span;
}
}
// Define dimensions of list buttons.
addCrd ("snStatusPaneCommand" + tabLoop + "_" + listLoop, rb, 0, 100, x, y,
snConst.Portrait.Sml.Width, snConst.Portrait.Sml.Height);
addCrd ("snStatusPaneCommand" + tabLoop + "_" + listLoop, lb, 100, 100);
addCrd ("snStatusPaneCommand" + tabLoop + "_" + listLoop, lt, 100, 0);
addCrd ("snStatusPaneCommand" + tabLoop + "_" + listLoop, rt, 0, 0);
// Press button.
tempListObject.onPress =
function (m, n, o)
{
return function()
{
pressCommandButton(m, n, o);
}
} (tempListObject, tabLoop, listLoop);
}
}
}
// ====================================================================
function UpdateList(listIcon, listCol)
{
// Populates a given column of command icons with appropriate build portraits for the selected object.
// Returns an array of this selection.
// Build unit list.
if ( selection[0].traits.id.civ_code
&& selection[0].actions.create
&& selection[0].actions.create.list )
{
listName = "";
switch (listIcon)
{
case action_tab_train:
if ( selection[0].actions.create.list.unit && shouldUpdateStat( "actions.create.list.unit" ) )
listName = selection[0].actions.create.list.unit.toString();
break;
case action_tab_buildciv:
if ( selection[0].actions.create.list.structciv && shouldUpdateStat( "actions.create.list.structciv" ) )
listName = selection[0].actions.create.list.structciv.toString();
break;
case action_tab_buildmil:
if ( selection[0].actions.create.list.structmil && shouldUpdateStat( "actions.create.list.structmil" ) )
listName = selection[0].actions.create.list.structmil.toString();
break;
case action_tab_research:
if ( selection[0].actions.create.list.tech && shouldUpdateStat( "actions.create.list.tech" ) )
listName = selection[0].actions.create.list.tech.toString();
break;
default:
return 0;
break;
}
if (listName != "")
{
// Enable tab portrait.
setPortrait("snStatusPaneCommand" + listCol + "_1", "sheet_action", "", listIcon);
guiUnHide("snStatusPaneCommand" + listCol + "_1");
// Store content info in tab button for future reference.
snStatusPaneCommand[1][listCol].type = "list";
// Extract entity list into an array.
listArray = parseDelimiterString(listName, ";");
// Reset list length.
snStatusPaneCommand[1][listCol].last = 0;
// Populate appropriate command buttons.
for (createLoop = 1; createLoop < snStatusPaneCommand.list.max; createLoop++)
{
if (createLoop < listArray.length)
{
// Get name of entity to display in list.
UpdateListEntityName = selection[0].traits.id.civ_code + "_" + listArray[createLoop];
setPortrait("snStatusPaneCommand" + listCol + "_" + parseInt(createLoop+1), getEntityTemplate(UpdateListEntityName).traits.id.icon, selection[0].traits.id.civ_code, getEntityTemplate(UpdateListEntityName).traits.id.icon_cell);
getGUIObjectByName("snStatusPaneCommand" + listCol + "_" + parseInt(createLoop+1)).caption = "";
guiUnHide("snStatusPaneCommand" + listCol + "_" + parseInt(createLoop+1));
// Store content info in tab button for future reference.
snStatusPaneCommand[parseInt(createLoop+1)][listCol].name = listArray[createLoop];
snStatusPaneCommand[parseInt(createLoop+1)][listCol].last++;
}
else
guiHide("snStatusPaneCommand" + listCol + "_" + parseInt(createLoop+1));
}
return listArray;
}
}
return 0;
}
// ====================================================================
function UpdateCommand(listIcon, listCol)
{
// Similar to UpdateList, but without the list.
// Updates a particular command button with a particular action.
if (
(listIcon == action_attack && selection[0].actions.attack)
|| (listIcon == action_patrol && selection[0].actions.patrol)
|| (listIcon == action_repair && selection[0].actions.repair)
|| (listIcon == action_gather_food && selection[0].actions.gather && selection[0].actions.gather.food)
|| (listIcon == action_gather_wood && selection[0].actions.gather && selection[0].actions.gather.wood)
|| (listIcon == action_gather_stone && selection[0].actions.gather && selection[0].actions.gather.stone)
|| (listIcon == action_gather_ore && selection[0].actions.gather && selection[0].actions.gather.ore)
)
{
// Set appearance of tab.
setPortrait("snStatusPaneCommand" + listCol + "_1", "sheet_action", "", listIcon);
guiUnHide("snStatusPaneCommand" + listCol + "_1");
// Hide its list.
guiHide("snStatusPaneCommand" + "Group" + listCol);
// Store content info in tab button for future reference.
snStatusPaneCommand[1][listCol].type = "command";
snStatusPaneCommand[1][listCol].last = 0;
snStatusPaneCommand[1][listCol].name = listIcon;
return (listCol-1);
}
else
return (listCol);
}
// ====================================================================
function pressCommandButton(GUIObject, tab, list)
{
switch (list)
{
case 1:
GUIObject.caption = "";
if (snStatusPaneCommand[tab][list].type == "list")
{
// Click the tab button to toggle visibility of its list (if it's of a list type).
GUIObjectToggle ("snStatusPaneCommand" + "Group" + tab);
}
else
{
// Perform appropriate actions for different command buttons.
switch (snStatusPaneCommand[tab][list].name)
{
case action_patrol:
setCursor("action-patrol");
selectLocation(
function (x, y) {
issueCommand (selection, NMT_Patrol, x, y);
}
);
break;
case action_attack:
setCursor("action-attack");
selectEntity(
function (target) {
issueCommand (selection, NMT_AttackMelee, target);
}
);
break;
}
}
break;
default:
// Left-clicked list button.
console.write("Clicked [" + tab + "," + list + "]: list of type " + snStatusPaneCommand[tab][list].type + "; " + snStatusPaneCommand[tab][list].name);
switch (snStatusPaneCommand[tab][list].name)
{
case action_tab_buildciv:
case action_tab_buildmil:
// Create building placement cursor.
startPlacing(selection[0].traits.id.civ_code + "_" + snStatusPaneCommand[tab][list].name);
break;
default:
// Attempt to add the entry to the queue.
attempt_add_to_build_queue( selection[0], selection[0].traits.id.civ_code + "_" + snStatusPaneCommand[tab][list].name, tab, list);
break;
}
break;
}
}
// ====================================================================
function refreshCommandButtons()
{
if( shouldUpdateStat( "actions.create.list" ) )
{
// Everything in this block is tied to properties in
// actions.create.list, the above check should limit the
// number of times this update is needlessly made.
// Update train/research/build lists.
listCounter = 1;
unitArray = UpdateList(action_tab_train, listCounter); if (unitArray != 0) listCounter++;
structcivArray = UpdateList(action_tab_buildciv, listCounter); if (structcivArray != 0) listCounter++;
structmilArray = UpdateList(action_tab_buildmil, listCounter); if (structmilArray != 0) listCounter++;
techArray = UpdateList(action_tab_research, listCounter); if (techArray != 0) listCounter++;
formationArray = UpdateList(action_tab_formation, listCounter); if (formationArray != 0) listCounter++;
stanceArray = UpdateList(action_tab_stance, listCounter); if (stanceArray != 0) listCounter++;
}
if( shouldUpdateStat( "actions" ) )
{
// Update commands.
commandCounter = snStatusPaneCommand.tab.max;
commandCounter = UpdateCommand(action_attack, commandCounter);
commandCounter = UpdateCommand(action_patrol, commandCounter);
commandCounter = UpdateCommand(action_repair, commandCounter);
commandCounter = UpdateCommand(action_gather_food, commandCounter);
commandCounter = UpdateCommand(action_gather_wood, commandCounter);
commandCounter = UpdateCommand(action_gather_stone, commandCounter);
commandCounter = UpdateCommand(action_gather_ore, commandCounter);
}
if (listCounter > 0 && commandCounter > 0)
{
// Clear remaining buttons between them.
for (commandClearLoop = listCounter; commandClearLoop <= commandCounter; commandClearLoop++)
{
guiHide("snStatusPaneCommand" + commandClearLoop + "_1");
// If this slot could possibly contain a list, hide that too.
guiHide("snStatusPaneCommand" + "Group" + commandClearLoop);
}
}
/*
// Update production queue.
GUIObject = getGUIObjectByName("snStatusPaneCommandProgress");
// If the entity has a production item underway,
if ( shouldUpdateStat( "actions.create" ) && shouldUpdateStat( "actions.create.progress" )
&& shouldUpdateStat( "actions.create.progress.valueOf()" )
&& shouldUpdateStat( "actions.create.progress.valueOf().current" )
&& shouldUpdateStat( "actions.create.queue.valueOf()" )
&& shouldUpdateStat( "actions.create.queue.valueOf()[0].traits.creation.time" ) )
{
// Set the value of the production progress bar.
GUIObject.caption = ((Math.round(Math.round(selection[0].actions.create.progress.valueOf().current)) * 100 ) / Math.round(selection[0].actions.create.queue.valueOf()[0].traits.creation.time));
// Set position of progress bar.
GUIObject.size = getGUIObjectByName("snStatusPaneCommand" + selection[0].actions.create.queue.valueOf()[0].tab + "_" + selection[0].actions.create.queue.valueOf()[0].list).size;
// Set progress bar tooltip.
GUIObject.tooltip = "Training " + selection[0].actions.create.queue.valueOf()[0].traits.id.generic + " ... " + (Math.round(selection[0].actions.create.queue.valueOf()[0].traits.creation.time-Math.round(selection[0].actions.create.progress.valueOf().current)) + " seconds remaining.");
// Reveal progressbar.
GUIObject.hidden = false;
// Seek through queue.
for( queueEntry = 0; queueEntry < selection[0].actions.create.queue.valueOf().length; queueEntry++)
{
// Update list buttons so that they match the number of entries of that type in the queue.
getGUIObjectByName("snStatusPaneCommand" + selection[0].actions.create.queue.valueOf()[queueEntry].tab + "_" + selection[0].actions.create.queue.valueOf()[queueEntry].list).caption++;
}
}
else
{
// Hide the progress bar.
GUIObject.hidden = true;
GUIObject.tooltip = "";
}
*/
}
// ====================================================================

View File

@ -14,6 +14,8 @@ function refreshStatusPane()
setPortrait ("snStatusPanePortrait", selection[0].traits.id.icon,
selection[0].traits.id.civ_code, selection[0].traits.id.icon_cell);
}
refreshCommandButtons();
}
// ====================================================================

View File

@ -57,6 +57,20 @@ function addCrd (name, group, rx, ry, x, y, width, height)
// ====================================================================
// Return coordinate object with a given name.
function getCrd (name)
{
for (loop = 0; loop < Crd.last; loop++)
{
if (Crd[loop].name == name)
return Crd[loop];
}
console.write ("Coordinate " + name + " not found in call to getCrd().");
}
// ====================================================================
// Calculates and returns "size" string from a given x/y/width/height and relative x and y.
function calcCrdArray (rx, ry, x, y, width, height)
{

View File

@ -591,7 +591,366 @@
/>
</sprite>
<!--
==========================================
SESSION GUI - PORTRAITS - DEFAULT
==========================================
-->
<!-- Default (empty) portrait (circular). -->
<sprite name="ui_portrait_default_circle">
<image texture="session/portraits/ui_portrait_default_circle.png"
size="0 0 100% 100%"
/>
</sprite>
<sprite name="ui_portrait_default_circle_lit">
<effect add_color="42 42 42 0"/>
<image texture="session/portraits/ui_portrait_default_circle.png"
size="0 0 100% 100%"
/>
</sprite>
<sprite name="ui_portrait_default_circle_gray">
<effect grayscale=""/>
<image texture="session/portraits/ui_portrait_default_circle.png"
size="0 0 100% 100%"
/>
</sprite>
<!-- Default (empty) portrait (square). -->
<sprite name="ui_portrait_default_square">
<image texture="session/portraits/ui_portrait_default_square.png"
size="1 1 100%-1 100%-1"
/>
<!-- Top border -->
<image backcolor="109 122 146"
size="0 0 100%-1 1"
/>
<!-- Right border -->
<image backcolor="220 223 228"
size="100%-1 0 100% 100%"
/>
<!-- Bottom border -->
<image backcolor="220 223 228"
size="0 100%-1 100% 100%"
/>
<!-- Left border -->
<image backcolor="109 122 146"
size="0 0 1 100%-1"
/>
</sprite>
<sprite name="ui_portrait_default_square_lit">
<effect add_color="42 42 42 0"/>
<image texture="session/portraits/ui_portrait_default_square.png"
size="0 0 100% 100%"
/>
</sprite>
<sprite name="ui_portrait_default_square_gray">
<effect grayscale=""/>
<image texture="session/portraits/ui_portrait_default_square.png"
size="0 0 100% 100%"
/>
</sprite>
<!--
==========================================
ACTION SHEET PORTRAITS - COMMANDS, TABS, STANCES, FORMATIONS, ETC
==========================================
-->
<sprite name="ui_portrait_sheet_action">
<image texture="session/portraits/ui_portrait_sheet_action.png"
cell_size="64 64"
size="0 0 100% 100%"
/>
</sprite>
<sprite name="ui_portrait_sheet_action_lit">
<effect add_color="42 42 42 0"/>
<image texture="session/portraits/ui_portrait_sheet_action.png"
cell_size="64 64"
size="0 0 100% 100%"
/>
</sprite>
<sprite name="ui_portrait_sheet_action_gray">
<effect grayscale=""/>
<image texture="session/portraits/ui_portrait_sheet_action.png"
cell_size="64 64"
size="0 0 100% 100%"
/>
</sprite>
<!--
==========================================
ENTITY SINGLE PORTRAITS
==========================================
-->
<!-- Pyrogenesis Dude portrait. -->
<sprite name="ui_portrait_unit_dude">
<image texture="session/portraits/ui_portrait_unit_dude.png"
size="0 0 100% 100%"
/>
</sprite>
<sprite name="ui_portrait_unit_dude_lit">
<effect add_color="42 42 42 0"/>
<image texture="session/portraits/ui_portrait_unit_dude.png"
size="0 0 100% 100%"
/>
</sprite>
<sprite name="ui_portrait_unit_dude_gray">
<effect grayscale=""/>
<image texture="session/portraits/ui_portrait_unit_dude.png"
size="0 0 100% 100%"
/>
</sprite>
<!-- Pyrogenesis Dudette portrait. -->
<sprite name="ui_portrait_unit_dudette">
<image texture="session/portraits/ui_portrait_unit_dudette.png"
size="0 0 100% 100%"
/>
</sprite>
<sprite name="ui_portrait_unit_dudette_lit">
<effect add_color="42 42 42 0"/>
<image texture="session/portraits/ui_portrait_unit_dudette.png"
size="0 0 100% 100%"
/>
</sprite>
<sprite name="ui_portrait_unit_dudette_gray">
<effect grayscale=""/>
<image texture="session/portraits/ui_portrait_unit_dudette.png"
size="0 0 100% 100%"
/>
</sprite>
<!-- Deciduous Tree portrait. -->
<sprite name="ui_portrait_flora_deciduotree_gaia">
<image texture="session/portraits/ui_portrait_flora_deciduotree_gaia.png"
size="0 0 100% 100%"
/>
</sprite>
<sprite name="ui_portrait_flora_deciduotree_gaia_lit">
<effect add_color="42 42 42 0"/>
<image texture="session/portraits/ui_portrait_flora_deciduotree_gaia.png"
size="0 0 100% 100%"
/>
</sprite>
<sprite name="ui_portrait_flora_deciduotree_gaia_gray">
<effect grayscale=""/>
<image texture="session/portraits/ui_portrait_flora_deciduotree_gaia.png"
size="0 0 100% 100%"
/>
</sprite>
<!--
==========================================
ENTITY SHEET PORTRAITS - CELTS
==========================================
-->
<sprite name="ui_portrait_sheet_civ_celt">
<image texture="session/portraits/ui_portrait_sheet_civ_celt.png"
cell_size="64 64"
size="0 0 100% 100%"
/>
</sprite>
<sprite name="ui_portrait_sheet_civ_celt_gray">
<effect grayscale=""/>
<image texture="session/portraits/ui_portrait_sheet_civ_celt.png"
cell_size="64 64"
size="0 0 100% 100%"
/>
</sprite>
<sprite name="ui_portrait_sheet_civ_celt_lit">
<effect add_color="42 42 42 0"/>
<image texture="session/portraits/ui_portrait_sheet_civ_celt.png"
cell_size="64 64"
size="0 0 100% 100%"
/>
</sprite>
<!--
==========================================
ENTITY SHEET PORTRAITS - HELLENES
==========================================
-->
<sprite name="ui_portrait_sheet_civ_hele">
<image texture="session/portraits/ui_portrait_sheet_civ_hele.png"
cell_size="64 64"
size="1 1 100%-1 100%-1"
/>
<!-- Top border -->
<image backcolor="220 223 228"
size="0 0 100%-1 1"
/>
<!-- Right border -->
<image backcolor="109 122 146"
size="100%-1 0 100% 100%"
/>
<!-- Bottom border -->
<image backcolor="109 122 146"
size="0 100%-1 100% 100%"
/>
<!-- Left border -->
<image backcolor="220 223 228"
size="0 0 1 100%-1"
/>
</sprite>
<sprite name="ui_portrait_sheet_civ_hele_gray">
<effect grayscale=""/>
<image texture="session/portraits/ui_portrait_sheet_civ_hele.png"
cell_size="64 64"
size="1 1 100%-1 100%-1"
/>
<!-- Top border -->
<image backcolor="220 223 228"
size="0 0 100%-1 1"
/>
<!-- Right border -->
<image backcolor="109 122 146"
size="100%-1 0 100% 100%"
/>
<!-- Bottom border -->
<image backcolor="109 122 146"
size="0 100%-1 100% 100%"
/>
<!-- Left border -->
<image backcolor="220 223 228"
size="0 0 1 100%-1"
/>
</sprite>
<sprite name="ui_portrait_sheet_civ_hele_lit">
<effect add_color="42 42 42 0"/>
<image texture="session/portraits/ui_portrait_sheet_civ_hele.png"
cell_size="64 64"
size="1 1 100%-1 100%-1"
/>
<!-- Top border -->
<image backcolor="220 223 228"
size="0 0 100%-1 1"
/>
<!-- Right border -->
<image backcolor="109 122 146"
size="100%-1 0 100% 100%"
/>
<!-- Bottom border -->
<image backcolor="109 122 146"
size="0 100%-1 100% 100%"
/>
<!-- Left border -->
<image backcolor="220 223 228"
size="0 0 1 100%-1"
/>
</sprite>
<!--
==========================================
ENTITY SHEET PORTRAITS - IBERIANS
==========================================
-->
<sprite name="ui_portrait_sheet_civ_iber">
<image texture="session/portraits/ui_portrait_sheet_civ_iber.png"
cell_size="64 64"
size="0 0 100% 100%"
/>
</sprite>
<sprite name="ui_portrait_sheet_civ_iber_gray">
<effect grayscale=""/>
<image texture="session/portraits/ui_portrait_sheet_civ_iber.png"
cell_size="64 64"
size="0 0 100% 100%"
/>
</sprite>
<sprite name="ui_portrait_sheet_civ_iber_lit">
<effect add_color="42 42 42 0"/>
<image texture="session/portraits/ui_portrait_sheet_civ_iber.png"
cell_size="64 64"
size="0 0 100% 100%"
/>
</sprite>
<!--
==========================================
ENTITY SHEET PORTRAITS - CARTHAGINIANS
==========================================
-->
<sprite name="ui_portrait_sheet_civ_kart">
<image texture="session/portraits/ui_portrait_sheet_civ_kart.png"
cell_size="64 64"
size="0 0 100% 100%"
/>
</sprite>
<sprite name="ui_portrait_sheet_civ_kart_gray">
<effect grayscale=""/>
<image texture="session/portraits/ui_portrait_sheet_civ_kart.png"
cell_size="64 64"
size="0 0 100% 100%"
/>
</sprite>
<sprite name="ui_portrait_sheet_civ_kart_lit">
<effect add_color="42 42 42 0"/>
<image texture="session/portraits/ui_portrait_sheet_civ_kart.png"
cell_size="64 64"
size="0 0 100% 100%"
/>
</sprite>
<!--
==========================================
ENTITY SHEET PORTRAITS - PERSIANS
==========================================
-->
<sprite name="ui_portrait_sheet_civ_pers">
<image texture="session/portraits/ui_portrait_sheet_civ_pers.png"
cell_size="64 64"
size="0 0 100% 100%"
/>
</sprite>
<sprite name="ui_portrait_sheet_civ_pers_gray">
<effect grayscale=""/>
<image texture="session/portraits/ui_portrait_sheet_civ_pers.png"
cell_size="64 64"
size="0 0 100% 100%"
/>
</sprite>
<sprite name="ui_portrait_sheet_civ_pers_lit">
<effect add_color="42 42 42 0"/>
<image texture="session/portraits/ui_portrait_sheet_civ_pers.png"
cell_size="64 64"
size="0 0 100% 100%"
/>
</sprite>
<!--
==========================================
ENTITY SHEET PORTRAITS - ROMANS
==========================================
-->
<sprite name="ui_portrait_sheet_civ_rome">
<image texture="session/portraits/ui_portrait_sheet_civ_rome.png"
cell_size="64 64"
size="0 0 100% 100%"
/>
</sprite>
<sprite name="ui_portrait_sheet_civ_rome_gray">
<effect grayscale=""/>
<image texture="session/portraits/ui_portrait_sheet_civ_rome.png"
cell_size="64 64"
size="0 0 100% 100%"
/>
</sprite>
<sprite name="ui_portrait_sheet_civ_rome_lit">
<effect add_color="42 42 42 0"/>
<image texture="session/portraits/ui_portrait_sheet_civ_rome.png"
cell_size="64 64"
size="0 0 100% 100%"
/>
</sprite>
@ -653,7 +1012,7 @@ NOT YET CONVERTED NOT YET CONVERTED NOT YET CONVERTED NOT YET CONVERTED NOT YET
<image backcolor="212 208 200" size="1 1 100%-1 100%-1" z_level="1" />
</sprite>
<sprite name="grey">
<sprite name="gray">
<image backcolor="243 242 240" size="0 0 100% 100%" />
</sprite>
@ -909,209 +1268,6 @@ NOT YET CONVERTED NOT YET CONVERTED NOT YET CONVERTED NOT YET CONVERTED NOT YET
<image texture="session/icons/ui_icon_sheet_statistic.png" cell_size="64 64" texture_size="0 0 100% 100%" size="0 0 100% 100%"/>
</sprite>
<!--
==========================================
BACKDROP SINGLE PORTRAITS
==========================================
-->
<!-- Default (empty) portrait (circular). -->
<sprite name="ui_portrait_default_circle">
<image texture="session/portraits/ui_portrait_default_circle.png" texture_size="0 0 100% 100%" size="0 0 100% 100%" />
</sprite>
<sprite name="ui_portrait_default_circle_lit">
<effect add_color="42 42 42 0"/>
<image texture="session/portraits/ui_portrait_default_circle.png" texture_size="0 0 100% 100%" size="0 0 100% 100%" />
</sprite>
<sprite name="ui_portrait_default_circle_grey">
<effect grayscale=""/>
<image texture="session/portraits/ui_portrait_default_circle.png" texture_size="0 0 100% 100%" size="0 0 100% 100%" />
</sprite>
<!-- Default (empty) portrait (square). -->
<sprite name="ui_portrait_default_square">
<image texture="session/portraits/ui_portrait_default_square.png" texture_size="0 0 100% 100%" size="0 0 100% 100%" />
</sprite>
<sprite name="ui_portrait_default_square_lit">
<effect add_color="42 42 42 0"/>
<image texture="session/portraits/ui_portrait_default_square.png" texture_size="0 0 100% 100%" size="0 0 100% 100%" />
</sprite>
<sprite name="ui_portrait_default_square_grey">
<effect grayscale=""/>
<image texture="session/portraits/ui_portrait_default_square.png" texture_size="0 0 100% 100%" size="0 0 100% 100%" />
</sprite>
<!--
==========================================
ACTION SHEET PORTRAITS - COMMANDS, TABS, STANCES, FORMATIONS, ETC
==========================================
-->
<sprite name="ui_portrait_sheet_action">
<image texture="session/portraits/ui_portrait_sheet_action.png" cell_size="64 64" texture_size="0 0 100% 100%" size="0 0 100% 100%"/>
</sprite>
<sprite name="ui_portrait_sheet_action_lit">
<effect add_color="42 42 42 0"/>
<image texture="session/portraits/ui_portrait_sheet_action.png" cell_size="64 64" texture_size="0 0 100% 100%" size="0 0 100% 100%"/>
</sprite>
<sprite name="ui_portrait_sheet_action_grey">
<effect grayscale=""/>
<image texture="session/portraits/ui_portrait_sheet_action.png" cell_size="64 64" texture_size="0 0 100% 100%" size="0 0 100% 100%"/>
</sprite>
<!--
==========================================
ENTITY SINGLE PORTRAITS
==========================================
-->
<!-- Pyrogenesis Dude portrait. -->
<sprite name="ui_portrait_unit_dude">
<image texture="session/portraits/ui_portrait_unit_dude.png" texture_size="0 0 100% 100%" size="0 0 100% 100%" />
</sprite>
<sprite name="ui_portrait_unit_dude_lit">
<effect add_color="42 42 42 0"/>
<image texture="session/portraits/ui_portrait_unit_dude.png" texture_size="0 0 100% 100%" size="0 0 100% 100%" />
</sprite>
<sprite name="ui_portrait_unit_dude_grey">
<effect grayscale=""/>
<image texture="session/portraits/ui_portrait_unit_dude.png" texture_size="0 0 100% 100%" size="0 0 100% 100%" />
</sprite>
<!-- Pyrogenesis Dudette portrait. -->
<sprite name="ui_portrait_unit_dudette">
<image texture="session/portraits/ui_portrait_unit_dudette.png" texture_size="0 0 100% 100%" size="0 0 100% 100%" />
</sprite>
<sprite name="ui_portrait_unit_dudette_lit">
<effect add_color="42 42 42 0"/>
<image texture="session/portraits/ui_portrait_unit_dudette.png" texture_size="0 0 100% 100%" size="0 0 100% 100%" />
</sprite>
<sprite name="ui_portrait_unit_dudette_grey">
<effect grayscale=""/>
<image texture="session/portraits/ui_portrait_unit_dudette.png" texture_size="0 0 100% 100%" size="0 0 100% 100%" />
</sprite>
<!-- Deciduous Tree portrait. -->
<sprite name="ui_portrait_flora_deciduotree_gaia">
<image texture="session/portraits/ui_portrait_flora_deciduotree_gaia.png" texture_size="0 0 100% 100%" size="0 0 100% 100%" />
</sprite>
<sprite name="ui_portrait_flora_deciduotree_gaia_lit">
<effect add_color="42 42 42 0"/>
<image texture="session/portraits/ui_portrait_flora_deciduotree_gaia.png" texture_size="0 0 100% 100%" size="0 0 100% 100%" />
</sprite>
<sprite name="ui_portrait_flora_deciduotree_gaia_grey">
<effect grayscale=""/>
<image texture="session/portraits/ui_portrait_flora_deciduotree_gaia.png" texture_size="0 0 100% 100%" size="0 0 100% 100%" />
</sprite>
<!--
==========================================
ENTITY SHEET PORTRAITS - CELTS
==========================================
-->
<sprite name="ui_portrait_sheet_civ_celt">
<image texture="session/portraits/ui_portrait_sheet_civ_celt.png" cell_size="64 64" texture_size="0 0 100% 100%" size="0 0 100% 100%"/>
</sprite>
<sprite name="ui_portrait_sheet_civ_celt_grey">
<effect grayscale=""/>
<image texture="session/portraits/ui_portrait_sheet_civ_celt.png" cell_size="64 64" texture_size="0 0 100% 100%" size="0 0 100% 100%"/>
</sprite>
<sprite name="ui_portrait_sheet_civ_celt_lit">
<effect add_color="42 42 42 0"/>
<image texture="session/portraits/ui_portrait_sheet_civ_celt.png" cell_size="64 64" texture_size="0 0 100% 100%" size="0 0 100% 100%"/>
</sprite>
<!--
==========================================
ENTITY SHEET PORTRAITS - HELLENES
==========================================
-->
<sprite name="ui_portrait_sheet_civ_hele">
<image texture="session/portraits/ui_portrait_sheet_civ_hele.png" cell_size="64 64" texture_size="0 0 100% 100%" size="0 0 100% 100%"/>
</sprite>
<sprite name="ui_portrait_sheet_civ_hele_grey">
<effect grayscale=""/>
<image texture="session/portraits/ui_portrait_sheet_civ_hele.png" cell_size="64 64" texture_size="0 0 100% 100%" size="0 0 100% 100%"/>
</sprite>
<sprite name="ui_portrait_sheet_civ_hele_lit">
<effect add_color="42 42 42 0"/>
<image texture="session/portraits/ui_portrait_sheet_civ_hele.png" cell_size="64 64" texture_size="0 0 100% 100%" size="0 0 100% 100%"/>
</sprite>
<!--
==========================================
ENTITY SHEET PORTRAITS - IBERIANS
==========================================
-->
<sprite name="ui_portrait_sheet_civ_iber">
<image texture="session/portraits/ui_portrait_sheet_civ_iber.png" cell_size="64 64" texture_size="0 0 100% 100%" size="0 0 100% 100%"/>
</sprite>
<sprite name="ui_portrait_sheet_civ_iber_grey">
<effect grayscale=""/>
<image texture="session/portraits/ui_portrait_sheet_civ_iber.png" cell_size="64 64" texture_size="0 0 100% 100%" size="0 0 100% 100%"/>
</sprite>
<sprite name="ui_portrait_sheet_civ_iber_lit">
<effect add_color="42 42 42 0"/>
<image texture="session/portraits/ui_portrait_sheet_civ_iber.png" cell_size="64 64" texture_size="0 0 100% 100%" size="0 0 100% 100%"/>
</sprite>
<!--
==========================================
ENTITY SHEET PORTRAITS - CARTHAGINIANS
==========================================
-->
<sprite name="ui_portrait_sheet_civ_kart">
<image texture="session/portraits/ui_portrait_sheet_civ_kart.png" cell_size="64 64" texture_size="0 0 100% 100%" size="0 0 100% 100%"/>
</sprite>
<sprite name="ui_portrait_sheet_civ_kart_grey">
<effect grayscale=""/>
<image texture="session/portraits/ui_portrait_sheet_civ_kart.png" cell_size="64 64" texture_size="0 0 100% 100%" size="0 0 100% 100%"/>
</sprite>
<sprite name="ui_portrait_sheet_civ_kart_lit">
<effect add_color="42 42 42 0"/>
<image texture="session/portraits/ui_portrait_sheet_civ_kart.png" cell_size="64 64" texture_size="0 0 100% 100%" size="0 0 100% 100%"/>
</sprite>
<!--
==========================================
ENTITY SHEET PORTRAITS - PERSIANS
==========================================
-->
<sprite name="ui_portrait_sheet_civ_pers">
<image texture="session/portraits/ui_portrait_sheet_civ_pers.png" cell_size="64 64" texture_size="0 0 100% 100%" size="0 0 100% 100%"/>
</sprite>
<sprite name="ui_portrait_sheet_civ_pers_grey">
<effect grayscale=""/>
<image texture="session/portraits/ui_portrait_sheet_civ_pers.png" cell_size="64 64" texture_size="0 0 100% 100%" size="0 0 100% 100%"/>
</sprite>
<sprite name="ui_portrait_sheet_civ_pers_lit">
<effect add_color="42 42 42 0"/>
<image texture="session/portraits/ui_portrait_sheet_civ_pers.png" cell_size="64 64" texture_size="0 0 100% 100%" size="0 0 100% 100%"/>
</sprite>
<!--
==========================================
ENTITY SHEET PORTRAITS - ROMANS
==========================================
-->
<sprite name="ui_portrait_sheet_civ_rome">
<image texture="session/portraits/ui_portrait_sheet_civ_rome.png" cell_size="64 64" texture_size="0 0 100% 100%" size="0 0 100% 100%"/>
</sprite>
<sprite name="ui_portrait_sheet_civ_rome_grey">
<effect grayscale=""/>
<image texture="session/portraits/ui_portrait_sheet_civ_rome.png" cell_size="64 64" texture_size="0 0 100% 100%" size="0 0 100% 100%"/>
</sprite>
<sprite name="ui_portrait_sheet_civ_rome_lit">
<effect add_color="42 42 42 0"/>
<image texture="session/portraits/ui_portrait_sheet_civ_rome.png" cell_size="64 64" texture_size="0 0 100% 100%" size="0 0 100% 100%"/>
</sprite>
<!--
==========================================
EDITOR GUI - BACKCOLOR SPRITES
@ -1191,7 +1347,7 @@ NOT YET CONVERTED NOT YET CONVERTED NOT YET CONVERTED NOT YET CONVERTED NOT YET
<image backcolor="255 255 255" size="3 3 100%-3 100%-3"/>
</sprite>
<sprite name="atlas_window_grey">
<sprite name="atlas_window_gray">
<!-- Starting with top left corner continuing in a clockwise manner -->
<!-- Top border -->
<image backcolor="129 134 142" size="0%-3 0%-3 100%+2 0%+1" />

View File

@ -424,8 +424,49 @@
<style name="pgButton"
tooltip_style="pgToolTip"
tooltip=""
/>
<!--
==========================================
- STYLE - UNIQUE - SESSION
==========================================
-->
<style name="snObject"
tooltip_style="snToolTip"
tooltip=""
/>
<style name="snAction"
sprite="ui_portrait_defaultcircle"
sprite_over="ui_portrait_defaultcircle_lit"
sprite_disabled="ui_portrait_defaultcircle_gray"
text_align="right"
textcolor="255 255 255"
tooltip_style="snToolTip"
tooltip="(TBA)"
/>
<style name="snPortrait"
sprite="ui_portrait_default_square"
sprite_over="ui_portrait_default_square_lit"
sprite_disabled="ui_portrait_default_square_Gray"
text_align="right"
textcolor="255 255 255"
tooltip_style="snToolTip"
tooltip="(TBA)"
/>
<style name="snPortraitProgress"
sprite_background=""
sprite_bar="bkTranslucent"
text_align="center"
text_valign="center"
textcolor="255 255 255"
tooltip_style="snToolTip"
tooltip="(TBA)"
/>
<!--
NOT YET CONVERTED NOT YET CONVERTED NOT YET CONVERTED NOT YET CONVERTED NOT YET CONVERTED NOT YET CONVERTED