Idle and Flare buttons on the MiniMap (though I'm currently not sure why they're unclickable).
Started on the surrounding buttons, but unsure if they work or not since the engine is now crashing for me after archive. :( (Modifying a data file while the game is running also causes the game to crash.) Committing some changes anyway. This was SVN commit r3650.
This commit is contained in:
parent
f32388742b
commit
3f95dcb6ba
@ -1,5 +1,3 @@
|
||||
game,Game,
|
||||
diplomacy,Diplomacy,
|
||||
objectives,Objectives,
|
||||
score,Score,
|
||||
chat,Chat,
|
||||
|
@ -1,7 +1,6 @@
|
||||
flare,Flare,
|
||||
friendorfoe,Friend or Foe,
|
||||
cycleobjects,Cycle Objects,
|
||||
score,Score,
|
||||
chat,Chat,
|
||||
terrain,Terrain,
|
||||
territories,Territories,
|
||||
friendorfoe,FriendorFoe,
|
||||
economic,Economic,
|
||||
military,Military,
|
||||
resources,Resources,
|
||||
territories,Territories,
|
@ -0,0 +1,2 @@
|
||||
economic,Economic,
|
||||
resources,Resources,
|
@ -88,23 +88,23 @@
|
||||
addCrds (this.name, 100, 100, 0, 0, 192, 192);
|
||||
]]></action>
|
||||
|
||||
<object name="snMiniMapButtonGroup"
|
||||
<object name="snMiniMapButtonGroup" ghost="false"
|
||||
>
|
||||
<object name="snMiniMapButtonArc_Up" style="snMiniMapArcUp" type="button"
|
||||
>
|
||||
<action on="Load"><![CDATA[
|
||||
addCrds (this.name, 0, 0, 10, 30, 30, 60);
|
||||
addCrds (this.name, 0, 0, 6, 32, 40, 80);
|
||||
]]></action>
|
||||
</object>
|
||||
<object name="snMiniMapButtonArc_Left" style="snMiniMapArcLeft" type="button"
|
||||
>
|
||||
<action on="Load"><![CDATA[
|
||||
addCrds (this.name, 0, 0, 30, 10, 60, 30);
|
||||
addCrds (this.name, 0, 0, 32, 6, 80, 40);
|
||||
]]></action>
|
||||
</object>
|
||||
<object name="snMiniMapButtonTop_1" style="snStat" type="button" />
|
||||
<object name="snMiniMapButtonTop_2" style="snStat" type="button" />
|
||||
<object name="snMiniMapButtonTop_3" style="snStat" type="button"
|
||||
<object name="snMiniMapButtonUp_1" style="snStat" type="button" />
|
||||
<object name="snMiniMapButtonUp_2" style="snStat" type="button" />
|
||||
<object name="snMiniMapButtonUp_3" style="snStat" type="button"
|
||||
>
|
||||
<action on="Load"><![CDATA[
|
||||
// Seek through this group of buttons (determining length from last object's name).
|
||||
@ -113,13 +113,48 @@
|
||||
{
|
||||
tempName = this.name.substring (0, this.name.lastIndexOf ("_")+1) + loop;
|
||||
// Set size/position.
|
||||
addCrds (tempName,
|
||||
100, 100, 0,
|
||||
getCrd ("snMiniMapButtonArc_Up").coord[rb].y+(getCrd ("snMiniMapButtonArc_Up").coord[rb].height/max)*(loop-1),
|
||||
getCrd ("snMiniMapButtonArc_Up").coord[rb].width,
|
||||
getCrd ("snMiniMapButtonArc_Up").coord[rb].height/max);
|
||||
if (loop == 1)
|
||||
{
|
||||
currCrd = getCrd ("snMiniMapBorder");
|
||||
addCrds (tempName,
|
||||
100, 100,
|
||||
0,
|
||||
currCrd.coord[rb].y,
|
||||
40,
|
||||
40);
|
||||
}
|
||||
else
|
||||
{
|
||||
currCrd = getCrd (this.name.substring (0, this.name.lastIndexOf ("_")+1) + (loop - 1));
|
||||
addCrds (tempName,
|
||||
100, 100,
|
||||
0,
|
||||
currCrd.coord[rb].y+currCrd.coord[rb].height,
|
||||
currCrd.coord[rb].width,
|
||||
currCrd.coord[rb].height);
|
||||
}
|
||||
// Set object properties.
|
||||
tempObject = getGUIObjectByName (tempName);
|
||||
switch (loop)
|
||||
{
|
||||
case 1:
|
||||
tempObject.cell_id = cellGroup["MiniMap"]["territories"].id;
|
||||
break;
|
||||
case 2:
|
||||
tempObject.cell_id = cellGroup["MiniMap"]["terrain"].id;
|
||||
break;
|
||||
case 3:
|
||||
tempObject.cell_id = cellGroup["MiniMap"]["chat"].id;
|
||||
break;
|
||||
default:
|
||||
break;
|
||||
}
|
||||
tempObject.sprite = "snIconSheetMiniMapButton";
|
||||
tempObject.sprite_over = "snIconSheetMiniMapButtonOver";
|
||||
tempObject.sprite_disabled = "snIconSheetMiniMapButtonDisabled";
|
||||
// Set tooltip.
|
||||
getGUIObjectByName (tempName).tooltip = "This button doesn't do anything ... yet.";
|
||||
tempObject.tooltip = "This button doesn't do anything ... yet.";
|
||||
|
||||
}
|
||||
]]></action>
|
||||
</object>
|
||||
|
@ -420,13 +420,17 @@ function refreshCommandButtons()
|
||||
}
|
||||
|
||||
// Update Barter. (Tab button, persistent buttons, click them to do things.)
|
||||
updateTab ("barter", "production", "", "selection[0].actions.barter.list");
|
||||
updateTab ("barter", "production", "Tab", "selection[0].actions.barter.list");
|
||||
// Update Allegiance. (Tab button, persistent buttons (though unit will be lost as soon as option selected), click them to do things.)
|
||||
tempArray = new Array ("player1", "player2", "player3", "player4", "kill");
|
||||
updateTab ("allegiance", "production", "Tab", "tempArray");
|
||||
|
||||
// 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");
|
||||
updateTab ("weapon", "pick", "", "selection[0].actions.attack", "selection[0].actions.attack.curr");
|
||||
|
||||
// Update research. (Tab button, persistent buttons, click them to do things.)
|
||||
updateTab ("research", "production", "", "selection[0].actions.create.list.research", "");
|
||||
@ -443,7 +447,6 @@ function refreshCommandButtons()
|
||||
updateTab ("explore", "command", "", "selection[0].actions.explore", "");
|
||||
updateTab ("retreat", "command", "", "selection[0].actions.retreat", "");
|
||||
updateTab ("stop", "command", "", "selection[0].actions.stop", "");
|
||||
updateTab ("kill", "command", "", "", "");
|
||||
|
||||
// End of commands. Store end position.
|
||||
commandCounter = tabCounter;
|
||||
|
@ -219,9 +219,14 @@ function validProperty (propertyName)
|
||||
// Accepts a string representing an entity property (eg "selection[0].traits.id.generic")
|
||||
// and checks if all the elements (selection[0].traits, selection[0].traits.id, etc) are valid properties.
|
||||
// Returns false if any invalids are found. Returns true if the whole property is valid.
|
||||
|
||||
console.write (propertyName);
|
||||
|
||||
// An empty string is always successful.
|
||||
if (propertyName == "") return true;
|
||||
|
||||
// An undefined string is always unsuccessful.
|
||||
if (propertyName == undefined) return false;
|
||||
|
||||
// Store elements of the property as an array of strings.
|
||||
splitArray = propertyName.toString().split (".");
|
||||
|
@ -875,18 +875,27 @@
|
||||
<image texture="session/icons/bkg/arc_left.dds"
|
||||
size="0 0 100% 100%"
|
||||
/>
|
||||
<image texture="session/icons/single/idle.dds"
|
||||
size="0 0 100% 100%"
|
||||
/>
|
||||
</sprite>
|
||||
<sprite name="snIconArcLeftOver">
|
||||
<effect add_color="42 42 42 0"/>
|
||||
<image texture="session/icons/bkg/arc_left.dds"
|
||||
size="0 0 100% 100%"
|
||||
/>
|
||||
<image texture="session/icons/single/idle.dds"
|
||||
size="0 0 100% 100%"
|
||||
/>
|
||||
</sprite>
|
||||
<sprite name="snIconArcLeftDisabled">
|
||||
<effect grayscale=""/>
|
||||
<image texture="session/icons/bkg/arc_left.dds"
|
||||
size="0 0 100% 100%"
|
||||
/>
|
||||
<image texture="session/icons/single/idle.dds"
|
||||
size="0 0 100% 100%"
|
||||
/>
|
||||
</sprite>
|
||||
|
||||
<!-- Arc Up (minimap left). -->
|
||||
@ -894,18 +903,27 @@
|
||||
<image texture="session/icons/bkg/arc_up.dds"
|
||||
size="0 0 100% 100%"
|
||||
/>
|
||||
<image texture="session/icons/single/flare.dds"
|
||||
size="0 0 100% 100%"
|
||||
/>
|
||||
</sprite>
|
||||
<sprite name="snIconArcUpOver">
|
||||
<effect add_color="42 42 42 0"/>
|
||||
<image texture="session/icons/bkg/arc_up.dds"
|
||||
size="0 0 100% 100%"
|
||||
/>
|
||||
<image texture="session/icons/single/flare.dds"
|
||||
size="0 0 100% 100%"
|
||||
/>
|
||||
</sprite>
|
||||
<sprite name="snIconArcUpDisabled">
|
||||
<effect grayscale=""/>
|
||||
<image texture="session/icons/bkg/arc_up.dds"
|
||||
size="0 0 100% 100%"
|
||||
/>
|
||||
<image texture="session/icons/single/flare.dds"
|
||||
size="0 0 100% 100%"
|
||||
/>
|
||||
</sprite>
|
||||
|
||||
<!--
|
||||
|
@ -534,6 +534,7 @@
|
||||
sprite_over="snIconArcLeftOver"
|
||||
sprite_disabled="snIconArcLeftDisabled"
|
||||
tooltip_style="snToolTip"
|
||||
ghost="false"
|
||||
/>
|
||||
|
||||
<style name="snMiniMapArcUp"
|
||||
@ -541,6 +542,7 @@
|
||||
sprite_over="snIconArcUpOver"
|
||||
sprite_disabled="snIconArcUpDisabled"
|
||||
tooltip_style="snToolTip"
|
||||
ghost="false"
|
||||
/>
|
||||
|
||||
<style name="snGreenBar"
|
||||
|
Loading…
Reference in New Issue
Block a user