1
0
forked from 0ad/0ad

Deleted the GUI folders for Stuart on his request in order to allow him to commit his new code to a clean base.

This was SVN commit r2551.
This commit is contained in:
Fire Giant 2005-07-27 00:47:08 +00:00
parent 973c853672
commit d789b86b37
45 changed files with 0 additions and 9967 deletions

View File

@ -1,203 +0,0 @@
<!--
Types
-->
<!ENTITY % bool "(true|false)">
<!ENTITY % align "(left|center|right)">
<!ENTITY % valign "(top|center|bottom)">
<!--
Defines
-->
<!ENTITY % unique_settings
"name CDATA #IMPLIED
type CDATA 'empty'
style CDATA #IMPLIED"
>
<!ENTITY % base_settings
"absolute %bool; #IMPLIED
enabled %bool; #IMPLIED
ghost %bool; #IMPLIED
hidden %bool; #IMPLIED
size CDATA #IMPLIED
z CDATA #IMPLIED"
>
<!-- Defaults are not put in here, because it ruins the concept of styles -->
<!ENTITY % ex_settings
"buffer_zone CDATA #IMPLIED
button_width CDATA #IMPLIED
checked %bool; #IMPLIED
dropdown_size CDATA #IMPLIED
dropdown_buffer CDATA #IMPLIED
font CDATA #IMPLIED
fov_wedge_color CDATA #IMPLIED
hotkey CDATA #IMPLIED
cell_id CDATA #IMPLIED
input_initvalue_destroyed_at_focus %bool; #IMPLIED
max_length CDATA #IMPLIED
multiline %bool; #IMPLIED
rectcolor_selected CDATA #IMPLIED
scrollbar %bool; #IMPLIED
scrollbar_style CDATA #IMPLIED
sprite CDATA #IMPLIED
sprite2 CDATA #IMPLIED
sprite_bar CDATA #IMPLIED
sprite_background CDATA #IMPLIED
sprite_disabled CDATA #IMPLIED
sprite_list CDATA #IMPLIED
sprite2_disabled CDATA #IMPLIED
sprite_over CDATA #IMPLIED
sprite2_over CDATA #IMPLIED
sprite_pressed CDATA #IMPLIED
sprite2_pressed CDATA #IMPLIED
sprite_selectarea CDATA #IMPLIED
square_side CDATA #IMPLIED
textcolor CDATA #IMPLIED
textcolor_disabled CDATA #IMPLIED
textcolor_over CDATA #IMPLIED
textcolor_pressed CDATA #IMPLIED
textcolor_selected CDATA #IMPLIED
text_align %align; #IMPLIED
text_valign %valign; #IMPLIED
tooltip CDATA #IMPLIED
tooltip_style CDATA #IMPLIED"
>
<!--
<objects>
-->
<!ELEMENT objects (script|object)*>
<!ELEMENT script (#PCDATA)>
<!ATTLIST script
file CDATA #IMPLIED
>
<!ELEMENT object (#PCDATA|object|action|item)*> <!-- 'item' is used by "list" and "dropdown" -->
<!ATTLIST object
%unique_settings;
%base_settings;
%ex_settings;
>
<!ELEMENT action (#PCDATA)>
<!ATTLIST action
on CDATA #REQUIRED
file CDATA #IMPLIED
>
<!ELEMENT item (#PCDATA)>
<!ATTLIST item
enabled %bool; #IMPLIED
>
<!--
<styles>
-->
<!ELEMENT styles (style*)>
<!ELEMENT style EMPTY>
<!ATTLIST style
name CDATA #REQUIRED
%base_settings;
%ex_settings;
>
<!--
<setup>
-->
<!ELEMENT setup (icon|scrollbar|tooltip|color)*>
<!ELEMENT scrollbar EMPTY>
<!ELEMENT icon EMPTY>
<!ELEMENT tooltip EMPTY>
<!ELEMENT color (#PCDATA)>
<!--
<scrollbar>
-->
<!ATTLIST scrollbar
name CDATA #REQUIRED
width CDATA #IMPLIED
scroll_wheel %bool; #IMPLIED
alwaysshown %bool; #IMPLIED
scroll_speed CDATA #IMPLIED
sprite_button_top CDATA #IMPLIED
sprite_button_top_pressed CDATA #IMPLIED
sprite_button_top_disabled CDATA #IMPLIED
sprite_button_top_over CDATA #IMPLIED
sprite_button_bottom CDATA #IMPLIED
sprite_button_bottom_pressed CDATA #IMPLIED
sprite_button_bottom_disabled CDATA #IMPLIED
sprite_button_bottom_over CDATA #IMPLIED
sprite_bar_vertical CDATA #IMPLIED
sprite_bar_vertical_over CDATA #IMPLIED
sprite_bar_vertical_pressed CDATA #IMPLIED
sprite_back_vertical CDATA #IMPLIED
minimum_bar_size CDATA #IMPLIED
>
<!--
<icon>
-->
<!ATTLIST icon
name CDATA #REQUIRED
size CDATA #REQUIRED
sprite CDATA #REQUIRED
cell_id CDATA #IMPLIED
>
<!--
<tooltip>
-->
<!ATTLIST tooltip
name CDATA #REQUIRED
sprite CDATA #IMPLIED
anchor CDATA #IMPLIED
buffer_zone CDATA #IMPLIED
font CDATA #IMPLIED
maxwidth CDATA #IMPLIED
offset CDATA #IMPLIED
textcolor CDATA #IMPLIED
delay CDATA #IMPLIED
use_object CDATA #IMPLIED
hide_object CDATA #IMPLIED
>
<!--
<color>
-->
<!ATTLIST color
name CDATA #REQUIRED
>
<!--
<sprites>
-->
<!ELEMENT sprites (sprite*)>
<!ELEMENT sprite (effect?,image+)>
<!ELEMENT image (effect?)>
<!ELEMENT effect EMPTY>
<!ATTLIST sprite
name CDATA #REQUIRED
>
<!ATTLIST image
texture CDATA #IMPLIED
size CDATA #IMPLIED
texture_size CDATA #IMPLIED
real_texture_placement CDATA #IMPLIED
cell_size CDATA #IMPLIED
backcolor CDATA #IMPLIED
bordercolor CDATA #IMPLIED
border %bool; #IMPLIED
z_level CDATA #IMPLIED
>
<!ATTLIST effect
add_color CDATA #IMPLIED
multiply_color CDATA #IMPLIED
grayscale CDATA #IMPLIED
>

View File

@ -1,108 +0,0 @@
<?xml version="1.0" encoding="iso-8859-1" standalone="no" ?>
<!DOCTYPE objects SYSTEM "../gui.dtd">
<objects>
<!--
==========================================
- SCRIPT DECLARATIONS -
==========================================
-->
<script file="gui/test/functions_utility_coord.js"><![CDATA[
]]></script>
<script file="gui/test/functions_utility_object.js"><![CDATA[
]]></script>
<script file="gui/test/functions_utility_entity.js"><![CDATA[
]]></script>
<script file="gui/test/functions_utility_animation.js"><![CDATA[
]]></script>
<script file="gui/test/functions_utility_debug.js"><![CDATA[
]]></script>
<script file="gui/test/functions_utility_music.js"><![CDATA[
]]></script>
<script file="gui/test/functions_utility_test.js"><![CDATA[
]]></script>
<script file="gui/test/functions_utility_list.js"><![CDATA[
]]></script>
<script file="gui/test/functions_utility.js"><![CDATA[
]]></script>
<script file="gui/test/functions_global.js"><![CDATA[
]]></script>
<script file="gui/test/functions_pregame_cpn.js"><![CDATA[
]]></script>
<script file="gui/test/functions_pregame_mp.js"><![CDATA[
]]></script>
<script file="gui/test/functions_pregame_sp.js"><![CDATA[
]]></script>
<script file="gui/test/functions_pregame_options.js"><![CDATA[
]]></script>
<script file="gui/test/functions_pregame_history.js"><![CDATA[
]]></script>
<script file="gui/test/functions_pregame_load.js"><![CDATA[
]]></script>
<script file="gui/test/functions_pregame.js"><![CDATA[
]]></script>
<script file="gui/test/functions_atlas_map_creator.js"><![CDATA[
]]></script>
<script file="gui/test/functions_atlas_terrain_editor.js"><![CDATA[
]]></script>
<script file="gui/test/functions_atlas_object_editor.js"><![CDATA[
]]></script>
<script file="gui/test/functions_atlas.js"><![CDATA[
]]></script>
<script file="gui/test/functions_session_group_pane.js"><![CDATA[
]]></script>
<script file="gui/test/functions_session_resource_pool.js"><![CDATA[
]]></script>
<script file="gui/test/functions_session_status_orb.js"><![CDATA[
]]></script>
<script file="gui/test/functions_session_map_orb.js"><![CDATA[
]]></script>
<script file="gui/test/functions_session_team_tray.js"><![CDATA[
]]></script>
<script file="gui/test/functions_session_subwindows.js"><![CDATA[
]]></script>
<script file="gui/test/functions_session_subwindow_manual.js"><![CDATA[
]]></script>
<script file="gui/test/functions_session_subwindow_jukebox.js"><![CDATA[
]]></script>
<script file="gui/test/functions_session.js"><![CDATA[
initCoord();
initGlobal();
initPreGame();
initSession();
initAtlas();
]]></script>
</objects>

View File

@ -1,776 +0,0 @@
<?xml version="1.0" encoding="iso-8859-1" standalone="no" ?>
<!DOCTYPE objects SYSTEM "../gui.dtd">
<objects>
<!--
==========================================
- MAIN MENU - "COMMANDER'S TENT" BACKDROP
==========================================
-->
<object name="pregame_gui"
style="default"
type="image"
sprite="pregame_mainmenu_background"
>
<action on="Load"><![CDATA[
// Play main 0 A.D. theme when the main menu starts.
curr_music = newRandomSound("music", "menu");
curr_music.loop();
// Display a .cfg file variable to prove we can access it.
console.write ("Language Version: " + (new ConfigDB()).system.language + ".")
// Unfortunately, although Philip's workaround certainly works,
// a] The value cannot be modified.
// b] Variables a step up in the hierarchy are not recognised (eg system.sound.mastergain).
]]></action>
<!--
==========================================
- MAIN MENU - PARCHMENT BUTTONS
==========================================
-->
<object name="pregame_mainmenu_sp_button"
style="pregame_mainmenu_button"
type="button"
size="51.2695312% 10.9275% 76.2695312% 44.270833%"
sprite_over="pregame_mainmenu_singleplayer"
tooltip="Want to move some Dudes around or test something? Click here to start a new game on the default map."
>
<action on="Press"><![CDATA[
// Open Skirmish Map Selection Window.
openMainMenuSubWindow ("pregame_sp_mapsel");
]]></action>
</object>
<object name="pregame_mainmenu_mp_button"
style="pregame_mainmenu_button"
type="button"
size="57.5195312% 38.28125% 82.5195312% 71.6145833%"
sprite_over="pregame_mainmenu_multiplayer"
tooltip="Tired of playing with yourself? Fight against one or more human players in a multiplayer game."
>
<action on="Press"><![CDATA[
// Open Multiplayer connection window.
openMainMenuSubWindow ("pregame_mp_modesel");
]]></action>
</object>
<object name="pregame_mainmenu_ed_button"
style="pregame_mainmenu_button"
type="button"
size="40.234375% 60.15625% 65.234375% 93.4895833%"
sprite_over="pregame_mainmenu_editor"
tooltip="Come forth and witness a totally non-functioning Editor, a mere shadow of its potential self!"
>
<action on="Press"><![CDATA[
// Open Atlas Editor.
// *** Defunct; use this button to toggle the wxWidgets Atlas UI.
guiHide ("pregame_gui");
guiUnHide ("atlas_gui");
]]></action>
</object>
<object name="pregame_mainmenu_op_button"
style="pregame_mainmenu_button"
type="button"
size="74.7070312% 42.0572916% 99.7070312% 75.390625%"
sprite_over="pregame_mainmenu_options"
tooltip="This will take you to the options menu. It does not work now, but someday it might."
>
</object>
<object name="pregame_mainmenu_cp_button"
style="pregame_mainmenu_button"
type="button"
size="24.609375% 28.90625% 49.609375% 62.2395833%"
sprite_over="pregame_mainmenu_campaigns"
tooltip="Want to play a campaign? Tough luck buddy! That's right, go cry on your mammas shoulder."
>
</object>
<object name="pregame_mainmenu_hs_button"
style="pregame_mainmenu_button"
type="button"
size="72.265625% 66.5364583% 97.265625% 99.8697916%"
sprite_over="pregame_mainmenu_history"
tooltip="One day you will click this button and learn more about ancient history than any history teach ever taught you."
>
</object>
<!--
==========================================
- MAIN MENU - GAME LOGO AND VERSION NUMBER
==========================================
-->
<object name="pregame_mainmenu_0ad_logo"
type="image"
ghost="true"
size="21.1914062% 3.125% 68.0664062% 31.5104166%"
sprite="pregame_mainmenu_0ad_logo"
/>
<object name="pregame_mainmenu_versionnumber"
style="fancyTextHeadGold"
type="text"
ghost="true"
size="43% 24% 43%+282 24%+25"
>
<action on="Load"><![CDATA[
this.caption = "Build: " + buildTime(0) + " " + getLanguageID();
]]></action>
</object>
<!--
==========================================
- MAIN MENU - COMPANY LOGO
==========================================
-->
<object name="pregame_mainmenu_wfg_logo"
style="pregame_mainmenu_button"
type="button"
size="10 91.666666%-30 25.9765% 100%-30"
sprite="pregame_mainmenu_wfg_logo"
tooltip="These are the guys who made this game. Visit them at http://www.wildfiregames.com/0ad/"
>
<action on="Press"><![CDATA[
btCode = new Array("guiHide('mb_main');");
messageBox(420, 420, "[icon=0ad_icon] A.D. - History Is Yours For The Taking\nby Wildfire Games, 2002-2005\n\nVersion 0.1.2 (PASAP II)\n\n" +
"This is a confidental pre-release version of the game!\n\nVisit http://www.wildfiregames.com/0ad/ " +
"to learn more about [icon=0ad_icon] A.D., participate in the community and meet the developers.\n\n", "About [icon=0ad_icon] A.D.", 2, new Array(), btCode);
]]></action>
</object>
<!--
==========================================
- MAIN MENU - STATIC TOOLTIP WINDOW
==========================================
-->
<object name="pregame_mainmenu_tooltip"
style="fancyTextHeadWhite"
type="text"
hidden="true"
sprite="pregame_mainmenu_tooltip_background"
size="69% 6.3802% 97.0703125% 28.125%"
>tooltipText
</object>
<!--
==========================================
- MAIN MENU - EXIT BUTTON
==========================================
-->
<object name="exit_button"
style="pregame_mainmenu_checkbox"
type="button"
size="100%-18 2 100%-2 18"
tooltip="Tired of 0 A.D. ? Click here to leave and reenter the real world."
>
<action on="Press"><![CDATA[
btCaptions = new Array("Yes, let me out!", "Nooooo!");
btCode = new Array("exit();", "");
messageBox(400, 200, "Do you really want to quit [icon=0ad_icon] A.D.? This will cause a sudden return to reality.", "Confirmation", 0, btCaptions, btCode);
]]></action>
</object>
</object>
<!--
==========================================
- MAIN MENU - BACKGROUND MASK
==========================================
-->
<object name="pregame_subwindow_bkg"
type="image"
z="90"
hidden="true"
sprite="translucent_background"
>
<!--
===============================================
- MULTIPLAYER MODE SELECTION SCREEN -
===============================================
-->
<object name="pregame_mp_modesel"
style="0ad_window"
type="image"
hidden="true"
size="50%-200 50%-90 50%+200 50%+90"
>
<object name="pregame_mp_modesel_titlebar"
style="0ad_window_titlebar"
type="button"
>Multiplayer
</object>
<object name="pregame_mp_modesel_exit_button"
style="0ad_window_checkbox"
type="button"
>
<action on="Press"><![CDATA[
closeMainMenuSubWindow ("pregame_mp_modesel");
]]></action>
</object>
<!--
==========================================
- MAIN MENU - PLAYER NAME CONTROLS
==========================================
-->
<object name="pregame_mp_modesel_txt1"
type="text"
size="0 0 400 30"
>Please enter the Player name you would like to use during the game.
</object>
<object name="pregame_mp_modesel_playername_txt"
type="text"
size="0 40 200 60"
>Player Name (temporary):
</object>
<object name="pregame_mp_modesel_playername"
style="border_box_black"
type="input"
size="220 40 350 60"
>Player
</object>
<object name="pregame_mp_modesel_divider1"
style="border_box_black"
type="image"
size="10 80 100%-10 80"
/>
<!--
==========================================
- MAIN MENU - HOST / JOIN CONTROLS
==========================================
-->
<object name="pregame_mp_modesel_txt"
type="text"
size="0 100 400 120"
>Please select whether you want to join a game or host your own game.
</object>
<object name="pregame_mp_modesel_hostjoin_txt"
style="wheatTextHeadBlack"
type="text"
size="0 140 200 170"
text_valign="center"
>Game Mode
</object>
<object name="pregame_mp_modesel_join_button"
style="0ad_window_button"
type="button"
size="130 140 230 170"
>Join Game
<action on="Press"><![CDATA[
// rudimentary client connection code; finally working now :)
guiSwitch ("pregame_mp_modesel", "pregame_mp_join");
]]></action>
</object>
<!-- (need code for the game start procedure here) -->
<object name="pregame_mp_modesel_host_button"
style="0ad_window_button"
type="button"
size="250 140 350 170"
>Host Game
<action on="Press"><![CDATA[
guiSwitch ("pregame_mp_modesel", "pregame_mp_host");
]]></action>
</object>
</object>
<!--
===============================================
- MULTIPLAYER HOST GAME SCREEN -
===============================================
-->
<object name="pregame_mp_host"
style="0ad_window"
type="image"
hidden="true"
size="50%-190 50%-120 50%+190 50%+120"
>
<object name="pregame_mp_host_titlebar"
style="0ad_window_titlebar"
type="button"
>Host a game
</object>
<object name="pregame_mp_host_exit_button"
style="0ad_window_checkbox"
type="button"
>
<action on="Press"><![CDATA[
closeMainMenuSubWindow ("pregame_mp_host");
]]></action>
</object>
<!--
==========================================
- MAIN MENU - SERVER/GAME NAME CONTROLS
==========================================
-->
<object name="pregame_mp_host_txt1"
type="text"
size="0 0 400 30"
>Setting up your server.
</object>
<object name="pregame_mp_host_gamename_txt"
style="wheatTextHeadBlack"
type="text"
size="0 40 200 60"
>Game (Server) Name:
</object>
<object name="pregame_mp_host_gamename"
style="border_box_black"
type="input"
size="220 40 370 60"
>My Game
</object>
<!--
==========================================
- MAIN MENU - WELCOME MESSAGE CONTROLS
==========================================
-->
<object name="pregame_mp_host_welcomemsg_txt"
style="wheatTextHeadBlack"
type="text"
size="0 70 200 90"
>Welcome Message:
</object>
<object name="pregame_mp_host_txt2"
type="text"
size="0 100 200 180"
>You can enter some message which is displayed to new players upon joining here.
</object>
<object name="pregame_mp_host_welcomemsg"
style="border_box_black_verdana9"
type="input"
size="220 70 370 180"
>Uhm, welcome to my game. Have fun!
</object>
<!--
==========================================
- MAIN MENU - CONTINUE / BACK CONTROLS
==========================================
-->
<object name="pregame_mp_host_setup_button"
style="0ad_window_button"
type="button"
size="50%-125 200 50%-25 230"
>Continue
<action on="Press"><![CDATA[
//initMPSessionHost();
console.write("initMPSessionHost() was supposed to be called here.");
]]></action>
</object>
<object name="pregame_mp_host_back_button"
style="0ad_window_button"
type="button"
size="50%+25 200 50%+125 230"
>Back
<action on="Press"><![CDATA[
guiSwitch ("pregame_mp_host", "pregame_mp_modesel");
]]></action>
</object>
</object>
<!--
===============================================
- MULTIPLAYER JOIN GAME SCREEN -
===============================================
-->
<object name="pregame_mp_join"
style="0ad_window"
type="image"
hidden="true"
size="50%-190 50%-120 50%+190 50%+120"
>
<object name="pregame_mp_join_titlebar"
style="0ad_window_titlebar"
type="button"
>Join a game
</object>
<object name="pregame_mp_join_exit_button"
style="0ad_window_checkbox"
type="button"
>
<action on="Press"><![CDATA[
closeMainMenuSubWindow ("pregame_mp_join");
]]></action>
</object>
<!--
==========================================
- MAIN MENU - SERVER NAME / IP CONTROLS
==========================================
-->
<object name="pregame_mp_join_txt1"
type="text"
size="0 0 400 30"
>Joining an existing game.
</object>
<object name="pregame_mp_join_serverip_txt"
style="wheatTextHeadBlack"
type="text"
size="0 40 200 60"
>Server Hostname or IP:
</object>
<object name="pregame_mp_join_serverip"
style="border_box_black"
type="input"
size="220 40 370 60"
>127.0.0.1
</object>
<!--
==========================================
- MAIN MENU - CONTINUE / BACK CONTROLS
==========================================
-->
<object name="pregame_mp_join_setup_button"
style="0ad_window_button"
type="button"
size="50%-125 200 50%-25 230"
>Continue
<action on="Press"><![CDATA[
// creating the client instance
client = createClient();
client.playerName=getGUIObjectByName("pregame_mp_modesel_playername").caption;
// we've got a fixed IP (bound to localhost) here for testing purposes
// success = client.beginConnect("127.0.0.1");
ipAddress = getGUIObjectByName("pregame_mp_join_serverip").caption;
success = client.beginConnect(ipAddress);
if (!success) {
// need proper message box code here later
console.write ("Failed to connect to server. Please check the network connection.");
}
else
{
// see above
console.write ("Client successfully started to connect.");
}
client.onConnectComplete=function (event) {
messageBox(400, 200, "Result message: "+event.message, "Connect complete", 2, new Array(), new Array());
};
]]></action>
</object>
<object name="pregame_mp_join_back_button"
style="0ad_window_button"
type="button"
size="50%+25 200 50%+125 230"
>Back
<action on="Press"><![CDATA[
guiSwitch ("pregame_mp_join", "pregame_mp_modesel");
]]></action>
</object>
</object>
<!--
===============================================
- MULTIPLAYER SESSION SETUP SCREEN -
===============================================
-->
<object name="pregame_mp_setup_host"
style="0ad_window"
type="image"
hidden="true"
size="50%-400 50%-300 50%+400 50%+300"
>
<object name="pregame_mp_setup_host_titlebar"
style="0ad_window_titlebar"
type="button"
>
</object>
<object name="pregame_mp_setup_host_exit_button"
style="0ad_window_checkbox"
type="button"
tooltip_style="session_tooltip"
>
<action on="Press"><![CDATA[
closeMainMenuSubWindow ("pregame_mp_setup_host");
guiUnHide ("pregame_mainmenu_versionnumber");
]]></action>
</object>
<!--
==========================================
- MAIN MENU - PLAYER SLOTS
==========================================
-->
<object name="pregame_mp_setup_host_playerhead"
style="wheatTextHeadMaxBlack"
type="text"
size="30 10 320 40"
>Player Slots
</object>
<object name="pregame_mp_setup_host_p1_txt"
style="wheatTextHeadBlack"
type="text"
size="30 50 320 80"
>
</object>
<object name="pregame_mp_setup_host_p2_txt"
style="wheatTextHeadBlack"
type="text"
size="30 90 320 120"
>
<action on="Load"><![CDATA[
this.caption = "P2: Open";
]]></action>
</object>
<object name="pregame_mp_setup_host_p3_txt"
style="wheatTextHeadBlack"
type="text"
size="30 130 320 160"
>
<action on="Load"><![CDATA[
this.caption = "P3: Open";
]]></action>
</object>
<object name="pregame_mp_setup_host_p4_txt"
style="wheatTextHeadBlack"
type="text"
size="30 170 320 200"
>
<action on="Load"><![CDATA[
this.caption = "P4: Open";
]]></action>
</object>
<object name="pregame_mp_setup_host_p5_txt"
style="wheatTextHeadBlack"
type="text"
size="30 210 320 240"
>
<action on="Load"><![CDATA[
this.caption = "P5: Open";
]]></action>
</object>
<object name="pregame_mp_setup_host_p6_txt"
style="wheatTextHeadBlack"
type="text"
size="30 250 320 280"
>
<action on="Load"><![CDATA[
this.caption = "P6: Open";
]]></action>
</object>
<object name="pregame_mp_setup_host_p7_txt"
style="wheatTextHeadBlack"
type="text"
size="30 290 320 320"
>
<action on="Load"><![CDATA[
this.caption = "P7: Open";
]]></action>
</object>
<object name="pregame_mp_setup_host_p8_txt"
style="wheatTextHeadBlack"
type="text"
size="30 330 320 360"
>
<action on="Load"><![CDATA[
this.caption = "P8: Open";
]]></action>
</object>
<!--
==========================================
- MAIN MENU - MAP NAME CONTROLS (TEMPORARY)
==========================================
-->
<object name="pregame_mp_setup_host_mapname_txt"
type="text"
size="400 32 590 52"
>Map name:
</object>
<object name="pregame_mp_setup_host_mapname"
style="border_box_black"
type="input"
size="600 32 750 52"
>gathertest2
</object>
<!--
==========================================
- MAIN MENU - BUTTONS
==========================================
-->
<object name="pregame_mp_setup_start_button"
style="0ad_window_button"
type="button"
size="50%-125 540 50%-25 570"
>Start!
<action on="Press"><![CDATA[
StartMap (getGUIObjectByName("pregame_mp_setup_host_mapname").caption,
"pregame_mp_setup_host", 1);
]]></action>
</object>
<object name="pregame_mp_setup_host_cancel_button"
style="0ad_window_button"
type="button"
size="50%+25 540 50%+125 570"
>Cancel
<action on="Press"><![CDATA[
// terminate the multiplayer server session
endGame();
guiSwitch ("pregame_mp_setup_host", "pregame_mp_modesel");
]]></action>
</object>
</object>
<!-- (Insert rewritten SESSION SETUP SCREEN here (in two variants: HOST and JOIN)) -->
<!--
===============================================
- SINGLEPLAYER TEMPORARY MAP SELECTION DIALOG -
===============================================
-->
<object name="pregame_sp_mapsel"
style="0ad_window"
type="image"
hidden="true"
size="50%-150 50%-120 50%+150 50%+120"
>
<!-- The placement of this titlebar object is VERY hackish (see y-placement), but it doesn't work any other way so far, and this dialog will be temporary anyway -->
<object name="pregame_sp_mapsel_titlebar"
style="0ad_window_titlebar"
type="button"
>Map selection
</object>
<object name="pregame_sp_mapsel_exit_button"
style="0ad_window_checkbox"
type="button"
>
<action on="Press"><![CDATA[
closeMainMenuSubWindow ("pregame_sp_mapsel");
]]></action>
</object>
<!--
==========================================
- MAIN MENU - MAP SELECTION
==========================================
-->
<object name="pregame_sp_infotext"
type="text"
size="10 10 290 60"
>Type the name of the map you want to start into the box. The name is relative to /data/mods/official/maps/scenarios/.
</object>
<object name="pregame_sp_mapname_txt"
type="text"
size="10 90 120 110"
>Map Name:
</object>
<object name="pregame_sp_mapname"
style="0ad_window_list"
type="list"
size="0%+100 0%+80 100%-10 100%-60"
>
<action on="Load"><![CDATA[
// Note: We should set this in a .cfg or initialisation area, as it's used again later.
mapPath = "maps/scenarios/"
// Get a list of map names.
mapArray = buildFileList (mapPath, "*.pmp", false);
for (mapIndex = 0; mapIndex < mapArray.length; mapIndex++)
{
// Remove the path and extension from each name, since we just want the filename.
// (Is there an equivalent "basename" function for that in JS?)
mapArray[mapIndex] = mapArray[mapIndex].substring (mapPath.length, mapArray[mapIndex].length-4)
// Add map name to the end of the object's list.
pushItem (this.name, mapArray[mapIndex]);
}
// Set default value (pick whatever's at the top of the list).
getGUIObjectByName(this.name).selected = 0;
]]></action>
</object>
<!--
==========================================
- MAIN MENU - BUTTONS
==========================================
-->
<object name="pregame_sp_start_bt"
style="0ad_window_button"
type="button"
size="50%-100 100%-50 50%-10 100%-20"
>Start Game
<action on="Press"><![CDATA[
StartMap ( getCurrItemValue ("pregame_sp_mapname"), "pregame_sp_mapsel", 0);
]]></action>
</object>
<object name="pregame_sp_mapsel_abort_button"
style="0ad_window_button"
type="button"
size="50%+10 100%-50 50%+90 100%-20"
>Abort
<action on="Press"><![CDATA[
closeMainMenuSubWindow ("pregame_sp_mapsel");
]]></action>
</object>
</object>
</object>
</objects>

View File

@ -1,114 +0,0 @@
<?xml version="1.0" encoding="iso-8859-1" standalone="no" ?>
<!DOCTYPE objects SYSTEM "../gui.dtd">
<!--
==========================================
- LOADING SCREEN -
==========================================
-->
<objects>
<object name="loading_screen"
hidden="true"
>
<!--
==========================================
- BLACK BACKGROUND AT LOWEST Z LEVEL
==========================================
-->
<object name="backdrop_mask"
type="image"
sprite="black"
/>
<!--
==========================================
- LOADING SCREEN - WINDOW
==========================================
-->
<object name="loading_screen_window"
style="0ad_window"
type="image"
size="25 35 100%-25 100%-25"
>
<object name="loading_screen_titlebar"
style="0ad_window_titlebar"
type="button"
/>
<!--
==========================================
- LOADING SCREEN - TEXT
==========================================
-->
<object name="loading_screen_text"
type="text"
size="23.571428% 20 100%-25 100%-100"
font="prospero18"
/>
<!--
==========================================
- LOADING SCREEN - CONCEPT ART
==========================================
-->
<object name="loading_screen_background_concept"
type="image"
size="30 20 33.3008%+30 88.9323%+20"
sprite="black_bkg"
/>
<!--
==========================================
- LOADING SCREEN - PROGRESSBAR
==========================================
-->
<object name="loading_screen_progress_bar_text"
type="text"
size="25 100%-190 100%-25 100%-180"
font="tahoma14"
textcolor="0 0 0"
text_align="center"
text_valign="center"
>
<action on="Progress"><![CDATA[
this.caption = g_LoadDescription;
]]></action>
</object>
<object name="loading_screen_progress_bar"
style="blue_bar_outlined"
type="progressbar"
size="25 100%-160 100%-25 100%-145"
>
<action on="Progress"><![CDATA[
this.caption = g_Progress;
]]></action>
</object>
<!--
==========================================
- LOADING SCREEN - TIP
==========================================
-->
<object name="loading_screen_tip"
type="text"
size="25 100%-135 100%-25 100%-25"
textcolor="0 0 0"
font="trebuchet16"
text_align="left"
text_valign="center"
sprite="0ad_indent_lite"
/>
</object>
</object>
</objects>

View File

@ -1,536 +0,0 @@
<?xml version="1.0" encoding="iso-8859-1" standalone="no" ?>
<!DOCTYPE objects SYSTEM "../gui.dtd">
<!--
==========================================
- SESSION GUI -
==========================================
-->
<objects>
<object type="empty" name="session_gui" hotkey="flipgui.toggle" size="0 0 100% 100%" z="1" hidden="true">
<action on="Press"><![CDATA[
FlipGUI();
]]></action>
<!-- GROUP: RESOURCE BAR -->
<object type="empty" name="session_top_bar" hotkey="resourcepool.toggle" size="0 0 100% 100%" z="1" >
<action on="Press"><![CDATA[
GUIObjectToggle("session_top_bar");
]]></action>
<object type="button" name="SN_RESOURCE_COUNTER_FOOD" style="resource_counter" sprite="resource_food_counter" tooltip="Food, plus some word-wrapping: Material, usually of plant or animal origin, that contains or consists of essential body nutrients, such as carbohydrates, fats, proteins, vitamins, or minerals, and is ingested and assimilated by an organism to produce energy, stimulate growth, and maintain life."><action on="Load"><![CDATA[ addSizeCoordArray(this.name, Crd[SN_RESOURCE_COUNTER_FOOD]); ]]></action></object>
<object type="button" name="SN_RESOURCE_COUNTER_WOOD" style="resource_counter" sprite="resource_wood_counter" tooltip="Wood"><action on="Load"><![CDATA[ addSizeCoordArray(this.name, Crd[SN_RESOURCE_COUNTER_WOOD]); ]]></action></object>
<object type="button" name="SN_RESOURCE_COUNTER_STONE" style="resource_counter" sprite="resource_stone_counter" tooltip="Stone"><action on="Load"><![CDATA[ addSizeCoordArray(this.name, Crd[SN_RESOURCE_COUNTER_STONE]); ]]></action></object>
<object type="button" name="SN_RESOURCE_COUNTER_ORE" style="resource_counter" sprite="resource_ore_counter" tooltip="Ore"><action on="Load"><![CDATA[ addSizeCoordArray(this.name, Crd[SN_RESOURCE_COUNTER_ORE]); ]]></action></object>
<object type="button" name="SN_RESOURCE_COUNTER_POPULATION" style="resource_counter" sprite="resource_population_counter" tooltip="Population"><action on="Load"><![CDATA[ addSizeCoordArray(this.name, Crd[SN_RESOURCE_COUNTER_POPULATION]); ]]></action></object>
<!-- / GROUP: RESOURCE BAR -->
</object>
<!-- GROUP: GROUP PANE -->
<object type="empty" name="session_group_pane" hotkey="grouppane.toggle" size="0 0 100% 100%" z="1" hidden="true">
<action on="Press"><![CDATA[
GUIObjectToggle("session_group_pane");
]]></action>
<!--
<object type="text" name="session_group_pane_bg" sprite="sprite1" z="60" ghost="true" />
-->
<object type="button" name="SESSION_GROUP_PANE_PORTRAIT_1" style="portrait" />
<object type="progressbar" name="SESSION_GROUP_PANE_PORTRAIT_1_BAR" style="group_portrait_bar" />
<object type="button" name="SESSION_GROUP_PANE_PORTRAIT_2" style="portrait" />
<object type="progressbar" name="SESSION_GROUP_PANE_PORTRAIT_2_BAR" style="group_portrait_bar" />
<object type="button" name="SESSION_GROUP_PANE_PORTRAIT_3" style="portrait" />
<object type="progressbar" name="SESSION_GROUP_PANE_PORTRAIT_3_BAR" style="group_portrait_bar" />
<object type="button" name="SESSION_GROUP_PANE_PORTRAIT_4" style="portrait" />
<object type="progressbar" name="SESSION_GROUP_PANE_PORTRAIT_4_BAR" style="group_portrait_bar" />
<object type="button" name="SESSION_GROUP_PANE_PORTRAIT_5" style="portrait" />
<object type="progressbar" name="SESSION_GROUP_PANE_PORTRAIT_5_BAR" style="group_portrait_bar" />
<object type="button" name="SESSION_GROUP_PANE_PORTRAIT_6" style="portrait" />
<object type="progressbar" name="SESSION_GROUP_PANE_PORTRAIT_6_BAR" style="group_portrait_bar" />
<object type="button" name="SESSION_GROUP_PANE_PORTRAIT_7" style="portrait" />
<object type="progressbar" name="SESSION_GROUP_PANE_PORTRAIT_7_BAR" style="group_portrait_bar" />
<object type="button" name="SESSION_GROUP_PANE_PORTRAIT_8" style="portrait" />
<object type="progressbar" name="SESSION_GROUP_PANE_PORTRAIT_8_BAR" style="group_portrait_bar" />
<object type="button" name="SESSION_GROUP_PANE_PORTRAIT_9" style="portrait" />
<object type="progressbar" name="SESSION_GROUP_PANE_PORTRAIT_9_BAR" style="group_portrait_bar" />
<object type="button" name="SESSION_GROUP_PANE_PORTRAIT_10" style="portrait" />
<object type="progressbar" name="SESSION_GROUP_PANE_PORTRAIT_10_BAR" style="group_portrait_bar" />
<object type="button" name="SESSION_GROUP_PANE_PORTRAIT_11" style="portrait" />
<object type="progressbar" name="SESSION_GROUP_PANE_PORTRAIT_11_BAR" style="group_portrait_bar" />
<object type="button" name="SESSION_GROUP_PANE_PORTRAIT_12" style="portrait" />
<object type="progressbar" name="SESSION_GROUP_PANE_PORTRAIT_12_BAR" style="group_portrait_bar" />
<object type="button" name="SESSION_GROUP_PANE_PORTRAIT_13" style="portrait" />
<object type="progressbar" name="SESSION_GROUP_PANE_PORTRAIT_13_BAR" style="group_portrait_bar" />
<object type="button" name="SESSION_GROUP_PANE_PORTRAIT_14" style="portrait" />
<object type="progressbar" name="SESSION_GROUP_PANE_PORTRAIT_14_BAR" style="group_portrait_bar" />
<object type="button" name="SESSION_GROUP_PANE_PORTRAIT_15" style="portrait" />
<object type="progressbar" name="SESSION_GROUP_PANE_PORTRAIT_15_BAR" style="group_portrait_bar" />
<object type="button" name="SESSION_GROUP_PANE_PORTRAIT_16" style="portrait" />
<object type="progressbar" name="SESSION_GROUP_PANE_PORTRAIT_16_BAR" style="group_portrait_bar" />
<object type="button" name="SESSION_GROUP_PANE_PORTRAIT_17" style="portrait" />
<object type="progressbar" name="SESSION_GROUP_PANE_PORTRAIT_17_BAR" style="group_portrait_bar" />
<object type="button" name="SESSION_GROUP_PANE_PORTRAIT_18" style="portrait" />
<object type="progressbar" name="SESSION_GROUP_PANE_PORTRAIT_18_BAR" style="group_portrait_bar" />
<object type="button" name="SESSION_GROUP_PANE_PORTRAIT_19" style="portrait" />
<object type="progressbar" name="SESSION_GROUP_PANE_PORTRAIT_19_BAR" style="group_portrait_bar" />
<object type="button" name="SESSION_GROUP_PANE_PORTRAIT_20" style="portrait" />
<object type="progressbar" name="SESSION_GROUP_PANE_PORTRAIT_20_BAR" style="group_portrait_bar" />
<object type="button" name="SESSION_GROUP_PANE_PORTRAIT_21" style="portrait" />
<object type="progressbar" name="SESSION_GROUP_PANE_PORTRAIT_21_BAR" style="group_portrait_bar" />
<object type="button" name="SESSION_GROUP_PANE_PORTRAIT_22" style="portrait" />
<object type="progressbar" name="SESSION_GROUP_PANE_PORTRAIT_22_BAR" style="group_portrait_bar" />
<object type="button" name="SESSION_GROUP_PANE_PORTRAIT_23" style="portrait" />
<object type="progressbar" name="SESSION_GROUP_PANE_PORTRAIT_23_BAR" style="group_portrait_bar" />
<object type="button" name="SESSION_GROUP_PANE_PORTRAIT_24" style="portrait" />
<object type="progressbar" name="SESSION_GROUP_PANE_PORTRAIT_24_BAR" style="group_portrait_bar" />
<object type="button" name="SESSION_GROUP_PANE_PORTRAIT_25" style="portrait" />
<object type="progressbar" name="SESSION_GROUP_PANE_PORTRAIT_25_BAR" style="group_portrait_bar" />
<object type="button" name="SESSION_GROUP_PANE_PORTRAIT_26" style="portrait" />
<object type="progressbar" name="SESSION_GROUP_PANE_PORTRAIT_26_BAR" style="group_portrait_bar" />
<object type="button" name="SESSION_GROUP_PANE_PORTRAIT_27" style="portrait" />
<object type="progressbar" name="SESSION_GROUP_PANE_PORTRAIT_27_BAR" style="group_portrait_bar" />
<object type="button" name="SESSION_GROUP_PANE_PORTRAIT_28" style="portrait" />
<object type="progressbar" name="SESSION_GROUP_PANE_PORTRAIT_28_BAR" style="group_portrait_bar" />
<object type="button" name="SESSION_GROUP_PANE_PORTRAIT_29" style="portrait" />
<object type="progressbar" name="SESSION_GROUP_PANE_PORTRAIT_29_BAR" style="group_portrait_bar" />
<object type="button" name="SESSION_GROUP_PANE_PORTRAIT_30" style="portrait" />
<object type="progressbar" name="SESSION_GROUP_PANE_PORTRAIT_30_BAR" style="group_portrait_bar" />
<object type="button" name="SESSION_GROUP_PANE_PORTRAIT_31" style="portrait" />
<object type="progressbar" name="SESSION_GROUP_PANE_PORTRAIT_31_BAR" style="group_portrait_bar" />
<object type="button" name="SESSION_GROUP_PANE_PORTRAIT_32" style="portrait" />
<object type="progressbar" name="SESSION_GROUP_PANE_PORTRAIT_32_BAR" style="group_portrait_bar" />
<object type="button" name="SESSION_GROUP_PANE_PORTRAIT_33" style="portrait" />
<object type="progressbar" name="SESSION_GROUP_PANE_PORTRAIT_33_BAR" style="group_portrait_bar" />
<object type="button" name="SESSION_GROUP_PANE_PORTRAIT_34" style="portrait" />
<object type="progressbar" name="SESSION_GROUP_PANE_PORTRAIT_34_BAR" style="group_portrait_bar" />
<object type="button" name="SESSION_GROUP_PANE_PORTRAIT_35" style="portrait" />
<object type="progressbar" name="SESSION_GROUP_PANE_PORTRAIT_35_BAR" style="group_portrait_bar" />
<object type="button" name="SESSION_GROUP_PANE_PORTRAIT_36" style="portrait" />
<object type="progressbar" name="SESSION_GROUP_PANE_PORTRAIT_36_BAR" style="group_portrait_bar" />
<object type="button" name="SESSION_GROUP_PANE_PORTRAIT_37" style="portrait" />
<object type="progressbar" name="SESSION_GROUP_PANE_PORTRAIT_37_BAR" style="group_portrait_bar" />
<object type="button" name="SESSION_GROUP_PANE_PORTRAIT_38" style="portrait" />
<object type="progressbar" name="SESSION_GROUP_PANE_PORTRAIT_38_BAR" style="group_portrait_bar" />
<object type="button" name="SESSION_GROUP_PANE_PORTRAIT_39" style="portrait" />
<object type="progressbar" name="SESSION_GROUP_PANE_PORTRAIT_39_BAR" style="group_portrait_bar" />
<object type="button" name="SESSION_GROUP_PANE_PORTRAIT_40" style="portrait" />
<object type="progressbar" name="SESSION_GROUP_PANE_PORTRAIT_40_BAR" style="group_portrait_bar" />
<object type="button" name="SESSION_GROUP_PANE_PORTRAIT_41" style="portrait" />
<object type="progressbar" name="SESSION_GROUP_PANE_PORTRAIT_41_BAR" style="group_portrait_bar" />
<object type="button" name="SESSION_GROUP_PANE_PORTRAIT_42" style="portrait" />
<object type="progressbar" name="SESSION_GROUP_PANE_PORTRAIT_42_BAR" style="group_portrait_bar" />
<object type="button" name="SESSION_GROUP_PANE_PORTRAIT_43" style="portrait" />
<object type="progressbar" name="SESSION_GROUP_PANE_PORTRAIT_43_BAR" style="group_portrait_bar" />
<object type="button" name="SESSION_GROUP_PANE_PORTRAIT_44" style="portrait" />
<object type="progressbar" name="SESSION_GROUP_PANE_PORTRAIT_44_BAR" style="group_portrait_bar" />
<object type="button" name="SESSION_GROUP_PANE_PORTRAIT_45" style="portrait" />
<object type="progressbar" name="SESSION_GROUP_PANE_PORTRAIT_45_BAR" style="group_portrait_bar" />
<object type="button" name="SESSION_GROUP_PANE_PORTRAIT_46" style="portrait" />
<object type="progressbar" name="SESSION_GROUP_PANE_PORTRAIT_46_BAR" style="group_portrait_bar" />
<object type="button" name="SESSION_GROUP_PANE_PORTRAIT_47" style="portrait" />
<object type="progressbar" name="SESSION_GROUP_PANE_PORTRAIT_47_BAR" style="group_portrait_bar" />
<object type="button" name="SESSION_GROUP_PANE_PORTRAIT_48" style="portrait" />
<object type="progressbar" name="SESSION_GROUP_PANE_PORTRAIT_48_BAR" style="group_portrait_bar" />
<object type="button" name="SESSION_GROUP_PANE_PORTRAIT_49" style="portrait" />
<object type="progressbar" name="SESSION_GROUP_PANE_PORTRAIT_49_BAR" style="group_portrait_bar" />
<object type="button" name="SESSION_GROUP_PANE_PORTRAIT_50" style="portrait" />
<object type="progressbar" name="SESSION_GROUP_PANE_PORTRAIT_50_BAR" style="group_portrait_bar" />
<object type="button" name="SESSION_GROUP_PANE_PORTRAIT_51" style="portrait" />
<object type="progressbar" name="SESSION_GROUP_PANE_PORTRAIT_51_BAR" style="group_portrait_bar" />
<object type="button" name="SESSION_GROUP_PANE_PORTRAIT_52" style="portrait" />
<object type="progressbar" name="SESSION_GROUP_PANE_PORTRAIT_52_BAR" style="group_portrait_bar" >
<action on="Load"><![CDATA[
// Seek through ALL group portraits and set their sizes at once. (So make sure this always goes in the last menu button.)
var groupPaneCounter = 1;
for (rowLoop = 0; rowLoop < crd_grppane_prt_row.last; rowLoop++)
{
for (colLoop = 0; colLoop < crd_grppane_prt_col.last; colLoop++)
{
// Set size, caption, and onPress function for each button.
AddSizeGroupPane("SESSION_GROUP_PANE_PORTRAIT_" + groupPaneCounter, rowLoop, colLoop);
getGUIObjectByName("SESSION_GROUP_PANE_PORTRAIT_" + groupPaneCounter).caption = groupPaneCounter;
// This is quite evil:
getGUIObjectByName("SESSION_GROUP_PANE_PORTRAIT_" + groupPaneCounter).onPress =
function (n) { return function() { SelectUnit(n); } } (groupPaneCounter);
AddSizeGroupPaneBar("SESSION_GROUP_PANE_PORTRAIT_" + groupPaneCounter + "_BAR");
groupPaneCounter++;
}
}
]]></action>
</object>
</object>
<!-- GROUP: STATUS ORB -->
<object type="empty" name="session_status_orb" hotkey="statusorb.toggle" size="0 0 100% 100%" z="1" >
<action on="Press"><![CDATA[
GUIObjectToggle("session_status_orb");
]]></action>
<object type="text" name="SN_STATUS_PANE_BG" style="session_ghost_object" ><action on="Load"><![CDATA[ addSizeCoordArray(this.name, Crd[SN_STATUS_PANE_BG]); ]]></action></object>
<object type="text" name="SN_STATUS_PANE_HEADING" style="session_ghost_subheading_center_object" ><action on="Load"><![CDATA[ addSizeCoordArray(this.name, Crd[SN_STATUS_PANE_HEADING], Crd[SN_STATUS_PANE_HEADING_FLP]); ]]></action></object>
<object type="button" name="SN_STATUS_PANE_PORTRAIT" hotkey="selection.snap" style="portrait" ><action on="Load"><![CDATA[ addSizeCoordArray(this.name, Crd[SN_STATUS_PANE_PORTRAIT], Crd[SN_STATUS_PANE_PORTRAIT_FLP]); ]]></action>
<action on="Press"><![CDATA[
setCameraTarget(selection[0].position); // Focus the camera on the unit when his portrait is clicked.
]]></action>
</object>
<object type="text" name="SN_STATUS_PANE_ICON_RANK" style="session_ghost_object" ><action on="Load"><![CDATA[ addSizeCoordArray(this.name, Crd[SN_STATUS_PANE_ICON_RANK], Crd[SN_STATUS_PANE_ICON_RANK_FLP]); ]]></action></object>
<object type="progressbar" name="SN_STATUS_PANE_ICON_HP_BAR" style="group_portrait_bar" sprite_background="back_bar" ><action on="Load"><![CDATA[ addSizeCoordArray(this.name, Crd[SN_STATUS_PANE_ICON_HP_BAR], Crd[SN_STATUS_PANE_ICON_HP_BAR_FLP]); ]]></action></object>
<object type="text" name="SN_STATUS_PANE_ICON_HP_TEXT" style="session_ghost_text_left_centre_object" textcolor="0 255 0" ><action on="Load"><![CDATA[ addSizeCoordArray(this.name, Crd[SN_STATUS_PANE_ICON_HP_TEXT], Crd[SN_STATUS_PANE_ICON_HP_TEXT_FLP]); ]]></action></object>
<object type="progressbar" name="SN_STATUS_PANE_ICON_XP_BAR" style="up_bar" sprite_background="back_bar" ><action on="Load"><![CDATA[ addSizeCoordArray(this.name, Crd[SN_STATUS_PANE_ICON_XP_BAR], Crd[SN_STATUS_PANE_ICON_XP_BAR_FLP]); ]]></action></object>
<object type="text" name="SN_STATUS_PANE_ICON_XP_TEXT" style="session_ghost_text_left_centre_object" textcolor="255 255 0" ><action on="Load"><![CDATA[ addSizeCoordArray(this.name, Crd[SN_STATUS_PANE_ICON_XP_TEXT], Crd[SN_STATUS_PANE_ICON_XP_TEXT_FLP]); ]]></action></object>
<object type="text" name="SN_STATUS_PANE_NAME1" style="session_ghost_heading_left_object" ><action on="Load"><![CDATA[ addSizeCoordArray(this.name, Crd[SN_STATUS_PANE_NAME1], Crd[SN_STATUS_PANE_NAME1_FLP]); ]]></action></object>
<object type="text" name="SN_STATUS_PANE_2STAT" style="session_ghost_midheading_center_bottom_object" ><action on="Load"><![CDATA[ addSizeCoordArray(this.name, Crd[SN_STATUS_PANE_2STAT], Crd[SN_STATUS_PANE_2STAT_FLP]); guiSetCaption("SN_STATUS_PANE_2STAT", "[icon=icon_statistic_garrison] 23/30 [icon=icon_resource_wood] 1575"); ]]></action></object>
<object type="text" name="SN_STATUS_PANE_STAT1" style="session_ghost_subheading_object" />
<object type="text" name="SN_STATUS_PANE_STAT2" style="session_ghost_miniheading_object" />
<object type="text" name="SN_STATUS_PANE_STAT3" style="session_ghost_miniheading_object" />
<object type="text" name="SN_STATUS_PANE_STAT4" style="session_ghost_miniheading_object" />
<object type="text" name="SN_STATUS_PANE_STAT5" style="session_ghost_subheading_object" />
<object type="text" name="SN_STATUS_PANE_STAT6" style="session_ghost_subheading_object" />
<object type="text" name="SN_STATUS_PANE_STAT7" style="session_ghost_subheading_object" />
<object type="text" name="SN_STATUS_PANE_STAT8" style="session_ghost_miniheading_object" />
<object type="text" name="SN_STATUS_PANE_STAT9" style="session_ghost_miniheading_object" />
<object type="text" name="SN_STATUS_PANE_STAT10" style="session_ghost_miniheading_object" />
<object type="text" name="SN_STATUS_PANE_STAT11" style="session_ghost_subheading_left_object" />
<object type="text" name="SN_STATUS_PANE_STAT12" style="session_ghost_subheading_left_object">
<action on="Load"><![CDATA[
// Seek through ALL objects and set their sizes at once. (So make sure this always goes in the last control.)
for (SN_STATUS_PANE_STAT.curr = 1; SN_STATUS_PANE_STAT.curr < SN_STATUS_PANE_STAT.last; SN_STATUS_PANE_STAT.curr++)
addSizeCoordArray("SN_STATUS_PANE_STAT" + SN_STATUS_PANE_STAT.curr, Crd[SN_STATUS_PANE_STAT[SN_STATUS_PANE_STAT.curr]], Crd[SN_STATUS_PANE_STAT_FLP[SN_STATUS_PANE_STAT.curr]]);
]]></action>
</object>
<!-- COMMAND BUTTONS (arc the Status Pane) -->
<object type="button" name="SN_STATUS_PANE_COMMAND_1_1" />
<object type="empty" name="SN_STATUS_PANE_COMMAND_1_GROUP" >
<object type="button" name="SN_STATUS_PANE_COMMAND_1_2" />
<object type="button" name="SN_STATUS_PANE_COMMAND_1_3" />
<object type="button" name="SN_STATUS_PANE_COMMAND_1_4" />
<object type="button" name="SN_STATUS_PANE_COMMAND_1_5" />
<object type="button" name="SN_STATUS_PANE_COMMAND_1_6" />
<object type="button" name="SN_STATUS_PANE_COMMAND_1_7" />
<object type="button" name="SN_STATUS_PANE_COMMAND_1_8" />
<object type="button" name="SN_STATUS_PANE_COMMAND_1_9" />
<object type="button" name="SN_STATUS_PANE_COMMAND_1_10" />
<object type="button" name="SN_STATUS_PANE_COMMAND_1_11" />
<object type="button" name="SN_STATUS_PANE_COMMAND_1_12" />
</object>
<object type="button" name="SN_STATUS_PANE_COMMAND_2_1" />
<object type="empty" name="SN_STATUS_PANE_COMMAND_2_GROUP" >
<object type="button" name="SN_STATUS_PANE_COMMAND_2_2" />
<object type="button" name="SN_STATUS_PANE_COMMAND_2_3" />
<object type="button" name="SN_STATUS_PANE_COMMAND_2_4" />
<object type="button" name="SN_STATUS_PANE_COMMAND_2_5" />
<object type="button" name="SN_STATUS_PANE_COMMAND_2_6" />
<object type="button" name="SN_STATUS_PANE_COMMAND_2_7" />
<object type="button" name="SN_STATUS_PANE_COMMAND_2_8" />
<object type="button" name="SN_STATUS_PANE_COMMAND_2_9" />
<object type="button" name="SN_STATUS_PANE_COMMAND_2_10" />
<object type="button" name="SN_STATUS_PANE_COMMAND_2_11" />
<object type="button" name="SN_STATUS_PANE_COMMAND_2_12" />
</object>
<object type="button" name="SN_STATUS_PANE_COMMAND_3_1" />
<object type="empty" name="SN_STATUS_PANE_COMMAND_3_GROUP" >
<object type="button" name="SN_STATUS_PANE_COMMAND_3_2" />
<object type="button" name="SN_STATUS_PANE_COMMAND_3_3" />
<object type="button" name="SN_STATUS_PANE_COMMAND_3_4" />
<object type="button" name="SN_STATUS_PANE_COMMAND_3_5" />
<object type="button" name="SN_STATUS_PANE_COMMAND_3_6" />
<object type="button" name="SN_STATUS_PANE_COMMAND_3_7" />
<object type="button" name="SN_STATUS_PANE_COMMAND_3_8" />
<object type="button" name="SN_STATUS_PANE_COMMAND_3_9" />
<object type="button" name="SN_STATUS_PANE_COMMAND_3_10" />
<object type="button" name="SN_STATUS_PANE_COMMAND_3_11" />
<object type="button" name="SN_STATUS_PANE_COMMAND_3_12" />
</object>
<object type="button" name="SN_STATUS_PANE_COMMAND_4_1" />
<object type="empty" name="SN_STATUS_PANE_COMMAND_4_GROUP" >
<object type="button" name="SN_STATUS_PANE_COMMAND_4_2" />
<object type="button" name="SN_STATUS_PANE_COMMAND_4_3" />
<object type="button" name="SN_STATUS_PANE_COMMAND_4_4" />
<object type="button" name="SN_STATUS_PANE_COMMAND_4_5" />
<object type="button" name="SN_STATUS_PANE_COMMAND_4_6" />
<object type="button" name="SN_STATUS_PANE_COMMAND_4_7" />
<object type="button" name="SN_STATUS_PANE_COMMAND_4_8" />
<object type="button" name="SN_STATUS_PANE_COMMAND_4_9" />
<object type="button" name="SN_STATUS_PANE_COMMAND_4_10" />
<object type="button" name="SN_STATUS_PANE_COMMAND_4_11" />
<object type="button" name="SN_STATUS_PANE_COMMAND_4_12" />
</object>
<object type="button" name="SN_STATUS_PANE_COMMAND_5_1" />
<object type="empty" name="SN_STATUS_PANE_COMMAND_5_GROUP" >
<object type="button" name="SN_STATUS_PANE_COMMAND_5_2" />
<object type="button" name="SN_STATUS_PANE_COMMAND_5_3" />
<object type="button" name="SN_STATUS_PANE_COMMAND_5_4" />
<object type="button" name="SN_STATUS_PANE_COMMAND_5_5" />
<object type="button" name="SN_STATUS_PANE_COMMAND_5_6" />
<object type="button" name="SN_STATUS_PANE_COMMAND_5_7" />
<object type="button" name="SN_STATUS_PANE_COMMAND_5_8" />
<object type="button" name="SN_STATUS_PANE_COMMAND_5_9" />
<object type="button" name="SN_STATUS_PANE_COMMAND_5_10" />
<object type="button" name="SN_STATUS_PANE_COMMAND_5_11" />
<object type="button" name="SN_STATUS_PANE_COMMAND_5_12" />
</object>
<object type="button" name="SN_STATUS_PANE_COMMAND_6_1" />
<object type="empty" name="SN_STATUS_PANE_COMMAND_6_GROUP" >
<object type="button" name="SN_STATUS_PANE_COMMAND_6_2" />
<object type="button" name="SN_STATUS_PANE_COMMAND_6_3" />
<object type="button" name="SN_STATUS_PANE_COMMAND_6_4" />
<object type="button" name="SN_STATUS_PANE_COMMAND_6_5" />
<object type="button" name="SN_STATUS_PANE_COMMAND_6_6" />
<object type="button" name="SN_STATUS_PANE_COMMAND_6_7" />
<object type="button" name="SN_STATUS_PANE_COMMAND_6_8" />
<object type="button" name="SN_STATUS_PANE_COMMAND_6_9" />
<object type="button" name="SN_STATUS_PANE_COMMAND_6_10" />
<object type="button" name="SN_STATUS_PANE_COMMAND_6_11" />
<object type="button" name="SN_STATUS_PANE_COMMAND_6_12" />
</object>
<object type="button" name="SN_STATUS_PANE_COMMAND_7_1" />
<object type="empty" name="SN_STATUS_PANE_COMMAND_7_GROUP" >
<object type="button" name="SN_STATUS_PANE_COMMAND_7_2" />
<object type="button" name="SN_STATUS_PANE_COMMAND_7_3" />
<object type="button" name="SN_STATUS_PANE_COMMAND_7_4" />
<object type="button" name="SN_STATUS_PANE_COMMAND_7_5" />
<object type="button" name="SN_STATUS_PANE_COMMAND_7_6" />
<object type="button" name="SN_STATUS_PANE_COMMAND_7_7" />
<object type="button" name="SN_STATUS_PANE_COMMAND_7_8" />
<object type="button" name="SN_STATUS_PANE_COMMAND_7_9" />
<object type="button" name="SN_STATUS_PANE_COMMAND_7_10" />
<object type="button" name="SN_STATUS_PANE_COMMAND_7_11" />
<object type="button" name="SN_STATUS_PANE_COMMAND_7_12" />
</object>
<object type="button" name="SN_STATUS_PANE_COMMAND_8_1" />
<object type="empty" name="SN_STATUS_PANE_COMMAND_8_GROUP" >
<object type="button" name="SN_STATUS_PANE_COMMAND_8_2" />
<object type="button" name="SN_STATUS_PANE_COMMAND_8_3" />
<object type="button" name="SN_STATUS_PANE_COMMAND_8_4" />
<object type="button" name="SN_STATUS_PANE_COMMAND_8_5" />
<object type="button" name="SN_STATUS_PANE_COMMAND_8_6" />
<object type="button" name="SN_STATUS_PANE_COMMAND_8_7" />
<object type="button" name="SN_STATUS_PANE_COMMAND_8_8" />
<object type="button" name="SN_STATUS_PANE_COMMAND_8_9" />
<object type="button" name="SN_STATUS_PANE_COMMAND_8_10" />
<object type="button" name="SN_STATUS_PANE_COMMAND_8_11" />
<object type="button" name="SN_STATUS_PANE_COMMAND_8_12" />
</object>
<object type="button" name="SN_STATUS_PANE_COMMAND_9_1" />
<object type="empty" name="SN_STATUS_PANE_COMMAND_9_GROUP" >
<object type="button" name="SN_STATUS_PANE_COMMAND_9_2" />
<object type="button" name="SN_STATUS_PANE_COMMAND_9_3" />
<object type="button" name="SN_STATUS_PANE_COMMAND_9_4" />
<object type="button" name="SN_STATUS_PANE_COMMAND_9_5" />
<object type="button" name="SN_STATUS_PANE_COMMAND_9_6" />
<object type="button" name="SN_STATUS_PANE_COMMAND_9_7" />
<object type="button" name="SN_STATUS_PANE_COMMAND_9_8" />
<object type="button" name="SN_STATUS_PANE_COMMAND_9_9" />
<object type="button" name="SN_STATUS_PANE_COMMAND_9_10" />
<object type="button" name="SN_STATUS_PANE_COMMAND_9_11" />
<object type="button" name="SN_STATUS_PANE_COMMAND_9_12" />
</object>
<object type="button" name="SN_STATUS_PANE_COMMAND_10_1" />
<object type="empty" name="SN_STATUS_PANE_COMMAND_10_GROUP" >
<object type="button" name="SN_STATUS_PANE_COMMAND_10_2" />
<object type="button" name="SN_STATUS_PANE_COMMAND_10_3" />
<object type="button" name="SN_STATUS_PANE_COMMAND_10_4" />
<object type="button" name="SN_STATUS_PANE_COMMAND_10_5" />
<object type="button" name="SN_STATUS_PANE_COMMAND_10_6" />
<object type="button" name="SN_STATUS_PANE_COMMAND_10_7" />
<object type="button" name="SN_STATUS_PANE_COMMAND_10_8" />
<object type="button" name="SN_STATUS_PANE_COMMAND_10_9" />
<object type="button" name="SN_STATUS_PANE_COMMAND_10_10" />
<object type="button" name="SN_STATUS_PANE_COMMAND_10_11" />
<object type="button" name="SN_STATUS_PANE_COMMAND_10_12" />
</object>
<object type="button" name="SN_STATUS_PANE_COMMAND_11_1" />
<object type="empty" name="SN_STATUS_PANE_COMMAND_11_GROUP" >
<object type="button" name="SN_STATUS_PANE_COMMAND_11_2" />
<object type="button" name="SN_STATUS_PANE_COMMAND_11_3" />
<object type="button" name="SN_STATUS_PANE_COMMAND_11_4" />
<object type="button" name="SN_STATUS_PANE_COMMAND_11_5" />
<object type="button" name="SN_STATUS_PANE_COMMAND_11_6" />
<object type="button" name="SN_STATUS_PANE_COMMAND_11_7" />
<object type="button" name="SN_STATUS_PANE_COMMAND_11_8" />
<object type="button" name="SN_STATUS_PANE_COMMAND_11_9" />
<object type="button" name="SN_STATUS_PANE_COMMAND_11_10" />
<object type="button" name="SN_STATUS_PANE_COMMAND_11_11" />
<object type="button" name="SN_STATUS_PANE_COMMAND_11_12" />
</object>
<object type="button" name="SN_STATUS_PANE_COMMAND_12_1" />
<object type="empty" name="SN_STATUS_PANE_COMMAND_12_GROUP" >
<object type="button" name="SN_STATUS_PANE_COMMAND_12_2" />
<object type="button" name="SN_STATUS_PANE_COMMAND_12_3" />
<object type="button" name="SN_STATUS_PANE_COMMAND_12_4" />
<object type="button" name="SN_STATUS_PANE_COMMAND_12_5" />
<object type="button" name="SN_STATUS_PANE_COMMAND_12_6" />
<object type="button" name="SN_STATUS_PANE_COMMAND_12_7" />
<object type="button" name="SN_STATUS_PANE_COMMAND_12_8" />
<object type="button" name="SN_STATUS_PANE_COMMAND_12_9" />
<object type="button" name="SN_STATUS_PANE_COMMAND_12_10" />
<object type="button" name="SN_STATUS_PANE_COMMAND_12_11" />
<object type="button" name="SN_STATUS_PANE_COMMAND_12_12" />
</object>
<object type="button" name="SN_STATUS_PANE_COMMAND_13_1" />
<object type="empty" name="SN_STATUS_PANE_COMMAND_13_GROUP" >
<object type="button" name="SN_STATUS_PANE_COMMAND_13_2" />
<object type="button" name="SN_STATUS_PANE_COMMAND_13_3" />
<object type="button" name="SN_STATUS_PANE_COMMAND_13_4" />
<object type="button" name="SN_STATUS_PANE_COMMAND_13_5" />
<object type="button" name="SN_STATUS_PANE_COMMAND_13_6" />
<object type="button" name="SN_STATUS_PANE_COMMAND_13_7" />
<object type="button" name="SN_STATUS_PANE_COMMAND_13_8" />
<object type="button" name="SN_STATUS_PANE_COMMAND_13_9" />
<object type="button" name="SN_STATUS_PANE_COMMAND_13_10" />
<object type="button" name="SN_STATUS_PANE_COMMAND_13_11" />
<object type="button" name="SN_STATUS_PANE_COMMAND_13_12" />
// Setup all.
<action on="Load"><![CDATA[
// Update each tab.
for (tabLoop = 1; tabLoop <= SN_STATUS_PANE_COMMAND.tab.max; tabLoop++)
{
tempGroupObject = getGUIObjectByName("SN_STATUS_PANE_COMMAND_" + tabLoop + "_GROUP");
// Define properties of group buttons.
tempGroupObject.style = "control_group";
// Update each list under each tab.
for (listLoop = 1; listLoop <= SN_STATUS_PANE_COMMAND.list.max; listLoop++)
{
tempListObject = getGUIObjectByName("SN_STATUS_PANE_COMMAND_" + tabLoop + "_" + listLoop);
// Define properties of list buttons.
tempListObject.style = "action";
// Define dimensions of list buttons.
addSizeCoordArray("SN_STATUS_PANE_COMMAND_" + tabLoop + "_" + listLoop, Crd[SN_STATUS_PANE_COMMAND[listLoop][tabLoop]], Crd[SN_STATUS_PANE_COMMAND_FLP[listLoop][tabLoop]]);
// Press button.
tempListObject.onPress =
function (m, n, o) { return function() { PressCommandButton(m, n, o); } } (tempListObject, listLoop, tabLoop);
}
}
]]></action>
</object>
<object type="progressbar" name="SN_STATUS_PANE_COMMAND_PROGRESS" style="portrait_progress" ><action on="Load"><![CDATA[ addSizeCoordArray(this.name, Crd[SN_STATUS_PANE_COMMAND_PROGRESS]); ]]></action></object>
<!-- / GROUP: STATUS ORB -->
</object>
<!-- GROUP: MAP ORB -->
<object type="empty" name="session_map_orb" hotkey="maporb.toggle" size="0 0 100% 100%" z="1" >
<action on="Press"><![CDATA[
GUIObjectToggle("session_map_orb");
]]></action>
<object type="minimap" name="SN_MINIMAP" style="session_minimap" ><action on="Load"><![CDATA[ addSizeCoordArray(this.name, Crd[SN_MINIMAP]); ]]></action></object>
<object type="button" name="SN_MAP_ORB_SEGLEFT1" sprite="session_panel_minimap_segleft1" sprite_over="session_panel_minimap_segleft1_lit" ><action on="Load"><![CDATA[ addSizeCoordArray(this.name, Crd[SN_MAP_ORB_SEGLEFT1], Crd[SN_MAP_ORB_SEGLEFT1_FLP]); ]]></action></object>
<object type="button" name="SN_MAP_ORB_SEGLEFT2" sprite="session_panel_minimap_segleft2" sprite_over="session_panel_minimap_segleft2_lit" ><action on="Load"><![CDATA[ addSizeCoordArray(this.name, Crd[SN_MAP_ORB_SEGLEFT2], Crd[SN_MAP_ORB_SEGLEFT2_FLP]); ]]></action></object>
<object type="button" name="SN_MAP_ORB_SEGLEFT3" sprite="session_panel_minimap_segleft3" sprite_over="session_panel_minimap_segleft3_lit" ><action on="Load"><![CDATA[ addSizeCoordArray(this.name, Crd[SN_MAP_ORB_SEGLEFT3], Crd[SN_MAP_ORB_SEGLEFT3_FLP]); ]]></action></object>
<object type="button" name="SN_MAP_ORB_SEGLEFT4" sprite="session_panel_minimap_segleft4" sprite_over="session_panel_minimap_segleft4_lit" ><action on="Load"><![CDATA[ addSizeCoordArray(this.name, Crd[SN_MAP_ORB_SEGLEFT4], Crd[SN_MAP_ORB_SEGLEFT4_FLP]); ]]></action>
<action on="Press"><![CDATA[
GUIObjectToggle("session_gui_subwindow_ingame_menu");
]]></action>
</object>
<object type="button" name="SN_MAP_ORB_SEGBOTTOM1" sprite="session_panel_minimap_segbottom1" sprite_over="session_panel_minimap_segleft1_lit" ><action on="Load"><![CDATA[ addSizeCoordArray(this.name, Crd[SN_MAP_ORB_SEGBOTTOM1], Crd[SN_MAP_ORB_SEGBOTTOM1_FLP]); ]]></action></object>
<object type="button" name="SN_MAP_ORB_SEGBOTTOM2" sprite="session_panel_minimap_segbottom2" sprite_over="session_panel_minimap_segleft2_lit" ><action on="Load"><![CDATA[ addSizeCoordArray(this.name, Crd[SN_MAP_ORB_SEGBOTTOM2], Crd[SN_MAP_ORB_SEGBOTTOM2_FLP]); ]]></action></object>
<object type="button" name="SN_MAP_ORB_SEGBOTTOM3" sprite="session_panel_minimap_segbottom3" sprite_over="session_panel_minimap_segleft3_lit" ><action on="Load"><![CDATA[ addSizeCoordArray(this.name, Crd[SN_MAP_ORB_SEGBOTTOM3], Crd[SN_MAP_ORB_SEGBOTTOM3_FLP]); ]]></action></object>
<object type="button" name="SN_MAP_ORB_SEGBOTTOM4" sprite="session_panel_minimap_segbottom4" sprite_over="session_panel_minimap_segleft4_lit" ><action on="Load"><![CDATA[ addSizeCoordArray(this.name, Crd[SN_MAP_ORB_SEGBOTTOM4], Crd[SN_MAP_ORB_SEGBOTTOM4_FLP]); ]]></action></object>
<!-- / GROUP: MAP ORB -->
</object>
<!-- GROUP: TEAM TRAY -->
<object type="empty" name="session_team_tray" hotkey="teamtray.toggle" size="0 0 100% 100%" z="60">
<action on="Press"><![CDATA[
GUIObjectToggle("session_team_tray");
]]></action>
<object type="button" name="SN_TEAM_TRAY_1" style="action_left" />
<object type="button" name="SN_TEAM_TRAY_2" style="action_left" />
<object type="button" name="SN_TEAM_TRAY_3" style="action_left" />
<object type="button" name="SN_TEAM_TRAY_4" style="action_left" />
<object type="button" name="SN_TEAM_TRAY_5" style="action_left" />
<object type="button" name="SN_TEAM_TRAY_6" style="action_left" />
<object type="button" name="SN_TEAM_TRAY_7" style="action_left" />
<object type="button" name="SN_TEAM_TRAY_8" style="action_left" />
<object type="button" name="SN_TEAM_TRAY_9" style="action_left" >
<action on="Load"><![CDATA[
// Seek through ALL objects and set their sizes, captions and onpresses at once. (So make sure this always goes in the last control.)
for (SN_TEAM_TRAY.curr = 1; SN_TEAM_TRAY.curr < SN_TEAM_TRAY.last; SN_TEAM_TRAY.curr++)
{
addSizeCoordArray("SN_TEAM_TRAY_" + SN_TEAM_TRAY.curr, Crd[SN_TEAM_TRAY[SN_TEAM_TRAY.curr]]);
guiSetCaption("SN_TEAM_TRAY_" + SN_TEAM_TRAY.curr, SN_TEAM_TRAY.curr);
getGUIObjectByName("SN_TEAM_TRAY_" + SN_TEAM_TRAY.curr).onPress = function() { SelectGroup(this.name.substring(this.name.length-1, this.name.length)); }
}
]]></action>
</object>
<!-- / GROUP: TRAY -->
</object>
<!--
==========================================
- HIDDEN (HOTKEY ONLY) -
==========================================
-->
<!--
==========================================
- SUB-WINDOW MENUS -
==========================================
-->
<object type="empty" name="session_gui_subwindows" size="0 0 100% 100%" z="1" >
<!--
==========================================
- IN-GAME MENU
==========================================
-->
<object type="empty" name="session_gui_subwindow_ingame_menu" size="0 0 100% 100%" z="1" hidden="true">
<object type="image" name="SN_INGAME_MENU_BG" style="session_ghost_object" sprite="0ad_window" ><action on="Load"><![CDATA[ addSizeCoordArray(this.name, Crd[SN_INGAME_MENU_BG]); ]]></action></object>
<object type="button" name="SN_INGAME_MENU_BTN_RETURN" style="session_button_object" hotkey="menu.toggle" ><action on="Load"><![CDATA[ addSizeCoordArray(this.name, Crd[SN_INGAME_MENU_BTN_RETURN]); guiSetCaption(this.name, "Return to Game"); ]]></action>
<action on="Press"><![CDATA[
GUIObjectToggle("session_gui_subwindow_ingame_menu");
]]></action>
</object>
<object type="button" name="SN_INGAME_MENU_BTN_EXIT" style="session_button_object" ><action on="Load"><![CDATA[ addSizeCoordArray(this.name, Crd[SN_INGAME_MENU_BTN_EXIT]); guiSetCaption(this.name, "Exit Game"); ]]></action>
<action on="Press"><![CDATA[
btCaptions = new Array("Yes, let me out!", "Nooooo!");
btCode = new Array("endSession('exit');", "");
messageBox(400, 200, "Do you really want to quit [icon=0ad_icon] A.D.? This will cause a sudden return to reality.", "Confirmation", 0, btCaptions, btCode);
]]></action>
</object>
<object type="button" name="SN_INGAME_MENU_BTN_RESIGN" style="session_button_object" hotkey="menu.resign" ><action on="Load"><![CDATA[ addSizeCoordArray(this.name, Crd[SN_INGAME_MENU_BTN_RESIGN]); guiSetCaption(this.name, "Resign Game"); ]]></action>
<action on="Press"><![CDATA[
btCaptions = new Array("Yep, work's done!", "No, more slaughter!");
btCode = new Array("endSession('return');", "");
messageBox(600, 200, "Do you want to leave the current game? There might be more dudes to slaughter.", "Confirmation", 0, btCaptions, btCode);
]]></action>
</object>
<object type="button" name="SN_INGAME_MENU_BTN_JUKEBOX" style="session_button_object" hotkey="jukebox" ><action on="Load"><![CDATA[ addSizeCoordArray(this.name, Crd[SN_INGAME_MENU_BTN_JUKEBOX]); guiSetCaption(this.name, "Playlist Editor"); ]]></action>
<action on="Press"><![CDATA[
// Toggle jukebox.
GUIObjectToggle("JUKEBOX_GUI");
GUIObjectToggle("SESSION_GUI");
]]></action>
</object>
</object>
</object>
<!--
==========================================
- TEST -
==========================================
-->
<!-- / SESSION GUI -->
</object>
</objects>

View File

@ -1,49 +0,0 @@
<?xml version="1.0" encoding="iso-8859-1" standalone="no" ?>
<!DOCTYPE objects SYSTEM "../gui.dtd">
<!--
==========================================
- ONLINE MANUAL DEFINITION -
==========================================
-->
<objects>
<object type="empty" name="MANUAL_GUI" size="0 0 100% 100%" z="1" hotkey="onlinehelp" hidden="true">
<action on="Press"><![CDATA[
// Toggle manual if something selected.
if (selection.length)
{
GUIObjectToggle("MANUAL_GUI");
GUIObjectToggle("SESSION_GUI");
}
]]></action>
<object type="text" name="MANUAL_BKG" sprite="0ad_window" font="prospero16" textcolor="0 0 0" z="100" hidden="false" ghost="true"><action on="Load"><![CDATA[ setSizeArray(this.name, Crd[MANUAL_BKG]); ]]></action>
<action on="Tick"><![CDATA[
if (selection.length && !( getGUIObjectByName( "MANUAL_GUI" ).hidden ))
manualDisplay();
]]></action>
</object>
<object type="button" name="MANUAL_PORTRAIT" style="portrait" z="100" ghost="true"><action on="Load"><![CDATA[ setSizeArray(this.name, Crd[MANUAL_PORTRAIT]); ]]></action></object>
<!-- Gee needs to implement text clipping, so long text doesn't get clipped to these scroll windows yet. Scroll bars also don't block world input yet. -->
<object type="text" name="MANUAL_ROLLOVER" scrollbar="true" scrollbar_style="manual_scrollbar" sprite="0ad_indent" font="trebuchet12" textcolor="0 0 0" z="100" ghost="false"><action on="Load"><![CDATA[ setSizeArray(this.name, Crd[MANUAL_ROLLOVER]); ]]></action></object>
<object type="text" name="MANUAL_NAME" sprite="0ad_indent" font="trebuchet14" textcolor="0 0 0" z="100" ghost="true"><action on="Load"><![CDATA[ setSizeArray(this.name, Crd[MANUAL_NAME]); ]]></action></object>
<!-- Gee needs to implement text clipping, so long text doesn't get clipped to these scroll windows yet. Scroll bars also don't block world input yet. -->
<object type="text" name="MANUAL_HISTORY" scrollbar="true" scrollbar_style="manual_scrollbar" sprite="0ad_indent" font="trebuchet12" textcolor="0 0 0" z="100" ghost="false"><action on="Load"><![CDATA[ setSizeArray(this.name, Crd[MANUAL_HISTORY]); ]]></action></object>
<object type="button" name="MANUAL_EXIT_BUTTON" sprite="exit_sprite" sprite_over="exit_sprite_over" ghost="false" z="100" hidden="false"><action on="Load"><![CDATA[ setSizeArray(this.name, Crd[MANUAL_EXIT_BUTTON]); ]]></action>
<action on="Press"><![CDATA[
// Close manual.
GUIObjectHide("MANUAL_GUI");
GUIObjectUnhide("SESSION_GUI");
]]></action>
</object>
</object>
</objects>

View File

@ -1,38 +0,0 @@
<?xml version="1.0" encoding="iso-8859-1" standalone="no" ?>
<!DOCTYPE objects SYSTEM "../gui.dtd">
<!--
==========================================
- JUKEBOX DEFINITION -
==========================================
-->
<objects>
<object type="empty" name="JUKEBOX_GUI" size="0 0 100% 100%" z="1" hidden="true">
<object type="text" name="JUKEBOX_BKG" sprite="0ad_window" font="prospero16" textcolor="0 0 0" hidden="false" ghost="true"><action on="Load"><![CDATA[ setSizeArray(this.name, Crd[JUKEBOX_BKG]); ]]></action>
<action on="Tick"><![CDATA[
if (!getGUIObjectByName("JUKEBOX_GUI").hidden)
jukeboxDisplay();
]]></action>
</object>
<object type="button" name="JUKEBOX_TITLEBAR" sprite="message_box_titlebar_middle" font="prospero18" text_align="center" text_valign="center" ><action on="Load"><![CDATA[ setSizeArray(this.name, Crd[JUKEBOX_TITLEBAR]); guiSetCaption(this.name, "Jukebox"); ]]></action></object>
<object type="image" name="JUKEBOX_TITLEBAR_LEFT" sprite="message_box_titlebar_left" ><action on="Load"><![CDATA[ setSizeArray(this.name, Crd[JUKEBOX_TITLEBAR_LEFT]); ]]></action></object>
<object type="image" name="JUKEBOX_TITLEBAR_RIGHT" sprite="message_box_titlebar_right" ><action on="Load"><![CDATA[ setSizeArray(this.name, Crd[JUKEBOX_TITLEBAR_RIGHT]); ]]></action></object>
<object type="button" name="JUKEBOX_LIST_FILE" sprite="0ad_indent" text_align="left" ><action on="Load"><![CDATA[ setSizeArray(this.name, Crd[JUKEBOX_LIST_FILE]); guiSetCaption(this.name, ""); ]]></action></object>
<object type="button" name="JUKEBOX_CATEGORY" style="session_button_object" ><action on="Load"><![CDATA[ setSizeArray(this.name, Crd[JUKEBOX_CATEGORY]); guiSetCaption(this.name, "All"); ]]></action></object>
<object type="button" name="JUKEBOX_EXIT_BUTTON" sprite="exit_sprite" sprite_over="exit_sprite_over" ghost="false" hidden="false"><action on="Load"><![CDATA[ setSizeArray(this.name, Crd[JUKEBOX_EXIT_BUTTON]); ]]></action>
<action on="Press"><![CDATA[
// Close jukebox.
GUIObjectHide("JUKEBOX_GUI");
GUIObjectUnhide("SESSION_GUI");
]]></action>
</object>
</object>
</objects>

View File

@ -1,13 +0,0 @@
<?xml version="1.0" encoding="iso-8859-1" standalone="no" ?>
<!DOCTYPE objects SYSTEM "../gui.dtd">
<!--
==========================================
- SESSION GUI SUB-WINDOW DEFINITIONS -
==========================================
-->
<objects>
</objects>

View File

@ -1,547 +0,0 @@
<?xml version="1.0" encoding="iso-8859-1" standalone="no" ?>
<!DOCTYPE objects SYSTEM "../gui.dtd">
<!--
==========================================
- ATLAS SCENARIO EDITOR DEFINITION -
==========================================
-->
<objects>
<object type="empty" name="atlas_gui" size="0 0 100% 100%" z="1" hidden="true">
<!-- Simply black out the lowest level of the GUI, until such time as we're capable of starting an editor session of a scenario. -->
<object type="text" name="ATLAS_GUI_BKG" sprite="black" size="0 0 100% 100%" z="1" ghost="true" />
<!-- LEFT SELECTION PANE: Context panel along the left-hand side of the screen. -->
<object type="empty" name="ATLAS_LEFT_PANE" size="0 0 100% 100%" z="1" hidden="true">
<!-- LEFT SELECTION PANE BACKGROUND -->
<object type="text" name="ATLAS_LEFT_PANE_BKG" sprite="atlas_window_rt_border"><action on="Load"><![CDATA[ setSizeArray(this.name, Crd[ATLAS_LEFT_PANE_BKG]); ]]></action></object>
<!-- LEFT SELECTION PANE HEADINGS -->
<object type="text" name="ATLAS_LEFT_PANE_SECTION_HEADING_1" sprite="atlas_border" style="atlas_heading" text_align="left" ><action on="Load"><![CDATA[ setSizeArray(this.name, Crd[ATLAS_LEFT_PANE_SECTION_HEADING_1]); ]]></action></object>
<object type="text" name="ATLAS_LEFT_PANE_SECTION_HEADING_2" sprite="atlas_border" style="atlas_sub_heading" ><action on="Load"><![CDATA[ setSizeArray(this.name, Crd[ATLAS_LEFT_PANE_SECTION_HEADING_2]); ]]></action></object>
<object type="text" name="ATLAS_LEFT_PANE_SECTION_HEADING_3" sprite="atlas_border" style="atlas_sub_heading" ><action on="Load"><![CDATA[ setSizeArray(this.name, Crd[ATLAS_LEFT_PANE_SECTION_HEADING_3]); ]]></action></object>
<!-- MAP CREATOR SECTION MENU -->
<object type="empty" name="ATLAS_LEFT_PANE_SECTION_MAP" size="0 0 100% 100%" z="1" hidden="true">
<object type="empty" name="ATLAS_LEFT_PANE_SECTION_MAP_TYPE_SIZE" size="0 0 100% 100%" z="1" >
<object type="text" name="ATLAS_LEFT_PANE_SECTION_MAP_SIZE_LABEL" style="atlas_label_text">Size<action on="Load"><![CDATA[ setSizeArray(this.name, Crd[ATLAS_LEFT_PANE_SECTION_MAP_SIZE_LABEL]); ]]></action></object>
<object type="input" name="ATLAS_LEFT_PANE_SECTION_MAP_TILE_WIDTH_INPUT_BOX" style="atlas_input"><action on="Load"><![CDATA[ setSizeArray(this.name, Crd[ATLAS_LEFT_PANE_SECTION_MAP_TILE_WIDTH_INPUT_BOX]); guiSetCaption("ATLAS_LEFT_PANE_SECTION_MAP_TILE_WIDTH_INPUT_BOX",200); ]]></action></object>
<object type="text" name="ATLAS_LEFT_PANE_SECTION_MAP_TILE_X" style="atlas_label_text">X<action on="Load"><![CDATA[ setSizeArray(this.name, Crd[ATLAS_LEFT_PANE_SECTION_MAP_TILE_X]); ]]></action></object>
<object type="input" name="ATLAS_LEFT_PANE_SECTION_MAP_TILE_HEIGHT_INPUT_BOX" style="atlas_input"><action on="Load"><![CDATA[ setSizeArray(this.name, Crd[ATLAS_LEFT_PANE_SECTION_MAP_TILE_HEIGHT_INPUT_BOX]); guiSetCaption("ATLAS_LEFT_PANE_SECTION_MAP_TILE_HEIGHT_INPUT_BOX",200); ]]></action></object>
<object type="empty" name="ATLAS_LEFT_PANE_SECTION_MAP_SIZE_RADIO" size="0 0 100% 100%" z="1" >
<object type="button" name="ATLAS_LEFT_PANE_SECTION_MAP_SIZE_BUTTON_SMALL" style="atlas_button" >Small<action on="Load"><![CDATA[ setSizeArray(this.name, Crd[ATLAS_LEFT_PANE_SECTION_MAP_SIZE_BUTTON_SMALL]); ]]></action>
<action on="Press"><![CDATA[
guiSetCaption("ATLAS_LEFT_PANE_SECTION_MAP_TILE_WIDTH_INPUT_BOX", 100);
guiSetCaption("ATLAS_LEFT_PANE_SECTION_MAP_TILE_HEIGHT_INPUT_BOX", 100);
]]></action>
</object>
<object type="button" name="ATLAS_LEFT_PANE_SECTION_MAP_SIZE_BUTTON_MEDIUM" style="atlas_button" font="tahoma9" >Medium<action on="Load"><![CDATA[ setSizeArray(this.name, Crd[ATLAS_LEFT_PANE_SECTION_MAP_SIZE_BUTTON_MEDIUM]); ]]></action>
<action on="Press"><![CDATA[
guiSetCaption("ATLAS_LEFT_PANE_SECTION_MAP_TILE_WIDTH_INPUT_BOX", 200);
guiSetCaption("ATLAS_LEFT_PANE_SECTION_MAP_TILE_HEIGHT_INPUT_BOX", 200);
]]></action>
</object>
<object type="button" name="ATLAS_LEFT_PANE_SECTION_MAP_SIZE_BUTTON_LARGE" style="atlas_button" >Large<action on="Load"><![CDATA[ setSizeArray(this.name, Crd[ATLAS_LEFT_PANE_SECTION_MAP_SIZE_BUTTON_LARGE]); ]]></action>
<action on="Press"><![CDATA[
guiSetCaption("ATLAS_LEFT_PANE_SECTION_MAP_TILE_WIDTH_INPUT_BOX", 300);
guiSetCaption("ATLAS_LEFT_PANE_SECTION_MAP_TILE_HEIGHT_INPUT_BOX", 300);
]]></action>
</object>
<object type="button" name="ATLAS_LEFT_PANE_SECTION_MAP_SIZE_BUTTON_HUGE" style="atlas_button" >Huge<action on="Load"><![CDATA[ setSizeArray(this.name, Crd[ATLAS_LEFT_PANE_SECTION_MAP_SIZE_BUTTON_HUGE]); ]]></action>
<action on="Press"><![CDATA[
guiSetCaption("ATLAS_LEFT_PANE_SECTION_MAP_TILE_WIDTH_INPUT_BOX", 400);
guiSetCaption("ATLAS_LEFT_PANE_SECTION_MAP_TILE_HEIGHT_INPUT_BOX", 400);
]]></action>
</object>
</object>
<object type="text" name="ATLAS_LEFT_PANE_SECTION_MAP_SIZE_HR" sprite="atlas_hline" ><action on="Load"><![CDATA[ setSizeArray(this.name, Crd[ATLAS_LEFT_PANE_SECTION_MAP_SIZE_HR]); ]]></action></object>
</object>
<object type="empty" name="ATLAS_LEFT_PANE_SECTION_MAP_SETTINGS" size="0 0 100% 100%" z="1" >
<object type="text" name="ATLAS_LEFT_PANE_SECTION_MAP_SETTINGS_PLAYER_LABEL" style="atlas_label_text" >Players<action on="Load"><![CDATA[ setSizeArray(this.name, Crd[ATLAS_LEFT_PANE_SECTION_MAP_SETTINGS_PLAYER_LABEL]); ]]></action></object>
<object type="input" name="ATLAS_LEFT_PANE_SECTION_MAP_SETTINGS_PLAYER_INPUT_BOX" style="atlas_input"><action on="Load"><![CDATA[ setSizeArray(this.name, Crd[ATLAS_LEFT_PANE_SECTION_MAP_SETTINGS_PLAYER_INPUT_BOX]); guiSetCaption("ATLAS_LEFT_PANE_SECTION_MAP_SETTINGS_PLAYER_INPUT_BOX", 4); ]]></action></object>
<object type="button" name="ATLAS_LEFT_PANE_SECTION_MAP_SETTINGS_PLAYER_INPUT_BOX_UP" sprite="atlas_sheet_updown_button" cell_id="0" ><action on="Load"><![CDATA[ setSizeArray(this.name, Crd[ATLAS_LEFT_PANE_SECTION_MAP_SETTINGS_PLAYER_INPUT_BOX_UP]); ]]></action>
<action on="Press"><![CDATA[
guiModifyCaption("ATLAS_LEFT_PANE_SECTION_MAP_SETTINGS_PLAYER_INPUT_BOX", 1);
]]></action>
</object>
<object type="button" name="ATLAS_LEFT_PANE_SECTION_MAP_SETTINGS_PLAYER_INPUT_BOX_DN" sprite="atlas_sheet_updown_button" cell_id="1" ><action on="Load"><![CDATA[ setSizeArray(this.name, Crd[ATLAS_LEFT_PANE_SECTION_MAP_SETTINGS_PLAYER_INPUT_BOX_DN]); ]]></action>
<action on="Press"><![CDATA[
guiModifyCaption("ATLAS_LEFT_PANE_SECTION_MAP_SETTINGS_PLAYER_INPUT_BOX", -1);
]]></action>
</object>
<object type="text" name="ATLAS_LEFT_PANE_SECTION_MAP_SETTINGS_SETTLEMENT_LABEL" style="atlas_label_text" >Settlements<action on="Load"><![CDATA[ setSizeArray(this.name, Crd[ATLAS_LEFT_PANE_SECTION_MAP_SETTINGS_SETTLEMENT_LABEL]); ]]></action></object>
<object type="input" name="ATLAS_LEFT_PANE_SECTION_MAP_SETTINGS_SETTLEMENT_INPUT_BOX" style="atlas_input"><action on="Load"><![CDATA[ setSizeArray(this.name, Crd[ATLAS_LEFT_PANE_SECTION_MAP_SETTINGS_SETTLEMENT_INPUT_BOX]); guiSetCaption("ATLAS_LEFT_PANE_SECTION_MAP_SETTINGS_SETTLEMENT_INPUT_BOX", 2); ]]></action></object>
<object type="button" name="ATLAS_LEFT_PANE_SECTION_MAP_SETTINGS_SETTLEMENT_INPUT_BOX_UP" sprite="atlas_sheet_updown_button" cell_id="0" ><action on="Load"><![CDATA[ setSizeArray(this.name, Crd[ATLAS_LEFT_PANE_SECTION_MAP_SETTINGS_SETTLEMENT_INPUT_BOX_UP]); ]]></action>
<action on="Press"><![CDATA[
guiModifyCaption("ATLAS_LEFT_PANE_SECTION_MAP_SETTINGS_SETTLEMENT_INPUT_BOX", 1);
]]></action>
</object>
<object type="button" name="ATLAS_LEFT_PANE_SECTION_MAP_SETTINGS_SETTLEMENT_INPUT_BOX_DN" sprite="atlas_sheet_updown_button" cell_id="1" ><action on="Load"><![CDATA[ setSizeArray(this.name, Crd[ATLAS_LEFT_PANE_SECTION_MAP_SETTINGS_SETTLEMENT_INPUT_BOX_DN]); ]]></action>
<action on="Press"><![CDATA[
guiModifyCaption("ATLAS_LEFT_PANE_SECTION_MAP_SETTINGS_SETTLEMENT_INPUT_BOX", -1);
]]></action>
</object>
<object type="text" name="ATLAS_LEFT_PANE_SECTION_MAP_SETTINGS_RESOURCES_LABEL" style="atlas_label_text" >Resources<action on="Load"><![CDATA[ setSizeArray(this.name, Crd[ATLAS_LEFT_PANE_SECTION_MAP_SETTINGS_RESOURCES_LABEL]); ]]></action></object>
<!-- NOTE: Needs to be made a drop-down box when this control becomes available (options Low (.5), Normal (0), High (2) ). -->
<object type="input" name="ATLAS_LEFT_PANE_SECTION_MAP_SETTINGS_RESOURCES_COMBO_BOX" style="atlas_input"><action on="Load"><![CDATA[ setSizeArray(this.name, Crd[ATLAS_LEFT_PANE_SECTION_MAP_SETTINGS_RESOURCES_COMBO_BOX]); guiSetCaption("ATLAS_LEFT_PANE_SECTION_MAP_SETTINGS_RESOURCES_COMBO_BOX", "Normal"); ]]></action></object>
</object>
<object type="empty" name="ATLAS_LEFT_PANE_SECTION_MAP_GENERATE" size="0 0 100% 100%" z="1" >
<object type="text" name="ATLAS_LEFT_PANE_SECTION_GENERATE_TERRAIN_MAP_LABEL" style="atlas_label_text" >Terrain Map<action on="Load"><![CDATA[ setSizeArray(this.name, Crd[ATLAS_LEFT_PANE_SECTION_GENERATE_TERRAIN_MAP_LABEL]); ]]></action></object>
<object type="input" name="ATLAS_LEFT_PANE_SECTION_GENERATE_TERRAIN_MAP_INPUT_BOX" style="atlas_input"><action on="Load"><![CDATA[ setSizeArray(this.name, Crd[ATLAS_LEFT_PANE_SECTION_GENERATE_TERRAIN_MAP_INPUT_BOX]); ]]></action></object>
<object type="text" name="ATLAS_LEFT_PANE_SECTION_GENERATE_HEIGHT_MAP_LABEL" style="atlas_label_text" >Height Map<action on="Load"><![CDATA[ setSizeArray(this.name, Crd[ATLAS_LEFT_PANE_SECTION_GENERATE_HEIGHT_MAP_LABEL]); ]]></action></object>
<object type="input" name="ATLAS_LEFT_PANE_SECTION_GENERATE_HEIGHT_MAP_INPUT_BOX" style="atlas_input"><action on="Load"><![CDATA[ setSizeArray(this.name, Crd[ATLAS_LEFT_PANE_SECTION_GENERATE_HEIGHT_MAP_INPUT_BOX]); ]]></action></object>
<object type="text" name="ATLAS_LEFT_PANE_SECTION_GENERATE_BORDER" sprite="atlas_border" style="atlas_label_text" ><action on="Load"><![CDATA[ setSizeArray(this.name, Crd[ATLAS_LEFT_PANE_SECTION_GENERATE_BORDER]); ]]></action></object>
<object type="button" name="ATLAS_LEFT_PANE_SECTION_GENERATE_BUTTON" sprite="atlas_button" style="atlas_heading" >Generate!<action on="Load"><![CDATA[ setSizeArray(this.name, Crd[ATLAS_LEFT_PANE_SECTION_GENERATE_BUTTON]); ]]></action></object>
</object>
</object>
<!-- TERRAIN EDITOR SECTION MENU -->
<object type="empty" name="ATLAS_LEFT_PANE_SECTION_TERRAIN" size="0 0 100% 100%" z="1" hidden="true">
<object type="empty" name="ATLAS_LEFT_PANE_SECTION_TERRAIN_ELEVATION" size="0 0 100% 100%" z="1" >
<object type="button" name="ATLAS_LEFT_PANE_SECTION_TERRAIN_ELEVATION_MODIFY_BUTTON" style="atlas_button" >Modify<action on="Load"><![CDATA[ setSizeArray(this.name, Crd[ATLAS_LEFT_PANE_SECTION_TERRAIN_ELEVATION_MODIFY_BUTTON]); ]]></action></object>
<object type="button" name="ATLAS_LEFT_PANE_SECTION_TERRAIN_ELEVATION_SMOOTH_BUTTON" style="atlas_button" >Smooth<action on="Load"><![CDATA[ setSizeArray(this.name, Crd[ATLAS_LEFT_PANE_SECTION_TERRAIN_ELEVATION_SMOOTH_BUTTON]); ]]></action></object>
<object type="button" name="ATLAS_LEFT_PANE_SECTION_TERRAIN_ELEVATION_SAMPLE_BUTTON" style="atlas_button" >Sample<action on="Load"><![CDATA[ setSizeArray(this.name, Crd[ATLAS_LEFT_PANE_SECTION_TERRAIN_ELEVATION_SAMPLE_BUTTON]); ]]></action></object>
<object type="text" name="ATLAS_LEFT_PANE_SECTION_TERRAIN_ELEVATION_INTENSITY_LABEL" style="atlas_label_text" >Intensity<action on="Load"><![CDATA[ setSizeArray(this.name, Crd[ATLAS_LEFT_PANE_SECTION_TERRAIN_ELEVATION_INTENSITY_LABEL]); ]]></action></object>
<!-- NOTE: This will need to be replaced with a real slider when the control becomes available. -->
<object type="text" name="ATLAS_LEFT_PANE_SECTION_TERRAIN_ELEVATION_INTENSITY_SLIDER_BAR" sprite="atlas_global_slider_bar_h" ><action on="Load"><![CDATA[ setSizeArray(this.name, Crd[ATLAS_LEFT_PANE_SECTION_TERRAIN_ELEVATION_INTENSITY_SLIDER_BAR]); ]]></action></object>
<object type="button" name="ATLAS_LEFT_PANE_SECTION_TERRAIN_ELEVATION_INTENSITY_SLIDER_MARKER" sprite="atlas_global_slider_marker_h" ><action on="Load"><![CDATA[ setSizeArray(this.name, Crd[ATLAS_LEFT_PANE_SECTION_TERRAIN_ELEVATION_INTENSITY_SLIDER_MARKER]); ]]></action></object>
<object type="button" name="ATLAS_LEFT_PANE_SECTION_TERRAIN_ELEVATION_ROUGHEN_BUTTON" style="atlas_button" >Roughen<action on="Load"><![CDATA[ setSizeArray(this.name, Crd[ATLAS_LEFT_PANE_SECTION_TERRAIN_ELEVATION_ROUGHEN_BUTTON]); ]]></action></object>
<object type="text" name="ATLAS_LEFT_PANE_SECTION_TERRAIN_ELEVATION_STYLE_LABEL" style="atlas_label_text" >Style<action on="Load"><![CDATA[ setSizeArray(this.name, Crd[ATLAS_LEFT_PANE_SECTION_TERRAIN_ELEVATION_STYLE_LABEL]); ]]></action></object>
<!-- NOTE: Needs to be made a drop-down box when this control becomes available. -->
<object type="input" name="ATLAS_LEFT_PANE_SECTION_TERRAIN_ELEVATION_STYLE_COMBO_BOX" style="atlas_input"><action on="Load"><![CDATA[ setSizeArray(this.name, Crd[ATLAS_LEFT_PANE_SECTION_TERRAIN_ELEVATION_STYLE_COMBO_BOX]); guiSetCaption("ATLAS_LEFT_PANE_SECTION_TERRAIN_ELEVATION_STYLE_COMBO_BOX", "Bumpy"); ]]></action></object>
<object type="text" name="ATLAS_LEFT_PANE_SECTION_TERRAIN_ELEVATION_POWER_LABEL" style="atlas_label_text" >Power<action on="Load"><![CDATA[ setSizeArray(this.name, Crd[ATLAS_LEFT_PANE_SECTION_TERRAIN_ELEVATION_POWER_LABEL]); ]]></action></object>
<object type="input" name="ATLAS_LEFT_PANE_SECTION_TERRAIN_ELEVATION_POWER_INPUT_BOX" style="atlas_input"><action on="Load"><![CDATA[ setSizeArray(this.name, Crd[ATLAS_LEFT_PANE_SECTION_TERRAIN_ELEVATION_POWER_INPUT_BOX]); guiSetCaption("ATLAS_LEFT_PANE_SECTION_TERRAIN_ELEVATION_POWER_INPUT_BOX", "2.1"); ]]></action></object>
<object type="button" name="ATLAS_LEFT_PANE_SECTION_TERRAIN_ELEVATION_POWER_INPUT_BOX_UP" sprite="atlas_sheet_updown_button" cell_id="0" ><action on="Load"><![CDATA[ setSizeArray(this.name, Crd[ATLAS_LEFT_PANE_SECTION_TERRAIN_ELEVATION_POWER_INPUT_BOX_UP]); ]]></action>
<action on="Press"><![CDATA[
guiModifyCaption("ATLAS_LEFT_PANE_SECTION_TERRAIN_ELEVATION_POWER_INPUT_BOX", .1, 1);
]]></action>
</object>
<object type="button" name="ATLAS_LEFT_PANE_SECTION_TERRAIN_ELEVATION_POWER_INPUT_BOX_DN" sprite="atlas_sheet_updown_button" cell_id="1" ><action on="Load"><![CDATA[ setSizeArray(this.name, Crd[ATLAS_LEFT_PANE_SECTION_TERRAIN_ELEVATION_POWER_INPUT_BOX_DN]); ]]></action>
<action on="Press"><![CDATA[
guiModifyCaption("ATLAS_LEFT_PANE_SECTION_TERRAIN_ELEVATION_POWER_INPUT_BOX", -.1, 1);
]]></action>
</object>
<object type="text" name="ATLAS_LEFT_PANE_SECTION_TERRAIN_ELEVATION_SCALE_LABEL" style="atlas_label_text" >Scale<action on="Load"><![CDATA[ setSizeArray(this.name, Crd[ATLAS_LEFT_PANE_SECTION_TERRAIN_ELEVATION_SCALE_LABEL]); ]]></action></object>
<object type="input" name="ATLAS_LEFT_PANE_SECTION_TERRAIN_ELEVATION_SCALE_INPUT_BOX" style="atlas_input"><action on="Load"><![CDATA[ setSizeArray(this.name, Crd[ATLAS_LEFT_PANE_SECTION_TERRAIN_ELEVATION_SCALE_INPUT_BOX]); guiSetCaption("ATLAS_LEFT_PANE_SECTION_TERRAIN_ELEVATION_SCALE_INPUT_BOX", "1.0"); ]]></action></object>
<object type="button" name="ATLAS_LEFT_PANE_SECTION_TERRAIN_ELEVATION_SCALE_INPUT_BOX_UP" sprite="atlas_sheet_updown_button" cell_id="0" ><action on="Load"><![CDATA[ setSizeArray(this.name, Crd[ATLAS_LEFT_PANE_SECTION_TERRAIN_ELEVATION_SCALE_INPUT_BOX_UP]); ]]></action>
<action on="Press"><![CDATA[
guiModifyCaption("ATLAS_LEFT_PANE_SECTION_TERRAIN_ELEVATION_SCALE_INPUT_BOX", .1, 1);
]]></action>
</object>
<object type="button" name="ATLAS_LEFT_PANE_SECTION_TERRAIN_ELEVATION_SCALE_INPUT_BOX_DN" sprite="atlas_sheet_updown_button" cell_id="1" ><action on="Load"><![CDATA[ setSizeArray(this.name, Crd[ATLAS_LEFT_PANE_SECTION_TERRAIN_ELEVATION_SCALE_INPUT_BOX_DN]); ]]></action>
<action on="Press"><![CDATA[
guiModifyCaption("ATLAS_LEFT_PANE_SECTION_TERRAIN_ELEVATION_SCALE_INPUT_BOX", -.1, 1);
]]></action>
</object>
<object type="button" name="ATLAS_LEFT_PANE_SECTION_TERRAIN_ELEVATION_INCREMENT_BUTTON" style="atlas_button" >Increment<action on="Load"><![CDATA[ setSizeArray(this.name, Crd[ATLAS_LEFT_PANE_SECTION_TERRAIN_ELEVATION_INCREMENT_BUTTON]); ]]></action></object>
<object type="text" name="ATLAS_LEFT_PANE_SECTION_TERRAIN_ELEVATION_AMOUNT_LABEL" style="atlas_label_text" >Amount<action on="Load"><![CDATA[ setSizeArray(this.name, Crd[ATLAS_LEFT_PANE_SECTION_TERRAIN_ELEVATION_AMOUNT_LABEL]); ]]></action></object>
<object type="input" name="ATLAS_LEFT_PANE_SECTION_TERRAIN_ELEVATION_AMOUNT_INPUT_BOX" style="atlas_input"><action on="Load"><![CDATA[ setSizeArray(this.name, Crd[ATLAS_LEFT_PANE_SECTION_TERRAIN_ELEVATION_AMOUNT_INPUT_BOX]); guiSetCaption("ATLAS_LEFT_PANE_SECTION_TERRAIN_ELEVATION_AMOUNT_INPUT_BOX", "1.0"); ]]></action></object>
<object type="button" name="ATLAS_LEFT_PANE_SECTION_TERRAIN_ELEVATION_AMOUNT_INPUT_BOX_UP" sprite="atlas_sheet_updown_button" cell_id="0" ><action on="Load"><![CDATA[ setSizeArray(this.name, Crd[ATLAS_LEFT_PANE_SECTION_TERRAIN_ELEVATION_AMOUNT_INPUT_BOX_UP]); ]]></action>
<action on="Press"><![CDATA[
guiModifyCaption("ATLAS_LEFT_PANE_SECTION_TERRAIN_ELEVATION_AMOUNT_INPUT_BOX", .1, 1);
]]></action>
</object>
<object type="button" name="ATLAS_LEFT_PANE_SECTION_TERRAIN_ELEVATION_AMOUNT_INPUT_BOX_DN" sprite="atlas_sheet_updown_button" cell_id="1" ><action on="Load"><![CDATA[ setSizeArray(this.name, Crd[ATLAS_LEFT_PANE_SECTION_TERRAIN_ELEVATION_AMOUNT_INPUT_BOX_DN]); ]]></action>
<action on="Press"><![CDATA[
guiModifyCaption("ATLAS_LEFT_PANE_SECTION_TERRAIN_ELEVATION_AMOUNT_INPUT_BOX", -.1, 1);
]]></action>
</object>
<object type="text" name="ATLAS_LEFT_PANE_SECTION_TERRAIN_ELEVATION_HR" sprite="atlas_hline" ><action on="Load"><![CDATA[ setSizeArray(this.name, Crd[ATLAS_LEFT_PANE_SECTION_TERRAIN_ELEVATION_HR]); ]]></action></object>
</object>
<object type="empty" name="ATLAS_LEFT_PANE_SECTION_TERRAIN_CLIFF" size="0 0 100% 100%" z="1" >
<object type="text" name="ATLAS_LEFT_PANE_SECTION_TERRAIN_CLIFF_LIST" sprite="atlas_window_grey" scrollbar_style="atlas_scrollbar" scrollbar="true" ><action on="Load"><![CDATA[ setSizeArray(this.name, Crd[ATLAS_LEFT_PANE_SECTION_TERRAIN_CLIFF_LIST]); ]]></action></object>
<object type="text" name="ATLAS_LEFT_PANE_SECTION_TERRAIN_CLIFF_HEADING" style="atlas_label_text" >Cliff<action on="Load"><![CDATA[ setSizeArray(this.name, Crd[ATLAS_LEFT_PANE_SECTION_TERRAIN_CLIFF_HEADING]); ]]></action></object>
<object type="text" name="ATLAS_LEFT_PANE_SECTION_TERRAIN_CLIFF_HEADING_HR" sprite="atlas_hline" ><action on="Load"><![CDATA[ setSizeArray(this.name, Crd[ATLAS_LEFT_PANE_SECTION_TERRAIN_CLIFF_HEADING_HR]); ]]></action></object>
<object type="button" name="ATLAS_LEFT_PANE_SECTION_TERRAIN_CLIFF_BUTTON_PLACE" style="atlas_button" >Place Cliff<action on="Load"><![CDATA[ setSizeArray(this.name, Crd[ATLAS_LEFT_PANE_SECTION_TERRAIN_CLIFF_BUTTON_PLACE]); ]]></action></object>
<object type="text" name="ATLAS_LEFT_PANE_SECTION_TERRAIN_CLIFF_HEIGHT_LABEL" style="atlas_label_text" text_align="left" >Height<action on="Load"><![CDATA[ setSizeArray(this.name, Crd[ATLAS_LEFT_PANE_SECTION_TERRAIN_CLIFF_HEIGHT_LABEL]); ]]></action></object>
<object type="input" name="ATLAS_LEFT_PANE_SECTION_TERRAIN_CLIFF_HEIGHT_INPUT_BOX" style="atlas_input"><action on="Load"><![CDATA[ setSizeArray(this.name, Crd[ATLAS_LEFT_PANE_SECTION_TERRAIN_CLIFF_HEIGHT_INPUT_BOX]); guiSetCaption("ATLAS_LEFT_PANE_SECTION_TERRAIN_CLIFF_HEIGHT_INPUT_BOX", "3.0"); ]]></action></object>
<object type="button" name="ATLAS_LEFT_PANE_SECTION_TERRAIN_CLIFF_HEIGHT_INPUT_BOX_UP" sprite="atlas_sheet_updown_button" cell_id="0" ><action on="Load"><![CDATA[ setSizeArray(this.name, Crd[ATLAS_LEFT_PANE_SECTION_TERRAIN_CLIFF_HEIGHT_INPUT_BOX_UP]); ]]></action>
<action on="Press"><![CDATA[
guiModifyCaption("ATLAS_LEFT_PANE_SECTION_TERRAIN_CLIFF_HEIGHT_INPUT_BOX", .1, 1);
]]></action>
</object>
<object type="button" name="ATLAS_LEFT_PANE_SECTION_TERRAIN_CLIFF_HEIGHT_INPUT_BOX_DN" sprite="atlas_sheet_updown_button" cell_id="1" ><action on="Load"><![CDATA[ setSizeArray(this.name, Crd[ATLAS_LEFT_PANE_SECTION_TERRAIN_CLIFF_HEIGHT_INPUT_BOX_DN]); ]]></action>
<action on="Press"><![CDATA[
guiModifyCaption("ATLAS_LEFT_PANE_SECTION_TERRAIN_CLIFF_HEIGHT_INPUT_BOX", -.1, 1);
]]></action>
</object>
<object type="text" name="ATLAS_LEFT_PANE_SECTION_TERRAIN_CLIFF_ANGLE_LABEL" style="atlas_label_text" text_align="left" >Angle<action on="Load"><![CDATA[ setSizeArray(this.name, Crd[ATLAS_LEFT_PANE_SECTION_TERRAIN_CLIFF_ANGLE_LABEL]); ]]></action></object>
<object type="input" name="ATLAS_LEFT_PANE_SECTION_TERRAIN_CLIFF_ANGLE_INPUT_BOX" style="atlas_input"><action on="Load"><![CDATA[ setSizeArray(this.name, Crd[ATLAS_LEFT_PANE_SECTION_TERRAIN_CLIFF_ANGLE_INPUT_BOX]); guiSetCaption("ATLAS_LEFT_PANE_SECTION_TERRAIN_CLIFF_ANGLE_INPUT_BOX", "65.0"); ]]></action></object>
<object type="button" name="ATLAS_LEFT_PANE_SECTION_TERRAIN_CLIFF_ANGLE_INPUT_BOX_UP" sprite="atlas_sheet_updown_button" cell_id="0" ><action on="Load"><![CDATA[ setSizeArray(this.name, Crd[ATLAS_LEFT_PANE_SECTION_TERRAIN_CLIFF_ANGLE_INPUT_BOX_UP]); ]]></action>
<action on="Press"><![CDATA[
guiModifyCaption("ATLAS_LEFT_PANE_SECTION_TERRAIN_CLIFF_ANGLE_INPUT_BOX", .1, 1);
]]></action>
</object>
<object type="button" name="ATLAS_LEFT_PANE_SECTION_TERRAIN_CLIFF_ANGLE_INPUT_BOX_DN" sprite="atlas_sheet_updown_button" cell_id="1" ><action on="Load"><![CDATA[ setSizeArray(this.name, Crd[ATLAS_LEFT_PANE_SECTION_TERRAIN_CLIFF_ANGLE_INPUT_BOX_DN]); ]]></action>
<action on="Press"><![CDATA[
guiModifyCaption("ATLAS_LEFT_PANE_SECTION_TERRAIN_CLIFF_ANGLE_INPUT_BOX", -.1, 1);
]]></action>
</object>
<object type="text" name="ATLAS_LEFT_PANE_SECTION_TERRAIN_CLIFF_SMOOTH_LABEL" style="atlas_label_text" text_align="left" >Smooth<action on="Load"><![CDATA[ setSizeArray(this.name, Crd[ATLAS_LEFT_PANE_SECTION_TERRAIN_CLIFF_SMOOTH_LABEL]); ]]></action></object>
<object type="input" name="ATLAS_LEFT_PANE_SECTION_TERRAIN_CLIFF_SMOOTH_INPUT_BOX" style="atlas_input"><action on="Load"><![CDATA[ setSizeArray(this.name, Crd[ATLAS_LEFT_PANE_SECTION_TERRAIN_CLIFF_SMOOTH_INPUT_BOX]); guiSetCaption("ATLAS_LEFT_PANE_SECTION_TERRAIN_CLIFF_SMOOTH_INPUT_BOX", "1.0"); ]]></action></object>
<object type="button" name="ATLAS_LEFT_PANE_SECTION_TERRAIN_CLIFF_SMOOTH_INPUT_BOX_UP" sprite="atlas_sheet_updown_button" cell_id="0" ><action on="Load"><![CDATA[ setSizeArray(this.name, Crd[ATLAS_LEFT_PANE_SECTION_TERRAIN_CLIFF_SMOOTH_INPUT_BOX_UP]); ]]></action>
<action on="Press"><![CDATA[
guiModifyCaption("ATLAS_LEFT_PANE_SECTION_TERRAIN_CLIFF_SMOOTH_INPUT_BOX", .1, 1);
]]></action>
</object>
<object type="button" name="ATLAS_LEFT_PANE_SECTION_TERRAIN_CLIFF_SMOOTH_INPUT_BOX_DN" sprite="atlas_sheet_updown_button" cell_id="1" ><action on="Load"><![CDATA[ setSizeArray(this.name, Crd[ATLAS_LEFT_PANE_SECTION_TERRAIN_CLIFF_SMOOTH_INPUT_BOX_DN]); ]]></action>
<action on="Press"><![CDATA[
guiModifyCaption("ATLAS_LEFT_PANE_SECTION_TERRAIN_CLIFF_SMOOTH_INPUT_BOX", -.1, 1);
]]></action>
</object>
<object type="button" name="ATLAS_LEFT_PANE_SECTION_TERRAIN_CLIFF_BUTTON_CUSTOM" style="atlas_button" >Custom Cliff<action on="Load"><![CDATA[ setSizeArray(this.name, Crd[ATLAS_LEFT_PANE_SECTION_TERRAIN_CLIFF_BUTTON_CUSTOM]); ]]></action></object>
<object type="text" name="ATLAS_LEFT_PANE_SECTION_TERRAIN_CLIFF_HR" sprite="atlas_hline" ><action on="Load"><![CDATA[ setSizeArray(this.name, Crd[ATLAS_LEFT_PANE_SECTION_TERRAIN_CLIFF_HR]); ]]></action></object>
</object>
<object type="empty" name="ATLAS_LEFT_PANE_SECTION_TERRAIN_WATER" size="0 0 100% 100%" z="1" >
<object type="text" name="ATLAS_LEFT_PANE_SECTION_TERRAIN_WATER_LIST" sprite="atlas_window_grey" scrollbar_style="atlas_scrollbar" scrollbar="true" ><action on="Load"><![CDATA[ setSizeArray(this.name, Crd[ATLAS_LEFT_PANE_SECTION_TERRAIN_WATER_LIST]); ]]></action></object>
<object type="text" name="ATLAS_LEFT_PANE_SECTION_TERRAIN_WATER_HEADING" style="atlas_label_text" >Water<action on="Load"><![CDATA[ setSizeArray(this.name, Crd[ATLAS_LEFT_PANE_SECTION_TERRAIN_WATER_HEADING]); ]]></action></object>
<object type="text" name="ATLAS_LEFT_PANE_SECTION_TERRAIN_WATER_HEADING_HR" sprite="atlas_hline" ><action on="Load"><![CDATA[ setSizeArray(this.name, Crd[ATLAS_LEFT_PANE_SECTION_TERRAIN_WATER_HEADING_HR]); ]]></action></object>
<object type="button" name="ATLAS_LEFT_PANE_SECTION_TERRAIN_WATER_BUTTON_PLACE" style="atlas_button" >Place Water<action on="Load"><![CDATA[ setSizeArray(this.name, Crd[ATLAS_LEFT_PANE_SECTION_TERRAIN_WATER_BUTTON_PLACE]); ]]></action></object>
<object type="button" name="ATLAS_LEFT_PANE_SECTION_TERRAIN_WATER_BUTTON_BEAUTIFY" style="atlas_icon_border" cell_id="12" ><action on="Load"><![CDATA[ setSizeArray(this.name, Crd[ATLAS_LEFT_PANE_SECTION_TERRAIN_WATER_BUTTON_BEAUTIFY]); ]]></action></object>
<object type="text" name="ATLAS_LEFT_PANE_SECTION_TERRAIN_WATER_DEPTH_LABEL" style="atlas_label_text" text_align="left" >Depth<action on="Load"><![CDATA[ setSizeArray(this.name, Crd[ATLAS_LEFT_PANE_SECTION_TERRAIN_WATER_DEPTH_LABEL]); ]]></action></object>
<object type="input" name="ATLAS_LEFT_PANE_SECTION_TERRAIN_WATER_DEPTH_INPUT_BOX" style="atlas_input"><action on="Load"><![CDATA[ setSizeArray(this.name, Crd[ATLAS_LEFT_PANE_SECTION_TERRAIN_WATER_DEPTH_INPUT_BOX]); guiSetCaption("ATLAS_LEFT_PANE_SECTION_TERRAIN_WATER_DEPTH_INPUT_BOX", "1.0"); ]]></action></object>
<object type="button" name="ATLAS_LEFT_PANE_SECTION_TERRAIN_WATER_DEPTH_INPUT_BOX_UP" sprite="atlas_sheet_updown_button" cell_id="0" ><action on="Load"><![CDATA[ setSizeArray(this.name, Crd[ATLAS_LEFT_PANE_SECTION_TERRAIN_WATER_DEPTH_INPUT_BOX_UP]); ]]></action>
<action on="Press"><![CDATA[
guiModifyCaption("ATLAS_LEFT_PANE_SECTION_TERRAIN_WATER_DEPTH_INPUT_BOX", .1, 1);
]]></action>
</object>
<object type="button" name="ATLAS_LEFT_PANE_SECTION_TERRAIN_WATER_DEPTH_INPUT_BOX_DN" sprite="atlas_sheet_updown_button" cell_id="1" ><action on="Load"><![CDATA[ setSizeArray(this.name, Crd[ATLAS_LEFT_PANE_SECTION_TERRAIN_WATER_DEPTH_INPUT_BOX_DN]); ]]></action>
<action on="Press"><![CDATA[
guiModifyCaption("ATLAS_LEFT_PANE_SECTION_TERRAIN_WATER_DEPTH_INPUT_BOX", -.1, 1);
]]></action>
</object>
<object type="text" name="ATLAS_LEFT_PANE_SECTION_TERRAIN_WATER_COLOUR_LABEL" style="atlas_label_text" text_align="left" >Colour<action on="Load"><![CDATA[ setSizeArray(this.name, Crd[ATLAS_LEFT_PANE_SECTION_TERRAIN_WATER_COLOUR_LABEL]); ]]></action></object>
<object type="input" name="ATLAS_LEFT_PANE_SECTION_TERRAIN_WATER_COLOUR_R_INPUT_BOX" style="atlas_input"><action on="Load"><![CDATA[ setSizeArray(this.name, Crd[ATLAS_LEFT_PANE_SECTION_TERRAIN_WATER_COLOUR_R_INPUT_BOX]); guiSetCaption("ATLAS_LEFT_PANE_SECTION_TERRAIN_WATER_COLOUR_R_INPUT_BOX", "100"); ]]></action></object>
<object type="input" name="ATLAS_LEFT_PANE_SECTION_TERRAIN_WATER_COLOUR_G_INPUT_BOX" style="atlas_input"><action on="Load"><![CDATA[ setSizeArray(this.name, Crd[ATLAS_LEFT_PANE_SECTION_TERRAIN_WATER_COLOUR_G_INPUT_BOX]); guiSetCaption("ATLAS_LEFT_PANE_SECTION_TERRAIN_WATER_COLOUR_G_INPUT_BOX", "255"); ]]></action></object>
<object type="input" name="ATLAS_LEFT_PANE_SECTION_TERRAIN_WATER_COLOUR_B_INPUT_BOX" style="atlas_input"><action on="Load"><![CDATA[ setSizeArray(this.name, Crd[ATLAS_LEFT_PANE_SECTION_TERRAIN_WATER_COLOUR_B_INPUT_BOX]); guiSetCaption("ATLAS_LEFT_PANE_SECTION_TERRAIN_WATER_COLOUR_B_INPUT_BOX", "80"); ]]></action></object>
<object type="text" name="ATLAS_LEFT_PANE_SECTION_TERRAIN_WATER_COLOUR_TINT_BOX" style="atlas_indent" text_align="left" ><action on="Load"><![CDATA[ setSizeArray(this.name, Crd[ATLAS_LEFT_PANE_SECTION_TERRAIN_WATER_COLOUR_TINT_BOX]); ]]></action></object>
<object type="text" name="ATLAS_LEFT_PANE_SECTION_TERRAIN_WATER_SMOOTH_LABEL" style="atlas_label_text" text_align="left" ><action on="Load"><![CDATA[ setSizeArray(this.name, Crd[ATLAS_LEFT_PANE_SECTION_TERRAIN_WATER_SMOOTH_LABEL]); guiSetCaption("ATLAS_LEFT_PANE_SECTION_TERRAIN_WATER_SMOOTH_LABEL","Smooth\nRadius"); ]]></action></object>
<object type="input" name="ATLAS_LEFT_PANE_SECTION_TERRAIN_WATER_SMOOTH_INPUT_BOX" style="atlas_input"><action on="Load"><![CDATA[ setSizeArray(this.name, Crd[ATLAS_LEFT_PANE_SECTION_TERRAIN_WATER_SMOOTH_INPUT_BOX]); guiSetCaption("ATLAS_LEFT_PANE_SECTION_TERRAIN_WATER_SMOOTH_INPUT_BOX", "4.0"); ]]></action></object>
<object type="button" name="ATLAS_LEFT_PANE_SECTION_TERRAIN_WATER_SMOOTH_INPUT_BOX_UP" sprite="atlas_sheet_updown_button" cell_id="0" ><action on="Load"><![CDATA[ setSizeArray(this.name, Crd[ATLAS_LEFT_PANE_SECTION_TERRAIN_WATER_SMOOTH_INPUT_BOX_UP]); ]]></action>
<action on="Press"><![CDATA[
guiModifyCaption("ATLAS_LEFT_PANE_SECTION_TERRAIN_WATER_SMOOTH_INPUT_BOX", .1, 1);
]]></action>
</object>
<object type="button" name="ATLAS_LEFT_PANE_SECTION_TERRAIN_WATER_SMOOTH_INPUT_BOX_DN" sprite="atlas_sheet_updown_button" cell_id="1" ><action on="Load"><![CDATA[ setSizeArray(this.name, Crd[ATLAS_LEFT_PANE_SECTION_TERRAIN_WATER_SMOOTH_INPUT_BOX_DN]); ]]></action>
<action on="Press"><![CDATA[
guiModifyCaption("ATLAS_LEFT_PANE_SECTION_TERRAIN_WATER_SMOOTH_INPUT_BOX", -.1, 1);
]]></action>
</object>
<object type="button" name="ATLAS_LEFT_PANE_SECTION_TERRAIN_WATER_BUTTON_CUSTOM" style="atlas_button" >Custom Water<action on="Load"><![CDATA[ setSizeArray(this.name, Crd[ATLAS_LEFT_PANE_SECTION_TERRAIN_WATER_BUTTON_CUSTOM]); ]]></action></object>
<object type="text" name="ATLAS_LEFT_PANE_SECTION_TERRAIN_WATER_HR" sprite="atlas_hline" ><action on="Load"><![CDATA[ setSizeArray(this.name, Crd[ATLAS_LEFT_PANE_SECTION_TERRAIN_WATER_HR]); ]]></action></object>
</object>
</object>
<!-- OBJECT EDITOR SECTION MENU -->
<object type="empty" name="ATLAS_LEFT_PANE_SECTION_OBJECT" size="0 0 100% 100%" z="1" hidden="true">
<object type="text" name="ATLAS_LEFT_PANE_SECTION_OBJECT_CATEGORY_LABEL" style="atlas_label_text" text_align="left" >Category<action on="Load"><![CDATA[ setSizeArray(this.name, Crd[ATLAS_LEFT_PANE_SECTION_OBJECT_CATEGORY_LABEL]); ]]></action></object>
<!-- NOTE: This will need to be replaced with a combobox when the control becomes available. -->
<object type="input" name="ATLAS_LEFT_PANE_SECTION_OBJECT_CATEGORY_COMBO_BOX" style="atlas_input"><action on="Load"><![CDATA[ setSizeArray(this.name, Crd[ATLAS_LEFT_PANE_SECTION_OBJECT_CATEGORY_COMBO_BOX]); ]]></action></object>
<object type="button" name="ATLAS_LEFT_PANE_SECTION_OBJECT_BUTTON_CUSTOM_ACTOR" style="atlas_button" >Custom Actor<action on="Load"><![CDATA[ setSizeArray(this.name, Crd[ATLAS_LEFT_PANE_SECTION_OBJECT_BUTTON_CUSTOM_ACTOR]); ]]></action></object>
<object type="button" name="ATLAS_LEFT_PANE_SECTION_OBJECT_BUTTON_CUSTOM_ENTITY" style="atlas_button" >Custom Entity<action on="Load"><![CDATA[ setSizeArray(this.name, Crd[ATLAS_LEFT_PANE_SECTION_OBJECT_BUTTON_CUSTOM_ENTITY]); ]]></action></object>
<object type="text" name="ATLAS_LEFT_PANE_SECTION_OBJECT_LIST_BKG" sprite="atlas_window_grey" ><action on="Load"><![CDATA[ setSizeArray(this.name, Crd[ATLAS_LEFT_PANE_SECTION_OBJECT_LIST_BKG]); ]]></action></object>
<object type="text" name="ATLAS_LEFT_PANE_SECTION_OBJECT_LIST_PLAYER_LABEL" style="atlas_label_text" ><action on="Load"><![CDATA[ setSizeArray(this.name, Crd[ATLAS_LEFT_PANE_SECTION_OBJECT_LIST_PLAYER_LABEL]); guiSetCaption("ATLAS_LEFT_PANE_SECTION_OBJECT_LIST_PLAYER_LABEL","Player"); ]]></action></object>
<object type="input" name="ATLAS_LEFT_PANE_SECTION_OBJECT_LIST_PLAYER_INPUT_BOX" style="atlas_input"><action on="Load"><![CDATA[ setSizeArray(this.name, Crd[ATLAS_LEFT_PANE_SECTION_OBJECT_LIST_PLAYER_INPUT_BOX]); guiSetCaption("ATLAS_LEFT_PANE_SECTION_OBJECT_LIST_PLAYER_INPUT_BOX", "1"); ]]></action></object>
<object type="button" name="ATLAS_LEFT_PANE_SECTION_OBJECT_LIST_PLAYER_INPUT_BOX_UP" sprite="atlas_sheet_updown_button" cell_id="0" ><action on="Load"><![CDATA[ setSizeArray(this.name, Crd[ATLAS_LEFT_PANE_SECTION_OBJECT_LIST_PLAYER_INPUT_BOX_UP]); ]]></action>
<action on="Press"><![CDATA[
guiModifyCaption("ATLAS_LEFT_PANE_SECTION_OBJECT_LIST_PLAYER_INPUT_BOX", 1, 0);
]]></action>
</object>
<object type="button" name="ATLAS_LEFT_PANE_SECTION_OBJECT_LIST_PLAYER_INPUT_BOX_DN" sprite="atlas_sheet_updown_button" cell_id="1" ><action on="Load"><![CDATA[ setSizeArray(this.name, Crd[ATLAS_LEFT_PANE_SECTION_OBJECT_LIST_PLAYER_INPUT_BOX_DN]); ]]></action>
<action on="Press"><![CDATA[
guiModifyCaption("ATLAS_LEFT_PANE_SECTION_OBJECT_LIST_PLAYER_INPUT_BOX", -1, 0);
]]></action>
</object>
<object type="text" name="ATLAS_LEFT_PANE_SECTION_OBJECT_LIST_HEADING" style="atlas_heading" >Objects<action on="Load"><![CDATA[ setSizeArray(this.name, Crd[ATLAS_LEFT_PANE_SECTION_OBJECT_LIST_HEADING]); ]]></action></object>
<object type="text" name="ATLAS_LEFT_PANE_SECTION_OBJECT_LIST_SORT_LABEL" style="atlas_label_text" text_align="left" >Sort<action on="Load"><![CDATA[ setSizeArray(this.name, Crd[ATLAS_LEFT_PANE_SECTION_OBJECT_LIST_SORT_LABEL]); ]]></action></object>
<!-- NOTE: This will need to be replaced with a combobox when the control becomes available. -->
<object type="input" name="ATLAS_LEFT_PANE_SECTION_OBJECT_LIST_SORT_COMBO_BOX" style="atlas_input"><action on="Load"><![CDATA[ setSizeArray(this.name, Crd[ATLAS_LEFT_PANE_SECTION_OBJECT_LIST_SORT_COMBO_BOX]); ]]></action></object>
<object type="text" name="ATLAS_LEFT_PANE_SECTION_OBJECT_LIST" sprite="atlas_window_grey" scrollbar_style="atlas_scrollbar" scrollbar="true" ><action on="Load"><![CDATA[ setSizeArray(this.name, Crd[ATLAS_LEFT_PANE_SECTION_OBJECT_LIST]); ]]></action></object>
</object>
</object>
<!-- BOTTOM SELECTION PANE: Context panel along the bottom of the screen. -->
<object type="empty" name="ATLAS_BOTTOM_PANE" size="0 0 100% 100%" z="1" hidden="true">
<!-- BOTTOM SELECTION BACKGROUND -->
<object type="text" name="ATLAS_BOTTOM_PANE_BKG" sprite="atlas_window_rt_border" ><action on="Load"><![CDATA[ setSizeArray(this.name, Crd[ATLAS_BOTTOM_PANE_BKG]); ]]></action></object>
<!-- LEFT/BOTTOM SELECTION PANE CORNER -->
<object type="text" name="ATLAS_LB_CORNER" sprite="atlas_lb_corner" ><action on="Load"><![CDATA[ setSizeArray(this.name, Crd[ATLAS_LB_CORNER]); ]]></action></object>
<!-- RB: MINIMAP BACKGROUND -->
<object type="text" name="ATLAS_MINIMAP_BKG" sprite="atlas_window_t_border" ><action on="Load"><![CDATA[ setSizeArray(this.name, Crd[ATLAS_MINIMAP_BKG]); ]]></action></object>
<!-- RIGHT/BOTTOM SELECTION PANE CORNER -->
<object type="text" name="ATLAS_RB_CORNER" sprite="atlas_rb_corner_x2" ><action on="Load"><![CDATA[ setSizeArray(this.name, Crd[ATLAS_RB_CORNER]); ]]></action></object>
<!-- TERRAIN EDITOR BOTTOM PANE -->
<object type="empty" name="ATLAS_BOTTOM_PANE_SECTION_TERRAIN" size="0 0 100% 100%" z="1" >
<object type="empty" name="ATLAS_BOTTOM_PANE_SECTION_TERRAIN_OTHER" size="0 0 100% 100%" z="1" >
<object type="text" name="ATLAS_BOTTOM_PANE_SECTION_TERRAIN_PREVIEW" style="atlas_indent" ><action on="Load"><![CDATA[ setSizeArray(this.name, Crd[ATLAS_BOTTOM_PANE_SECTION_TERRAIN_PREVIEW]); ]]></action></object>
<object type="text" name="ATLAS_BOTTOM_PANE_SECTION_TERRAIN_PREVIEW_LABEL" style="atlas_label_text" >Terrain Preview<action on="Load"><![CDATA[ setSizeArray(this.name, Crd[ATLAS_BOTTOM_PANE_SECTION_TERRAIN_PREVIEW_LABEL]); ]]></action></object>
<object type="text" name="ATLAS_BOTTOM_PANE_SECTION_TERRAIN_BRUSH_BORDER_LABEL" style="atlas_label_text" >Brush<action on="Load"><![CDATA[ setSizeArray(this.name, Crd[ATLAS_BOTTOM_PANE_SECTION_TERRAIN_BRUSH_BORDER_LABEL]); ]]></action></object>
<object type="text" name="ATLAS_BOTTOM_PANE_SECTION_TERRAIN_BRUSH_BORDER" sprite="atlas_border" ><action on="Load"><![CDATA[ setSizeArray(this.name, Crd[ATLAS_BOTTOM_PANE_SECTION_TERRAIN_BRUSH_BORDER]); ]]></action></object>
<!-- NOTE: This will need to be replaced with a real slider when the control becomes available. -->
<object type="text" name="ATLAS_BOTTOM_PANE_SECTION_TERRAIN_BRUSH_SIZE_SLIDER_BAR" sprite="atlas_global_slider_bar_v" ><action on="Load"><![CDATA[ setSizeArray(this.name, Crd[ATLAS_BOTTOM_PANE_SECTION_TERRAIN_BRUSH_SIZE_SLIDER_BAR]); ]]></action></object>
<object type="button" name="ATLAS_BOTTOM_PANE_SECTION_TERRAIN_BRUSH_SIZE_SLIDER_MARKER" sprite="atlas_global_slider_marker_v" ><action on="Load"><![CDATA[ setSizeArray(this.name, Crd[ATLAS_BOTTOM_PANE_SECTION_TERRAIN_BRUSH_SIZE_SLIDER_MARKER]); ]]></action></object>
<object type="button" name="ATLAS_BOTTOM_PANE_SECTION_TERRAIN_BRUSH_BUTTON_1" style="atlas_icon" cell_id="4" ><action on="Load"><![CDATA[ setSizeArray(this.name, Crd[ATLAS_BOTTOM_PANE_SECTION_TERRAIN_BRUSH_BUTTON_1]); ]]></action></object>
<object type="button" name="ATLAS_BOTTOM_PANE_SECTION_TERRAIN_BRUSH_BUTTON_2" style="atlas_icon" cell_id="5" ><action on="Load"><![CDATA[ setSizeArray(this.name, Crd[ATLAS_BOTTOM_PANE_SECTION_TERRAIN_BRUSH_BUTTON_2]); ]]></action></object>
<object type="button" name="ATLAS_BOTTOM_PANE_SECTION_TERRAIN_BRUSH_BUTTON_3" style="atlas_icon" cell_id="6" ><action on="Load"><![CDATA[ setSizeArray(this.name, Crd[ATLAS_BOTTOM_PANE_SECTION_TERRAIN_BRUSH_BUTTON_3]); ]]></action></object>
<object type="button" name="ATLAS_BOTTOM_PANE_SECTION_TERRAIN_BRUSH_BUTTON_4" style="atlas_icon" cell_id="7" ><action on="Load"><![CDATA[ setSizeArray(this.name, Crd[ATLAS_BOTTOM_PANE_SECTION_TERRAIN_BRUSH_BUTTON_4]); ]]></action></object>
<object type="button" name="ATLAS_BOTTOM_PANE_SECTION_TERRAIN_BRUSH_BUTTON_BEAUTIFY" style="atlas_icon_border" cell_id="13" ><action on="Load"><![CDATA[ setSizeArray(this.name, Crd[ATLAS_BOTTOM_PANE_SECTION_TERRAIN_BRUSH_BUTTON_BEAUTIFY]); ]]></action></object>
</object>
<object type="empty" name="ATLAS_BOTTOM_PANE_SECTION_TERRAIN_PALETTE" size="0 0 100% 100%" z="1" >
<object type="text" name="ATLAS_BOTTOM_PANE_SECTION_TERRAIN_PALETTE_BKG" sprite="atlas_window_grey" scrollbar_style="atlas_scrollbar" scrollbar="true" ><action on="Load"><![CDATA[ setSizeArray(this.name, Crd[ATLAS_BOTTOM_PANE_SECTION_TERRAIN_PALETTE_BKG]); ]]></action></object>
<object type="button" name="ATLAS_BOTTOM_PANE_SECTION_TERRAIN_PALETTE_TAB_1" style="atlas_tab" >All</object>
<object type="button" name="ATLAS_BOTTOM_PANE_SECTION_TERRAIN_PALETTE_TAB_2" style="atlas_tab" >Grass</object>
<object type="button" name="ATLAS_BOTTOM_PANE_SECTION_TERRAIN_PALETTE_TAB_3" style="atlas_tab" >Dirt</object>
<object type="button" name="ATLAS_BOTTOM_PANE_SECTION_TERRAIN_PALETTE_TAB_4" style="atlas_tab" >Snow</object>
<object type="button" name="ATLAS_BOTTOM_PANE_SECTION_TERRAIN_PALETTE_TAB_5" style="atlas_tab" >Shoreline</object>
<object type="button" name="ATLAS_BOTTOM_PANE_SECTION_TERRAIN_PALETTE_TAB_6" style="atlas_tab" >Forest</object>
<object type="button" name="ATLAS_BOTTOM_PANE_SECTION_TERRAIN_PALETTE_TAB_7" style="atlas_tab" >Road</object>
<object type="button" name="ATLAS_BOTTOM_PANE_SECTION_TERRAIN_PALETTE_TAB_8" style="atlas_tab" >City</object>
<object type="button" name="ATLAS_BOTTOM_PANE_SECTION_TERRAIN_PALETTE_TAB_9" style="atlas_tab" >Sand
<action on="Load"><![CDATA[
// Seek through ALL menu buttons and set their sizes at once. (So make sure this always goes in the last menu button.)
for (ATLAS_BOTTOM_PANE_SECTION_TERRAIN_PALETTE_TAB.last = 1; ATLAS_BOTTOM_PANE_SECTION_TERRAIN_PALETTE_TAB.last <= ATLAS_BOTTOM_PANE_SECTION_TERRAIN_PALETTE_TAB.max; ATLAS_BOTTOM_PANE_SECTION_TERRAIN_PALETTE_TAB.last++)
setSizeArray("ATLAS_BOTTOM_PANE_SECTION_TERRAIN_PALETTE_TAB_" + ATLAS_BOTTOM_PANE_SECTION_TERRAIN_PALETTE_TAB.last, Crd[ATLAS_BOTTOM_PANE_SECTION_TERRAIN_PALETTE_TAB[ATLAS_BOTTOM_PANE_SECTION_TERRAIN_PALETTE_TAB.last]]);
]]></action>
</object>
<object type="button" name="ATLAS_BOTTOM_PANE_SECTION_TERRAIN_PALETTE_RT_ARROW" sprite="atlas_global_arrow_rt" tooltip_style="atlas_tooltip" tooltip="[font=tahoma10b]Terrain Palette Right Arrow[font=tahoma10]\nClick to display more terrain palette tabs." ><action on="Load"><![CDATA[ setSizeArray(this.name, Crd[ATLAS_BOTTOM_PANE_SECTION_TERRAIN_PALETTE_RT_ARROW]); ]]></action>
<action on="Press"><![CDATA[
]]></action>
</object>
<object type="button" name="ATLAS_BOTTOM_PANE_SECTION_TERRAIN_PALETTE_BUTTON_CUSTOM" style="atlas_button" >Custom Terrain<action on="Load"><![CDATA[ setSizeArray(this.name, Crd[ATLAS_BOTTOM_PANE_SECTION_TERRAIN_PALETTE_BUTTON_CUSTOM]); ]]></action></object>
</object>
</object>
<!-- OBJECT EDITOR BOTTOM PANE -->
<object type="empty" name="ATLAS_BOTTOM_PANE_SECTION_OBJECT" size="0 0 100% 100%" z="1" hidden="true">
<object type="empty" name="ATLAS_BOTTOM_PANE_SECTION_OBJECT_ANIM" size="0 0 100% 100%" z="1" >
<object type="text" name="ATLAS_BOTTOM_PANE_SECTION_OBJECT_ANIM_COMBO_BOX_LABEL" style="atlas_label_text" text_align="left" >Animation<action on="Load"><![CDATA[ setSizeArray(this.name, Crd[ATLAS_BOTTOM_PANE_SECTION_OBJECT_ANIM_COMBO_BOX_LABEL]); ]]></action></object>
<!-- NOTE: This will need to be replaced with a combobox when the control becomes available. -->
<object type="input" name="ATLAS_BOTTOM_PANE_SECTION_OBJECT_ANIM_COMBO_BOX" style="atlas_input"><action on="Load"><![CDATA[ setSizeArray(this.name, Crd[ATLAS_BOTTOM_PANE_SECTION_OBJECT_ANIM_COMBO_BOX]); guiSetCaption("ATLAS_BOTTOM_PANE_SECTION_OBJECT_ANIM_COMBO_BOX", "idle_a"); ]]></action></object>
<object type="text" name="ATLAS_BOTTOM_PANE_SECTION_OBJECT_ANIM_VIEWER" style="atlas_indent" ><action on="Load"><![CDATA[ setSizeArray(this.name, Crd[ATLAS_BOTTOM_PANE_SECTION_OBJECT_ANIM_VIEWER]); ]]></action></object>
<object type="text" name="ATLAS_BOTTOM_PANE_SECTION_OBJECT_ANIM_VIEWER_LABEL" style="atlas_label_text" >Animation Viewer<action on="Load"><![CDATA[ setSizeArray(this.name, Crd[ATLAS_BOTTOM_PANE_SECTION_OBJECT_ANIM_VIEWER_LABEL]); ]]></action></object>
</object>
</object>
</object>
<!-- RB: MINIMAP: Displays whole map. Identical functionality to session map, just a little smaller. -->
<!-- Later change this to type minimap, no sprite (doesn't do anything if not in simulation mode). -->
<object type="text" name="ATLAS_MINIMAP" sprite="atlas_window" ><action on="Load"><![CDATA[ setSizeArray(this.name, Crd[ATLAS_MINIMAP]); ]]></action></object>
<!-- TOP: MENU -->
<object type="empty" name="ATLAS_MAINBORDER_MENU" size="0 0 100% 100%" z="1" >
<object type="text" name="ATLAS_MAINBORDER_MENU_BKG" sprite="atlas_menubar_bkg" ><action on="Load"><![CDATA[ setSizeArray(this.name, Crd[ATLAS_MAINBORDER_MENU_BKG]); ]]></action></object>
<!-- NOTE: These menu buttons will need to have a context menu control when it becomes available. -->
<object type="button" name="ATLAS_MAINBORDER_MENU_1" style="atlas_menu_button" tooltip="[font=tahoma10b]Menu Button[font=tahoma10]\nClick to open this menu." >File
<action on="Press"><![CDATA[
]]></action>
</object>
<object type="button" name="ATLAS_MAINBORDER_MENU_2" style="atlas_menu_button" tooltip="[font=tahoma10b]Menu Button[font=tahoma10]\nClick to open this menu." >Map
<action on="Press"><![CDATA[
]]></action>
</object>
<object type="button" name="ATLAS_MAINBORDER_MENU_3" style="atlas_menu_button" tooltip="[font=tahoma10b]Menu Button[font=tahoma10]\nClick to open this menu." >Terrain
<action on="Press"><![CDATA[
]]></action>
</object>
<object type="button" name="ATLAS_MAINBORDER_MENU_4" style="atlas_menu_button" tooltip="[font=tahoma10b]Menu Button[font=tahoma10]\nClick to open this menu." >Objects
<action on="Press"><![CDATA[
]]></action>
</object>
<object type="button" name="ATLAS_MAINBORDER_MENU_5" style="atlas_menu_button" tooltip="[font=tahoma10b]Menu Button[font=tahoma10]\nClick to open this menu." >Triggers
<action on="Press"><![CDATA[
]]></action>
</object>
<object type="button" name="ATLAS_MAINBORDER_MENU_6" style="atlas_menu_button" tooltip="[font=tahoma10b]Menu Button[font=tahoma10]\nClick to open this menu." >Player
<action on="Press"><![CDATA[
]]></action>
</object>
<object type="button" name="ATLAS_MAINBORDER_MENU_7" style="atlas_menu_button" tooltip="[font=tahoma10b]Menu Button[font=tahoma10]\nClick to open this menu." >Diplomacy
<action on="Press"><![CDATA[
]]></action>
</object>
<object type="button" name="ATLAS_MAINBORDER_MENU_8" style="atlas_menu_button" tooltip="[font=tahoma10b]Menu Button[font=tahoma10]\nClick to open this menu." >Messages
<action on="Press"><![CDATA[
]]></action>
</object>
<object type="button" name="ATLAS_MAINBORDER_MENU_9" style="atlas_menu_button" tooltip="[font=tahoma10b]Menu Button[font=tahoma10]\nClick to open this menu." >Playlist
<action on="Press"><![CDATA[
]]></action>
</object>
<object type="button" name="ATLAS_MAINBORDER_MENU_10" style="atlas_menu_button" tooltip="[font=tahoma10b]Menu Button[font=tahoma10]\nClick to open this menu." >Cinematics
<action on="Press"><![CDATA[
]]></action>
</object>
<object type="button" name="ATLAS_MAINBORDER_MENU_11" style="atlas_menu_button" tooltip="[font=tahoma10b]Menu Button[font=tahoma10]\nClick to open this menu." >
<action on="Press"><![CDATA[
]]></action>
</object>
<object type="button" name="ATLAS_MAINBORDER_MENU_12" style="atlas_menu_button" tooltip="[font=tahoma10b]Menu Button[font=tahoma10]\nClick to open this menu." >
<action on="Load"><![CDATA[
// Seek through ALL menu buttons and set their sizes at once. (So make sure this always goes in the last menu button.)
for (ATLAS_MAINBORDER_MENU_BUTTON.last = 1; ATLAS_MAINBORDER_MENU_BUTTON.last <= ATLAS_MAINBORDER_MENU_BUTTON.max; ATLAS_MAINBORDER_MENU_BUTTON.last++)
setSizeArray("ATLAS_MAINBORDER_MENU_" + ATLAS_MAINBORDER_MENU_BUTTON.last, Crd[ATLAS_MAINBORDER_MENU_BUTTON[ATLAS_MAINBORDER_MENU_BUTTON.last]]);
]]></action>
<action on="Press"><![CDATA[
]]></action>
</object>
<object type="button" name="ATLAS_MAINBORDER_TOOLBAR_MAXIMISE_ARROW" sprite="atlas_global_arrow_dn" tooltip_style="atlas_tooltip" tooltip="[font=tahoma10b]Toolbar Maximise Arrow[font=tahoma10]\nClick to maximise the toolbar." hidden="true"><action on="Load"><![CDATA[ setSizeArray(this.name, Crd[ATLAS_MAINBORDER_TOOLBAR_MAXIMISE_ARROW]); ]]></action>
<action on="Press"><![CDATA[
atlasMaximiseToolbar();
]]></action>
</object>
</object>
<!-- TOP: TOOLBAR -->
<object type="empty" name="ATLAS_MAINBORDER_TOOLBAR" size="0 0 100% 100%" z="1" >
<object type="text" name="ATLAS_MAINBORDER_TOOLBAR_BKG" sprite="atlas_toolbar_bkg" ><action on="Load"><![CDATA[ setSizeArray(this.name, Crd[ATLAS_MAINBORDER_TOOLBAR_BKG]); ]]></action></object>
<object type="button" name="ATLAS_MAINBORDER_TOOLBAR_FULLY_MINIMISE_ARROW" sprite="atlas_global_arrow_up" tooltip_style="atlas_tooltip" tooltip="[font=tahoma10b]Toolbar Fully Minimise Arrow[font=tahoma10]\nClick to fully minimise the toolbar." ><action on="Load"><![CDATA[ setSizeArray(this.name, Crd[ATLAS_MAINBORDER_TOOLBAR_FULLY_MINIMISE_ARROW]); ]]></action>
<action on="Press"><![CDATA[
atlasFullyMinimiseToolbar();
]]></action>
</object>
<object type="button" name="ATLAS_MAINBORDER_TOOLBAR_FULLY_MAXIMISE_ARROW" sprite="atlas_global_arrow_dn" tooltip_style="atlas_tooltip" tooltip="[font=tahoma10b]Toolbar Full Maximise Arrow[font=tahoma10]\nClick to fully maximise the toolbar." ><action on="Load"><![CDATA[ setSizeArray(this.name, Crd[ATLAS_MAINBORDER_TOOLBAR_FULLY_MAXIMISE_ARROW]); ]]></action>
<action on="Press"><![CDATA[
atlasFullyMaximiseToolbar();
]]></action>
</object>
</object>
<!-- TOP: TOOLBAR SECOND ROW -->
<object type="empty" name="ATLAS_MAINBORDER_TOOLBAR_MAX" size="0 0 100% 100%" z="1" hidden="true">
<object type="text" name="ATLAS_MAINBORDER_TOOLBAR_BKG_MAX" sprite="atlas_toolbar_bkg" ><action on="Load"><![CDATA[ setSizeArray(this.name, Crd[ATLAS_MAINBORDER_TOOLBAR_BKG_MAX]); ]]></action></object>
<object type="button" name="ATLAS_MAINBORDER_TOOLBAR_MINIMISE_ARROW" sprite="atlas_global_arrow_up" tooltip_style="atlas_tooltip" tooltip="[font=tahoma10b]Toolbar Minimise Arrow[font=tahoma10]\nClick to minimise the toolbar." ><action on="Load"><![CDATA[ setSizeArray(this.name, Crd[ATLAS_MAINBORDER_TOOLBAR_MINIMISE_ARROW]); ]]></action>
<action on="Press"><![CDATA[
atlasMinimiseToolbar();
]]></action>
</object>
</object>
<object type="empty" name="ATLAS_MAINBORDER_TOOLBAR_BUTTON_ROW_1" size="0 0 100% 100%" z="1" >
<object type="button" name="ATLAS_MAINBORDER_TOOLBAR_BUTTON_1" style="atlas_object" tooltip="[font=tahoma10b]Clear[font=tahoma10]\nClick to hide all open menus." ><action on="Press"><![CDATA[ atlasOpenSectionMenu("none"); ]]></action></object>
<object type="button" name="ATLAS_MAINBORDER_TOOLBAR_BUTTON_2" style="atlas_object" tooltip="[font=tahoma10b]Map Creator[font=tahoma10]\nClick to open this menu." ><action on="Press"><![CDATA[ atlasOpenSectionMenu("ATLAS_LEFT_PANE_SECTION_MAP"); ]]></action></object>
<object type="button" name="ATLAS_MAINBORDER_TOOLBAR_BUTTON_3" style="atlas_object" tooltip="[font=tahoma10b]Terrain Editor[font=tahoma10]\nClick to open this menu." ><action on="Press"><![CDATA[ atlasOpenSectionMenu("ATLAS_LEFT_PANE_SECTION_TERRAIN"); ]]></action></object>
<object type="button" name="ATLAS_MAINBORDER_TOOLBAR_BUTTON_4" style="atlas_object" tooltip="[font=tahoma10b]Object Editor[font=tahoma10]\nClick to open this menu." ><action on="Press"><![CDATA[ atlasOpenSectionMenu("ATLAS_LEFT_PANE_SECTION_OBJECT"); ]]></action></object>
<object type="button" name="ATLAS_MAINBORDER_TOOLBAR_BUTTON_5" style="atlas_object" tooltip="[font=tahoma10b]Menu Button[font=tahoma10]\nClick to open this menu." />
<object type="button" name="ATLAS_MAINBORDER_TOOLBAR_BUTTON_6" style="atlas_object" tooltip="[font=tahoma10b]Menu Button[font=tahoma10]\nClick to open this menu." />
<object type="button" name="ATLAS_MAINBORDER_TOOLBAR_BUTTON_7" style="atlas_object" tooltip="[font=tahoma10b]Menu Button[font=tahoma10]\nClick to open this menu." />
<object type="button" name="ATLAS_MAINBORDER_TOOLBAR_BUTTON_8" style="atlas_object" tooltip="[font=tahoma10b]Menu Button[font=tahoma10]\nClick to open this menu." />
<object type="button" name="ATLAS_MAINBORDER_TOOLBAR_BUTTON_9" style="atlas_object" tooltip="[font=tahoma10b]Menu Button[font=tahoma10]\nClick to open this menu." />
<object type="button" name="ATLAS_MAINBORDER_TOOLBAR_BUTTON_10" style="atlas_object" tooltip="[font=tahoma10b]Menu Button[font=tahoma10]\nClick to open this menu." />
<object type="button" name="ATLAS_MAINBORDER_TOOLBAR_BUTTON_11" style="atlas_object" tooltip="[font=tahoma10b]Menu Button[font=tahoma10]\nClick to open this menu." />
<object type="button" name="ATLAS_MAINBORDER_TOOLBAR_BUTTON_12" style="atlas_object" tooltip="[font=tahoma10b]Menu Button[font=tahoma10]\nClick to open this menu." />
<object type="button" name="ATLAS_MAINBORDER_TOOLBAR_BUTTON_13" style="atlas_object" tooltip="[font=tahoma10b]Menu Button[font=tahoma10]\nClick to open this menu." />
<object type="button" name="ATLAS_MAINBORDER_TOOLBAR_BUTTON_14" style="atlas_object" tooltip="[font=tahoma10b]Menu Button[font=tahoma10]\nClick to open this menu." />
<object type="button" name="ATLAS_MAINBORDER_TOOLBAR_BUTTON_15" style="atlas_object" tooltip="[font=tahoma10b]Menu Button[font=tahoma10]\nClick to open this menu." />
<object type="button" name="ATLAS_MAINBORDER_TOOLBAR_BUTTON_16" style="atlas_object" tooltip="[font=tahoma10b]Menu Button[font=tahoma10]\nClick to open this menu." />
<object type="button" name="ATLAS_MAINBORDER_TOOLBAR_BUTTON_17" style="atlas_object" tooltip="[font=tahoma10b]Menu Button[font=tahoma10]\nClick to open this menu." />
<object type="button" name="ATLAS_MAINBORDER_TOOLBAR_BUTTON_18" style="atlas_object" tooltip="[font=tahoma10b]Menu Button[font=tahoma10]\nClick to open this menu." />
<object type="button" name="ATLAS_MAINBORDER_TOOLBAR_BUTTON_19" style="atlas_object" tooltip="[font=tahoma10b]Menu Button[font=tahoma10]\nClick to open this menu." />
<object type="button" name="ATLAS_MAINBORDER_TOOLBAR_BUTTON_20" style="atlas_object" tooltip="[font=tahoma10b]Menu Button[font=tahoma10]\nClick to open this menu." />
<object type="button" name="ATLAS_MAINBORDER_TOOLBAR_BUTTON_21" style="atlas_object" tooltip="[font=tahoma10b]Menu Button[font=tahoma10]\nClick to open this menu." />
<object type="button" name="ATLAS_MAINBORDER_TOOLBAR_BUTTON_22" style="atlas_object" tooltip="[font=tahoma10b]Menu Button[font=tahoma10]\nClick to open this menu." />
<object type="button" name="ATLAS_MAINBORDER_TOOLBAR_BUTTON_23" style="atlas_object" tooltip="[font=tahoma10b]Menu Button[font=tahoma10]\nClick to open this menu." />
<object type="button" name="ATLAS_MAINBORDER_TOOLBAR_BUTTON_24" style="atlas_object" tooltip="[font=tahoma10b]Menu Button[font=tahoma10]\nClick to open this menu." />
<object type="button" name="ATLAS_MAINBORDER_TOOLBAR_BUTTON_25" style="atlas_object" tooltip="[font=tahoma10b]Menu Button[font=tahoma10]\nClick to open this menu." />
<object type="button" name="ATLAS_MAINBORDER_TOOLBAR_BUTTON_26" style="atlas_object" tooltip="[font=tahoma10b]Menu Button[font=tahoma10]\nClick to open this menu." />
<object type="button" name="ATLAS_MAINBORDER_TOOLBAR_BUTTON_27" style="atlas_object" tooltip="[font=tahoma10b]Menu Button[font=tahoma10]\nClick to open this menu." />
<object type="button" name="ATLAS_MAINBORDER_TOOLBAR_BUTTON_28" style="atlas_object" tooltip="[font=tahoma10b]Menu Button[font=tahoma10]\nClick to open this menu." />
<object type="button" name="ATLAS_MAINBORDER_TOOLBAR_BUTTON_29" style="atlas_object" tooltip="[font=tahoma10b]Menu Button[font=tahoma10]\nClick to open this menu." />
<object type="button" name="ATLAS_MAINBORDER_TOOLBAR_BUTTON_30" style="atlas_object" tooltip="[font=tahoma10b]Menu Button[font=tahoma10]\nClick to open this menu." />
<object type="button" name="ATLAS_MAINBORDER_TOOLBAR_BUTTON_31" style="atlas_object" tooltip="[font=tahoma10b]Menu Button[font=tahoma10]\nClick to open this menu." />
<object type="button" name="ATLAS_MAINBORDER_TOOLBAR_BUTTON_32" style="atlas_object" tooltip="[font=tahoma10b]Menu Button[font=tahoma10]\nClick to open this menu." />
<object type="button" name="ATLAS_MAINBORDER_TOOLBAR_BUTTON_33" style="atlas_object" tooltip="[font=tahoma10b]Menu Button[font=tahoma10]\nClick to open this menu." />
<object type="button" name="ATLAS_MAINBORDER_TOOLBAR_BUTTON_34" style="atlas_object" tooltip="[font=tahoma10b]Menu Button[font=tahoma10]\nClick to open this menu." />
<object type="button" name="ATLAS_MAINBORDER_TOOLBAR_BUTTON_35" style="atlas_object" tooltip="[font=tahoma10b]Menu Button[font=tahoma10]\nClick to open this menu." />
<object type="button" name="ATLAS_MAINBORDER_TOOLBAR_BUTTON_36" style="atlas_object" tooltip="[font=tahoma10b]Menu Button[font=tahoma10]\nClick to open this menu." />
<object type="button" name="ATLAS_MAINBORDER_TOOLBAR_BUTTON_37" style="atlas_object" tooltip="[font=tahoma10b]Menu Button[font=tahoma10]\nClick to open this menu." />
<object type="button" name="ATLAS_MAINBORDER_TOOLBAR_BUTTON_38" style="atlas_object" tooltip="[font=tahoma10b]Menu Button[font=tahoma10]\nClick to open this menu." />
<object type="button" name="ATLAS_MAINBORDER_TOOLBAR_BUTTON_39" style="atlas_object" tooltip="[font=tahoma10b]Menu Button[font=tahoma10]\nClick to open this menu." />
<object type="button" name="ATLAS_MAINBORDER_TOOLBAR_BUTTON_40" style="atlas_object" tooltip="[font=tahoma10b]Menu Button[font=tahoma10]\nClick to open this menu." />
</object>
<object type="empty" name="ATLAS_MAINBORDER_TOOLBAR_BUTTON_ROW_2" size="0 0 100% 100%" z="1" hidden="true">
<object type="button" name="ATLAS_MAINBORDER_TOOLBAR_BUTTON_41" style="atlas_object" tooltip="[font=tahoma10b]Menu Button[font=tahoma10]\nClick to open this menu." />
<object type="button" name="ATLAS_MAINBORDER_TOOLBAR_BUTTON_42" style="atlas_object" tooltip="[font=tahoma10b]Menu Button[font=tahoma10]\nClick to open this menu." />
<object type="button" name="ATLAS_MAINBORDER_TOOLBAR_BUTTON_43" style="atlas_object" tooltip="[font=tahoma10b]Menu Button[font=tahoma10]\nClick to open this menu." />
<object type="button" name="ATLAS_MAINBORDER_TOOLBAR_BUTTON_44" style="atlas_object" tooltip="[font=tahoma10b]Menu Button[font=tahoma10]\nClick to open this menu." />
<object type="button" name="ATLAS_MAINBORDER_TOOLBAR_BUTTON_45" style="atlas_object" tooltip="[font=tahoma10b]Menu Button[font=tahoma10]\nClick to open this menu." />
<object type="button" name="ATLAS_MAINBORDER_TOOLBAR_BUTTON_46" style="atlas_object" tooltip="[font=tahoma10b]Menu Button[font=tahoma10]\nClick to open this menu." />
<object type="button" name="ATLAS_MAINBORDER_TOOLBAR_BUTTON_47" style="atlas_object" tooltip="[font=tahoma10b]Menu Button[font=tahoma10]\nClick to open this menu." />
<object type="button" name="ATLAS_MAINBORDER_TOOLBAR_BUTTON_48" style="atlas_object" tooltip="[font=tahoma10b]Menu Button[font=tahoma10]\nClick to open this menu." />
<object type="button" name="ATLAS_MAINBORDER_TOOLBAR_BUTTON_49" style="atlas_object" tooltip="[font=tahoma10b]Menu Button[font=tahoma10]\nClick to open this menu." />
<object type="button" name="ATLAS_MAINBORDER_TOOLBAR_BUTTON_50" style="atlas_object" tooltip="[font=tahoma10b]Menu Button[font=tahoma10]\nClick to open this menu." />
<object type="button" name="ATLAS_MAINBORDER_TOOLBAR_BUTTON_51" style="atlas_object" tooltip="[font=tahoma10b]Menu Button[font=tahoma10]\nClick to open this menu." />
<object type="button" name="ATLAS_MAINBORDER_TOOLBAR_BUTTON_52" style="atlas_object" tooltip="[font=tahoma10b]Menu Button[font=tahoma10]\nClick to open this menu." />
<object type="button" name="ATLAS_MAINBORDER_TOOLBAR_BUTTON_53" style="atlas_object" tooltip="[font=tahoma10b]Menu Button[font=tahoma10]\nClick to open this menu." />
<object type="button" name="ATLAS_MAINBORDER_TOOLBAR_BUTTON_54" style="atlas_object" tooltip="[font=tahoma10b]Menu Button[font=tahoma10]\nClick to open this menu." />
<object type="button" name="ATLAS_MAINBORDER_TOOLBAR_BUTTON_55" style="atlas_object" tooltip="[font=tahoma10b]Menu Button[font=tahoma10]\nClick to open this menu." />
<object type="button" name="ATLAS_MAINBORDER_TOOLBAR_BUTTON_56" style="atlas_object" tooltip="[font=tahoma10b]Menu Button[font=tahoma10]\nClick to open this menu." />
<object type="button" name="ATLAS_MAINBORDER_TOOLBAR_BUTTON_57" style="atlas_object" tooltip="[font=tahoma10b]Menu Button[font=tahoma10]\nClick to open this menu." />
<object type="button" name="ATLAS_MAINBORDER_TOOLBAR_BUTTON_58" style="atlas_object" tooltip="[font=tahoma10b]Menu Button[font=tahoma10]\nClick to open this menu." />
<object type="button" name="ATLAS_MAINBORDER_TOOLBAR_BUTTON_59" style="atlas_object" tooltip="[font=tahoma10b]Menu Button[font=tahoma10]\nClick to open this menu." />
<object type="button" name="ATLAS_MAINBORDER_TOOLBAR_BUTTON_60" style="atlas_object" tooltip="[font=tahoma10b]Menu Button[font=tahoma10]\nClick to open this menu." />
<object type="button" name="ATLAS_MAINBORDER_TOOLBAR_BUTTON_61" style="atlas_object" tooltip="[font=tahoma10b]Menu Button[font=tahoma10]\nClick to open this menu." />
<object type="button" name="ATLAS_MAINBORDER_TOOLBAR_BUTTON_62" style="atlas_object" tooltip="[font=tahoma10b]Menu Button[font=tahoma10]\nClick to open this menu." />
<object type="button" name="ATLAS_MAINBORDER_TOOLBAR_BUTTON_63" style="atlas_object" tooltip="[font=tahoma10b]Menu Button[font=tahoma10]\nClick to open this menu." />
<object type="button" name="ATLAS_MAINBORDER_TOOLBAR_BUTTON_64" style="atlas_object" tooltip="[font=tahoma10b]Menu Button[font=tahoma10]\nClick to open this menu." />
<object type="button" name="ATLAS_MAINBORDER_TOOLBAR_BUTTON_65" style="atlas_object" tooltip="[font=tahoma10b]Menu Button[font=tahoma10]\nClick to open this menu." />
<object type="button" name="ATLAS_MAINBORDER_TOOLBAR_BUTTON_66" style="atlas_object" tooltip="[font=tahoma10b]Menu Button[font=tahoma10]\nClick to open this menu." />
<object type="button" name="ATLAS_MAINBORDER_TOOLBAR_BUTTON_67" style="atlas_object" tooltip="[font=tahoma10b]Menu Button[font=tahoma10]\nClick to open this menu." />
<object type="button" name="ATLAS_MAINBORDER_TOOLBAR_BUTTON_68" style="atlas_object" tooltip="[font=tahoma10b]Menu Button[font=tahoma10]\nClick to open this menu." />
<object type="button" name="ATLAS_MAINBORDER_TOOLBAR_BUTTON_69" style="atlas_object" tooltip="[font=tahoma10b]Menu Button[font=tahoma10]\nClick to open this menu." />
<object type="button" name="ATLAS_MAINBORDER_TOOLBAR_BUTTON_70" style="atlas_object" tooltip="[font=tahoma10b]Menu Button[font=tahoma10]\nClick to open this menu." />
<object type="button" name="ATLAS_MAINBORDER_TOOLBAR_BUTTON_71" style="atlas_object" tooltip="[font=tahoma10b]Menu Button[font=tahoma10]\nClick to open this menu." />
<object type="button" name="ATLAS_MAINBORDER_TOOLBAR_BUTTON_72" style="atlas_object" tooltip="[font=tahoma10b]Menu Button[font=tahoma10]\nClick to open this menu." />
<object type="button" name="ATLAS_MAINBORDER_TOOLBAR_BUTTON_73" style="atlas_object" tooltip="[font=tahoma10b]Menu Button[font=tahoma10]\nClick to open this menu." />
<object type="button" name="ATLAS_MAINBORDER_TOOLBAR_BUTTON_74" style="atlas_object" tooltip="[font=tahoma10b]Menu Button[font=tahoma10]\nClick to open this menu." />
<object type="button" name="ATLAS_MAINBORDER_TOOLBAR_BUTTON_75" style="atlas_object" tooltip="[font=tahoma10b]Menu Button[font=tahoma10]\nClick to open this menu." />
<object type="button" name="ATLAS_MAINBORDER_TOOLBAR_BUTTON_76" style="atlas_object" tooltip="[font=tahoma10b]Menu Button[font=tahoma10]\nClick to open this menu." />
<object type="button" name="ATLAS_MAINBORDER_TOOLBAR_BUTTON_77" style="atlas_object" tooltip="[font=tahoma10b]Menu Button[font=tahoma10]\nClick to open this menu." />
<object type="button" name="ATLAS_MAINBORDER_TOOLBAR_BUTTON_78" style="atlas_object" tooltip="[font=tahoma10b]Menu Button[font=tahoma10]\nClick to open this menu." />
<object type="button" name="ATLAS_MAINBORDER_TOOLBAR_BUTTON_79" style="atlas_object" tooltip="[font=tahoma10b]Menu Button[font=tahoma10]\nClick to open this menu." />
<object type="button" name="ATLAS_MAINBORDER_TOOLBAR_BUTTON_80" style="atlas_object" tooltip="[font=tahoma10b]Menu Button[font=tahoma10]\nClick to open this menu." >
<action on="Load"><![CDATA[
// Seek through ALL menu buttons and set their sizes at once. (So make sure this always goes in the last menu button.)
for (ATLAS_MAINBORDER_TOOLBAR_BUTTON.last = 1; ATLAS_MAINBORDER_TOOLBAR_BUTTON.last <= ATLAS_MAINBORDER_TOOLBAR_BUTTON.max; ATLAS_MAINBORDER_TOOLBAR_BUTTON.last++)
{
getGUIObjectByName("ATLAS_MAINBORDER_TOOLBAR_BUTTON_" + ATLAS_MAINBORDER_TOOLBAR_BUTTON.last).sprite = "atlas_sheet_toolbar_button";
getGUIObjectByName("ATLAS_MAINBORDER_TOOLBAR_BUTTON_" + ATLAS_MAINBORDER_TOOLBAR_BUTTON.last).cell_id = ATLAS_MAINBORDER_TOOLBAR_BUTTON.last;
setSizeArray("ATLAS_MAINBORDER_TOOLBAR_BUTTON_" + ATLAS_MAINBORDER_TOOLBAR_BUTTON.last, Crd[ATLAS_MAINBORDER_TOOLBAR_BUTTON[ATLAS_MAINBORDER_TOOLBAR_BUTTON.last]]);
}
]]></action>
</object>
</object>
<!-- LT: LOGO -->
<object type="button" name="ATLAS_MAINBORDER_LT_CORNER" sprite="atlas_mainborder_lt_corner" tooltip_style="atlas_tooltip" tooltip="[font=tahoma10b]0 A.D. Logo[font=tahoma10]\nMmm, nothing like the smell of blatant self-promotion in the morning ... Oh, you can click this to return to the Main Menu too." ><action on="Load"><![CDATA[ setSizeArray(this.name, Crd[ATLAS_MAINBORDER_LT_CORNER]); ]]></action>
<action on="Press"><![CDATA[
// Jason asked for an exit button to be put here, until we're able to exit via the drop-down File menu.
guiUnhide("pregame_gui");
guiHide("atlas_gui");
]]></action>
</object>
<!-- RT: INFO WINDOW: Displays editor information such as FPS and map name. -->
<object type="empty" name="ATLAS_INFO_WINDOW_PANE" size="0 0 100% 100%" z="1" >
<!-- RT: INFO WINDOW BACKGROUND -->
<object type="text" name="ATLAS_MAINBORDER_RT_CORNER" sprite="atlas_mainborder_rt_corner" ><action on="Load"><![CDATA[ setSizeArray(this.name, Crd[ATLAS_MAINBORDER_RT_CORNER]); ]]></action></object>
<!-- RT: INFO WINDOW BAR -->
<object type="text" name="ATLAS_INFO_WINDOW" sprite="atlas_window_white" font="tahoma10" textcolor="0 0 0" text_align="left" text_valign="center" tooltip_style="atlas_tooltip" tooltip="[font=tahoma10b]Info Window[font=tahoma10]\nInformation about the current scenario." ><action on="Load"><![CDATA[ setSizeArray(this.name, Crd[ATLAS_INFO_WINDOW]);
setInterval(atlasUpdateInfoWindow, 500);
]]></action>
</object>
</object>
<!-- TOOLTIP WINDOW: Displays current tooltip above the Mini Map. -->
<object type="text" name="ATLAS_TOOLTIP" sprite="atlas_tooltip_background" font="tahoma10" textcolor="0 0 0" z="104" hidden="true" ghost="true"><action on="Load"><![CDATA[ setSizeArray("ATLAS_TOOLTIP", Crd[ATLAS_TOOLTIP]); ]]></action></object>
</object>
</objects>

View File

@ -1,128 +0,0 @@
<?xml version="1.0" encoding="iso-8859-1" standalone="no" ?>
<!DOCTYPE objects SYSTEM "../gui.dtd">
<objects>
<!--
==========================================
- GLOBAL OBJECTS -
==========================================
-->
<object type="empty" name="always_on" hotkey="alwayson.toggle" size="0 0 100% 100%" z="1" hidden="false">
<action on="Press"><![CDATA[
GUIObjectToggle("always_on");
]]></action>
<object type="button" name="audio_toggle" hotkey="audio.toggle" hidden="true">
<action on="Press"><![CDATA[
if (snd_disabled == true)
snd_disable(false);
else
snd_disable(true);
]]></action>
</object>
<!--
==========================================
- DEBUG -
==========================================
-->
<!-- FPS COUNTER -->
<object type="text" name="FPS_Counter" z="100" hotkey="fps.toggle" textcolor="100 100 0" font="verdana16" ghost="true" hidden="true">
<action on="Load"><![CDATA[
AddSizeString("FPS_Counter",
"18 100%-35 200 100%",
"18 0% 200 0%+35");
]]></action>
<action on="Press"><![CDATA[
GUIObjectToggle("FPS_Counter");
]]></action>
<action on="Tick"><![CDATA[
UpdateFPSCounter(mouse);
]]></action>
</object>
<!--
==========================================
- MESSAGE BOX -
==========================================
-->
<object type="image" size="50%-400 50%-200 50%+400 50%+200" name="mb_main" z="149" hidden="true">
<!-- control for blocking access to other controls in background -->
<object type="image" size="0 0 100% 100%" name="mb_blocker" hidden="false" />
<!-- background -->
<object type="image" size="0 10 100% 100%" name="mb_background" sprite="message_box_gen_background" absolute="false" z="160" />
<!-- top -->
<object type="image" name="mb_border_corner_lt" size="0 10 15 25" sprite="message_box_corner" absolute="false" z="161" />
<object type="image" name="mb_border_top" size="15 10 100%-15 42" sprite="message_box_border_top" absolute="false" z="161" />
<object type="image" name="mb_border_corner_rt" size="100%-15 10 100% 25" sprite="message_box_corner" absolute="false" z="161" />
<!-- left/right -->
<object type="image" name="mb_border_left" size="0 25 20 100%-15" sprite="message_box_border_left" absolute="false" z="162" />
<object type="image" name="mb_border_right" size="100%-32 25 100% 100%-15" sprite="message_box_border_right" absolute="false" z="161" />
<!-- bottom -->
<object type="image" name="mb_border_corner_lb" size="0 100%-15 15 100%" sprite="message_box_corner" absolute="false" z="161" />
<object type="image" name="mb_border_bottom" size="15 100%-32 100%-15 100%" sprite="message_box_border_bottom" absolute="false" z="162" />
<object type="image" name="mb_border_corner_rb" size="100%-15 100%-15 100% 100%" sprite="message_box_corner" absolute="false" z="161" />
<!-- titlebar -->
<object type="image" name="mb_titlebar_left" size="15% 0 15%+64 32" sprite="message_box_titlebar_left" absolute="false" z="164" />
<object type="image" name="mb_titlebar_middle" size="15%+64 0 85%-64 32" sprite="message_box_titlebar_middle" absolute="false" z="164" />
<object type="image" name="mb_titlebar_right" size="85%-64 0 85% 32" sprite="message_box_titlebar_right" absolute="false" z="164" />
<object type="button" name="mb_titlebar_text" size="15%+54 4 85%-54 32" absolute="false" font="prospero18" z="165" text_align="center" text_valign="center">mbTitle</object>
<!-- text -->
<object type="text" name="mb_text" size="32 40 100%-32 100%-100" absolute="false" font="prospero18" z="165" ghost="true">
mbMessage
</object>
<!-- buttons -->
<object type="button" name="mb_button1" size="40 100%-80 33%-30 100%-50" absolute="false" sprite="message_box_button_normal" sprite_over="message_box_button_over" font="prospero18" z="165" text_align="center" text_valign="center">
mbButton1Caption
<action on="Press"><![CDATA[
eval(getGUIGlobal().mbButton1Code);
guiHide('mb_main');
]]></action>
</object>
<object type="button" name="mb_button2" size="33%+30 100%-80 66%-40 100%-50" absolute="false" sprite="message_box_button_normal" sprite_over="message_box_button_over" font="prospero18" z="165" text_align="center" text_valign="center">
mbButton2Caption
<action on="Press"><![CDATA[
eval(getGUIGlobal().mbButton2Code);
guiHide('mb_main');
]]></action>
</object>
<object type="button" name="mb_button3" size="66%+30 100%-80 100%-40 100%-50" absolute="false" sprite="message_box_button_normal" sprite_over="message_box_button_over" font="prospero18" z="165" text_align="center" text_valign="center">
mbButton3Caption
<action on="Press"><![CDATA[
eval(getGUIGlobal().mbButton2Code);
guiHide('mb_main');
]]></action>
</object>
</object>
</object>
<!--
==========================================
- WATERMARK -
==========================================
-->
<object type="empty" name="GLOBAL_WATERMARK" hotkey="screenshot.watermark" size="0 0 100% 100%" z="200" ghost="true" hidden="true">
<action on="Press"><![CDATA[
GUIObjectToggle("GLOBAL_WATERMARK");
]]></action>
<object type="image" name="GLOBAL_WATERMARK_PRODUCT_LOGO" sprite="watermark_product" hidden="false"><action on="Load"><![CDATA[ setSizeArray(this.name, Crd[GLOBAL_WATERMARK_PRODUCT_LOGO]); ]]></action></object>
<object type="image" name="GLOBAL_WATERMARK_COMPANY_LOGO" sprite="watermark_company" hidden="false"><action on="Load"><![CDATA[ setSizeArray(this.name, Crd[GLOBAL_WATERMARK_COMPANY_LOGO]); ]]></action></object>
</object>
</objects>

View File

@ -1,415 +0,0 @@
// Main Atlas Scenario Editor JS Script file
// Contains functions and code for the game's integrated Scenario Editor.
// ====================================================================
function initAtlas()
{
// ============================================ CONSTANTS =================================================
ATLAS_COUNTER_BOX = new Object();
ATLAS_COUNTER_BOX.width = 9;
ATLAS_COUNTER_BOX.height = 5;
// ============================================= GLOBALS ==================================================
initAtlasMainScreen();
initAtlasSectionMapCreator();
initAtlasSectionTerrainEditor();
initAtlasSectionObjectEditor();
}
// ====================================================================
function initAtlasMainScreen()
{
// Top-left corner piece of main editor frame.
ATLAS_MAINBORDER_LT_CORNER = addArrayElement(Crd, Crd.last);
Crd[Crd.last-1].rleft = left_screen; Crd[Crd.last-1].rtop = top_screen;
Crd[Crd.last-1].rright = left_screen; Crd[Crd.last-1].rbottom = top_screen;
Crd[Crd.last-1].width = 42;
Crd[Crd.last-1].height = 42;
Crd[Crd.last-1].x = 0;
Crd[Crd.last-1].y = 0;
// Top-right corner piece of main editor frame ("Info Selection Box").
ATLAS_MAINBORDER_RT_CORNER = addArrayElement(Crd, Crd.last);
Crd[Crd.last-1].rleft = right_screen; Crd[Crd.last-1].rtop = top_screen;
Crd[Crd.last-1].rright = right_screen; Crd[Crd.last-1].rbottom = top_screen;
Crd[Crd.last-1].width = 203;
Crd[Crd.last-1].height = 54;
Crd[Crd.last-1].x = 0;
Crd[Crd.last-1].y = Crd[ATLAS_MAINBORDER_LT_CORNER].y;
// Info window in top-right corner.
ATLAS_INFO_WINDOW = addArrayElement(Crd, Crd.last);
Crd[Crd.last-1].rleft = right_screen; Crd[Crd.last-1].rtop = top_screen;
Crd[Crd.last-1].rright = right_screen; Crd[Crd.last-1].rbottom = top_screen;
Crd[Crd.last-1].width = Crd[ATLAS_MAINBORDER_RT_CORNER].width-30-6;
Crd[Crd.last-1].height = Crd[ATLAS_MAINBORDER_RT_CORNER].height-9;
Crd[Crd.last-1].x = 3;
Crd[Crd.last-1].y = Crd[ATLAS_MAINBORDER_RT_CORNER].y+3;
// Top menu bar.
ATLAS_MAINBORDER_MENU_BKG = addArrayElement(Crd, Crd.last);
Crd[Crd.last-1].rleft = left_screen; Crd[Crd.last-1].rtop = top_screen;
Crd[Crd.last-1].rright = right_screen; Crd[Crd.last-1].rbottom = top_screen;
Crd[Crd.last-1].width = Crd[ATLAS_MAINBORDER_RT_CORNER].width;
Crd[Crd.last-1].height = 19;
Crd[Crd.last-1].x = Crd[ATLAS_MAINBORDER_LT_CORNER].x+Crd[ATLAS_MAINBORDER_LT_CORNER].width;
Crd[Crd.last-1].y = Crd[ATLAS_MAINBORDER_LT_CORNER].y;
// Menu buttons.
ATLAS_MAINBORDER_MENU_BUTTON = new Object();
ATLAS_MAINBORDER_MENU_BUTTON.span = 0;
ATLAS_MAINBORDER_MENU_BUTTON.max = 12;
for (ATLAS_MAINBORDER_MENU_BUTTON.last = 1; ATLAS_MAINBORDER_MENU_BUTTON.last <= ATLAS_MAINBORDER_MENU_BUTTON.max; ATLAS_MAINBORDER_MENU_BUTTON.last++)
{
ATLAS_MAINBORDER_MENU_BUTTON[ATLAS_MAINBORDER_MENU_BUTTON.last] = Crd.last;
Crd[Crd.last] = new Object();
Crd[Crd.last].width = 60;
Crd[Crd.last].height = Crd[ATLAS_MAINBORDER_MENU_BKG].height;
Crd[Crd.last].rleft = left_screen;
Crd[Crd.last].rtop = top_screen;
Crd[Crd.last].rright = left_screen;
Crd[Crd.last].rbottom = top_screen;
if (ATLAS_MAINBORDER_MENU_BUTTON.last == 1)
Crd[Crd.last].x = Crd[ATLAS_MAINBORDER_MENU_BKG].x;
else
Crd[Crd.last].x = Crd[ATLAS_MAINBORDER_MENU_BUTTON[ATLAS_MAINBORDER_MENU_BUTTON.last]-1].x+Crd[Crd.last].width+ATLAS_MAINBORDER_MENU_BUTTON.span;
Crd[Crd.last].y = Crd[ATLAS_MAINBORDER_MENU_BKG].y;
Crd.last++;
}
// Top tool bar (1 row).
ATLAS_MAINBORDER_TOOLBAR_BKG = addArrayElement(Crd, Crd.last);
Crd[Crd.last-1].rleft = left_screen; Crd[Crd.last-1].rtop = top_screen;
Crd[Crd.last-1].rright = right_screen; Crd[Crd.last-1].rbottom = top_screen;
Crd[Crd.last-1].width = Crd[ATLAS_MAINBORDER_RT_CORNER].width-Crd[ATLAS_MAINBORDER_LT_CORNER].width;
Crd[Crd.last-1].height = 20;
Crd[Crd.last-1].x = Crd[ATLAS_MAINBORDER_LT_CORNER].x;
Crd[Crd.last-1].y = Crd[ATLAS_MAINBORDER_MENU_BKG].y+Crd[ATLAS_MAINBORDER_MENU_BKG].height;
// Top tool bar (max: two rows).
ATLAS_MAINBORDER_TOOLBAR_BKG_MAX = addArrayElement(Crd, Crd.last);
Crd[Crd.last-1].rleft = left_screen; Crd[Crd.last-1].rtop = top_screen;
Crd[Crd.last-1].rright = right_screen; Crd[Crd.last-1].rbottom = top_screen;
Crd[Crd.last-1].width = Crd[ATLAS_MAINBORDER_TOOLBAR_BKG].width;
Crd[Crd.last-1].height = 35;
Crd[Crd.last-1].x = Crd[ATLAS_MAINBORDER_TOOLBAR_BKG].x;
Crd[Crd.last-1].y = Crd[ATLAS_MAINBORDER_TOOLBAR_BKG].y;
// Fully Minimise arrow on tool bar.
ATLAS_MAINBORDER_TOOLBAR_FULLY_MINIMISE_ARROW = addArrayElement(Crd, Crd.last);
Crd[Crd.last-1].rleft = right_screen; Crd[Crd.last-1].rtop = top_screen;
Crd[Crd.last-1].rright = right_screen; Crd[Crd.last-1].rbottom = top_screen;
Crd[Crd.last-1].width = 12;
Crd[Crd.last-1].height = 4;
Crd[Crd.last-1].x = Crd[ATLAS_MAINBORDER_RT_CORNER].x+Crd[ATLAS_MAINBORDER_RT_CORNER].width+Crd[ATLAS_MAINBORDER_TOOLBAR_FULLY_MINIMISE_ARROW].width-15;
Crd[Crd.last-1].y = Crd[ATLAS_MAINBORDER_TOOLBAR_BKG].y+3;
// Minimise arrow on tool bar.
ATLAS_MAINBORDER_TOOLBAR_MINIMISE_ARROW = addArrayElement(Crd, Crd.last);
Crd[Crd.last-1].rleft = right_screen; Crd[Crd.last-1].rtop = top_screen;
Crd[Crd.last-1].rright = right_screen; Crd[Crd.last-1].rbottom = top_screen;
Crd[Crd.last-1].width = Crd[ATLAS_MAINBORDER_TOOLBAR_FULLY_MINIMISE_ARROW].width;
Crd[Crd.last-1].height = Crd[ATLAS_MAINBORDER_TOOLBAR_FULLY_MINIMISE_ARROW].height;
Crd[Crd.last-1].x = Crd[ATLAS_MAINBORDER_TOOLBAR_FULLY_MINIMISE_ARROW].x;
Crd[Crd.last-1].y = Crd[ATLAS_MAINBORDER_TOOLBAR_BKG_MAX].y+Crd[ATLAS_MAINBORDER_TOOLBAR_BKG].height-Crd[ATLAS_MAINBORDER_TOOLBAR_FULLY_MINIMISE_ARROW].height-1;
// Fully Maximise arrow on tool bar.
ATLAS_MAINBORDER_TOOLBAR_FULLY_MAXIMISE_ARROW = addArrayElement(Crd, Crd.last);
Crd[Crd.last-1].rleft = right_screen; Crd[Crd.last-1].rtop = top_screen;
Crd[Crd.last-1].rright = right_screen; Crd[Crd.last-1].rbottom = top_screen;
Crd[Crd.last-1].width = Crd[ATLAS_MAINBORDER_TOOLBAR_FULLY_MINIMISE_ARROW].width;
Crd[Crd.last-1].height = Crd[ATLAS_MAINBORDER_TOOLBAR_FULLY_MINIMISE_ARROW].height;
Crd[Crd.last-1].x = Crd[ATLAS_MAINBORDER_TOOLBAR_FULLY_MINIMISE_ARROW].x;
Crd[Crd.last-1].y = Crd[ATLAS_MAINBORDER_TOOLBAR_BKG].y+Crd[ATLAS_MAINBORDER_TOOLBAR_BKG].height-Crd[ATLAS_MAINBORDER_TOOLBAR_FULLY_MAXIMISE_ARROW].height-Crd[ATLAS_MAINBORDER_TOOLBAR_FULLY_MAXIMISE_ARROW].height-1;
// Maximise arrow on tool bar.
ATLAS_MAINBORDER_TOOLBAR_MAXIMISE_ARROW = addArrayElement(Crd, Crd.last);
Crd[Crd.last-1].rleft = right_screen; Crd[Crd.last-1].rtop = top_screen;
Crd[Crd.last-1].rright = right_screen; Crd[Crd.last-1].rbottom = top_screen;
Crd[Crd.last-1].width = Crd[ATLAS_MAINBORDER_TOOLBAR_FULLY_MINIMISE_ARROW].width;
Crd[Crd.last-1].height = Crd[ATLAS_MAINBORDER_TOOLBAR_FULLY_MINIMISE_ARROW].height;
Crd[Crd.last-1].x = Crd[ATLAS_MAINBORDER_TOOLBAR_FULLY_MINIMISE_ARROW].x;
Crd[Crd.last-1].y = Crd[ATLAS_MAINBORDER_MENU_BKG].y+Crd[ATLAS_MAINBORDER_MENU_BKG].height-Crd[ATLAS_MAINBORDER_TOOLBAR_MAXIMISE_ARROW].height-Crd[ATLAS_MAINBORDER_TOOLBAR_MAXIMISE_ARROW].height-1;
// Toolbar buttons.
ATLAS_MAINBORDER_TOOLBAR_BUTTON = new Object();
ATLAS_MAINBORDER_TOOLBAR_BUTTON.span = 4;
ATLAS_MAINBORDER_TOOLBAR_BUTTON.max = 80;
for (ATLAS_MAINBORDER_TOOLBAR_BUTTON.last = 1; ATLAS_MAINBORDER_TOOLBAR_BUTTON.last <= ATLAS_MAINBORDER_TOOLBAR_BUTTON.max; ATLAS_MAINBORDER_TOOLBAR_BUTTON.last++)
{
ATLAS_MAINBORDER_TOOLBAR_BUTTON[ATLAS_MAINBORDER_TOOLBAR_BUTTON.last] = Crd.last;
Crd[Crd.last] = new Object();
Crd[Crd.last].width = 15;
Crd[Crd.last].height = 15;
Crd[Crd.last].rleft = left_screen;
Crd[Crd.last].rtop = top_screen;
Crd[Crd.last].rright = left_screen;
Crd[Crd.last].rbottom = top_screen;
if (ATLAS_MAINBORDER_TOOLBAR_BUTTON.last == 1)
Crd[Crd.last].x = Crd[ATLAS_MAINBORDER_MENU_BKG].x+5+ATLAS_MAINBORDER_TOOLBAR_BUTTON.span;
else
Crd[Crd.last].x = Crd[ATLAS_MAINBORDER_TOOLBAR_BUTTON[ATLAS_MAINBORDER_TOOLBAR_BUTTON.last]-1].x+Crd[Crd.last].width+ATLAS_MAINBORDER_TOOLBAR_BUTTON.span;
if (ATLAS_MAINBORDER_TOOLBAR_BUTTON.last == 41)
Crd[Crd.last].x = Crd[ATLAS_MAINBORDER_MENU_BKG].x+5+ATLAS_MAINBORDER_TOOLBAR_BUTTON.span;
if (ATLAS_MAINBORDER_TOOLBAR_BUTTON.last >= 41)
Crd[Crd.last].y = Crd[ATLAS_MAINBORDER_MENU_BKG].y+Crd[ATLAS_MAINBORDER_MENU_BKG].height+1+Crd[ATLAS_MAINBORDER_TOOLBAR_BUTTON[ATLAS_MAINBORDER_TOOLBAR_BUTTON.last]-1].height;
else
Crd[Crd.last].y = Crd[ATLAS_MAINBORDER_MENU_BKG].y+Crd[ATLAS_MAINBORDER_MENU_BKG].height+1;
Crd.last++;
}
// Left-hand selection pane.
ATLAS_LEFT_PANE_BKG = addArrayElement(Crd, Crd.last);
Crd[Crd.last-1].rleft = left_screen; Crd[Crd.last-1].rtop = top_screen;
Crd[Crd.last-1].rright = left_screen; Crd[Crd.last-1].rbottom = bottom_screen;
Crd[Crd.last-1].width = 187;
Crd[Crd.last-1].height = 0;
Crd[Crd.last-1].x = Crd[ATLAS_MAINBORDER_LT_CORNER].x;
Crd[Crd.last-1].y = Crd[ATLAS_MAINBORDER_TOOLBAR_BKG].y+Crd[ATLAS_MAINBORDER_TOOLBAR_BKG].height;
// ============================================= GENERIC BOTTOM SECTION MENU ===============================================
// Bottom-right Mini Map Background.
ATLAS_MINIMAP_BKG = addArrayElement(Crd, Crd.last);
Crd[Crd.last-1].rleft = right_screen; Crd[Crd.last-1].rtop = bottom_screen;
Crd[Crd.last-1].rright = right_screen; Crd[Crd.last-1].rbottom = bottom_screen;
Crd[Crd.last-1].width = 182;
Crd[Crd.last-1].height = 182;
Crd[Crd.last-1].x = 0;
Crd[Crd.last-1].y = 0;
// Bottom-right Mini Map.
ATLAS_MINIMAP = addArrayElement(Crd, Crd.last);
Crd[Crd.last-1].rleft = right_screen; Crd[Crd.last-1].rtop = bottom_screen;
Crd[Crd.last-1].rright = right_screen; Crd[Crd.last-1].rbottom = bottom_screen;
Crd[Crd.last-1].width = 140;
Crd[Crd.last-1].height = 140;
Crd[Crd.last-1].x = 20;
Crd[Crd.last-1].y = 20;
// Bottom selection pane.
ATLAS_BOTTOM_PANE_BKG = addArrayElement(Crd, Crd.last);
Crd[Crd.last-1].rleft = left_screen; Crd[Crd.last-1].rtop = bottom_screen;
Crd[Crd.last-1].rright = right_screen; Crd[Crd.last-1].rbottom = bottom_screen;
Crd[Crd.last-1].width = Crd[ATLAS_LEFT_PANE_BKG].x-Crd[ATLAS_LEFT_PANE_BKG].width-Crd[ATLAS_MINIMAP_BKG].x-Crd[ATLAS_MINIMAP_BKG].width+6;
Crd[Crd.last-1].height = 148;
Crd[Crd.last-1].x = Crd[ATLAS_LEFT_PANE_BKG].x+Crd[ATLAS_LEFT_PANE_BKG].width-3;
Crd[Crd.last-1].y = Crd[ATLAS_LEFT_PANE_BKG].height;
// Left-Bottom selection pane corner.
ATLAS_LB_CORNER = addArrayElement(Crd, Crd.last);
Crd[Crd.last-1].rleft = left_screen; Crd[Crd.last-1].rtop = bottom_screen;
Crd[Crd.last-1].rright = left_screen; Crd[Crd.last-1].rbottom = bottom_screen;
Crd[Crd.last-1].width = 20;
Crd[Crd.last-1].height = 20;
Crd[Crd.last-1].x = Crd[ATLAS_BOTTOM_PANE_BKG].x;
Crd[Crd.last-1].y = Crd[ATLAS_BOTTOM_PANE_BKG].height-4;
// Right-Bottom selection pane corner.
ATLAS_RB_CORNER = addArrayElement(Crd, Crd.last);
Crd[Crd.last-1].rleft = right_screen; Crd[Crd.last-1].rtop = bottom_screen;
Crd[Crd.last-1].rright = right_screen; Crd[Crd.last-1].rbottom = bottom_screen;
Crd[Crd.last-1].width = Crd[ATLAS_MINIMAP_BKG].height-Crd[ATLAS_BOTTOM_PANE_BKG].height+3;
Crd[Crd.last-1].height = Crd[ATLAS_MINIMAP_BKG].height-Crd[ATLAS_BOTTOM_PANE_BKG].height+3;
Crd[Crd.last-1].x = Crd[ATLAS_MINIMAP_BKG].width-2;
Crd[Crd.last-1].y = Crd[ATLAS_LB_CORNER].y;
// Atlas tooltip window.
ATLAS_TOOLTIP = addArrayElement(Crd, Crd.last);
Crd[Crd.last-1].rleft = right_screen; Crd[Crd.last-1].rtop = bottom_screen;
Crd[Crd.last-1].rright = right_screen; Crd[Crd.last-1].rbottom = bottom_screen;
Crd[Crd.last-1].width = Crd[ATLAS_MINIMAP_BKG].width-20;
Crd[Crd.last-1].height = 82;
Crd[Crd.last-1].x = Crd[ATLAS_MINIMAP_BKG].x+10;
Crd[Crd.last-1].y = Crd[ATLAS_MINIMAP_BKG].y+Crd[ATLAS_MINIMAP_BKG].height+4;
// Setup margins for Bottom Section Menu.
ATLAS_BOTTOM_PANE_SECTION = new Object();
ATLAS_BOTTOM_PANE_SECTION.LMARGIN = 5;
ATLAS_BOTTOM_PANE_SECTION.RMARGIN = 5;
ATLAS_BOTTOM_PANE_SECTION.TMARGIN = 5;
ATLAS_BOTTOM_PANE_SECTION.BMARGIN = 5;
// ============================================= GENERIC LEFT SECTION MENU ===============================================
// Second heading of section menu.
ATLAS_LEFT_PANE_SECTION_HEADING_2 = addArrayElement(Crd, Crd.last);
Crd[Crd.last-1].rleft = left_screen; Crd[Crd.last-1].rtop = top_screen;
Crd[Crd.last-1].rright = left_screen; Crd[Crd.last-1].rbottom = top_screen;
Crd[Crd.last-1].width = Crd[ATLAS_LEFT_PANE_BKG].width-2;
Crd[Crd.last-1].height = 21+2;
Crd[Crd.last-1].x = Crd[ATLAS_LEFT_PANE_BKG].x;
Crd[Crd.last-1].y = Crd[ATLAS_MAINBORDER_TOOLBAR_BKG_MAX].y+Crd[ATLAS_MAINBORDER_TOOLBAR_BKG_MAX].height+29;
// Topmost heading of section menu.
ATLAS_LEFT_PANE_SECTION_HEADING_1 = addArrayElement(Crd, Crd.last);
Crd[Crd.last-1].rleft = left_screen; Crd[Crd.last-1].rtop = top_screen;
Crd[Crd.last-1].rright = left_screen; Crd[Crd.last-1].rbottom = top_screen;
Crd[Crd.last-1].width = Crd[ATLAS_LEFT_PANE_SECTION_HEADING_2].width;
Crd[Crd.last-1].height = 31;
Crd[Crd.last-1].x = Crd[ATLAS_LEFT_PANE_SECTION_HEADING_2].x;
Crd[Crd.last-1].y = Crd[ATLAS_MAINBORDER_TOOLBAR_BKG_MAX].y+Crd[ATLAS_MAINBORDER_TOOLBAR_BKG_MAX].height;
// Third heading of section menu.
ATLAS_LEFT_PANE_SECTION_HEADING_3 = addArrayElement(Crd, Crd.last);
Crd[Crd.last-1].rleft = left_screen; Crd[Crd.last-1].rtop = mid_screen;
Crd[Crd.last-1].rright = left_screen; Crd[Crd.last-1].rbottom = mid_screen;
Crd[Crd.last-1].width = Crd[ATLAS_LEFT_PANE_SECTION_HEADING_2].width;
Crd[Crd.last-1].height = Crd[ATLAS_LEFT_PANE_SECTION_HEADING_2].height;
Crd[Crd.last-1].x = Crd[ATLAS_LEFT_PANE_SECTION_HEADING_2].x;
Crd[Crd.last-1].y = 0;
// Setup margins for Left Section Menu.
ATLAS_LEFT_PANE_SECTION = new Object();
ATLAS_LEFT_PANE_SECTION.LMARGIN = 7;
ATLAS_LEFT_PANE_SECTION.RMARGIN = 10;
ATLAS_LEFT_PANE_SECTION.TMARGIN = 10;
ATLAS_LEFT_PANE_SECTION.BMARGIN = 12;
}
// ====================================================================
function atlasUpdateInfoWindow()
{
// Refresh content of Info Window.
getGUIObjectByName("ATLAS_INFO_WINDOW").caption = "File: something.map\nWorkspace: MyWorkspace\nFPS: " + getFPS();
}
// ====================================================================
function atlasFullyMinimiseToolbar()
{
// Hide toolbar.
guiHide("ATLAS_MAINBORDER_TOOLBAR");
guiUnHide("ATLAS_MAINBORDER_TOOLBAR_MAXIMISE_ARROW");
guiHide("ATLAS_MAINBORDER_TOOLBAR_BUTTON_ROW_1");
guiHide("ATLAS_MAINBORDER_TOOLBAR_BUTTON_ROW_2");
// Set toolbar height.
Crd[ATLAS_LEFT_PANE_BKG].y = Crd[ATLAS_MAINBORDER_MENU_BKG].y+Crd[ATLAS_MAINBORDER_MENU_BKG].height;
setSizeArray("ATLAS_LEFT_PANE_BKG", Crd[ATLAS_LEFT_PANE_BKG]);
}
// ====================================================================
function atlasMinimiseToolbar()
{
// Reduce toolbar to one row.
guiHide("ATLAS_MAINBORDER_TOOLBAR_MAX");
guiUnHide("ATLAS_MAINBORDER_TOOLBAR");
guiUnHide("ATLAS_MAINBORDER_TOOLBAR_BUTTON_ROW_1");
guiHide("ATLAS_MAINBORDER_TOOLBAR_BUTTON_ROW_2");
// Set toolbar height.
Crd[ATLAS_LEFT_PANE_BKG].y = Crd[ATLAS_MAINBORDER_TOOLBAR_BKG].y+Crd[ATLAS_MAINBORDER_TOOLBAR_BKG].height;
setSizeArray("ATLAS_LEFT_PANE_BKG", Crd[ATLAS_LEFT_PANE_BKG]);
}
// ====================================================================
function atlasFullyMaximiseToolbar()
{
// Extend toolbar to two rows.
guiHide("ATLAS_MAINBORDER_TOOLBAR");
guiUnHide("ATLAS_MAINBORDER_TOOLBAR_MAX");
guiUnHide("ATLAS_MAINBORDER_TOOLBAR_BUTTON_ROW_1");
guiUnHide("ATLAS_MAINBORDER_TOOLBAR_BUTTON_ROW_2");
// Set toolbar height.
Crd[ATLAS_LEFT_PANE_BKG].y = Crd[ATLAS_MAINBORDER_TOOLBAR_BKG_MAX].y+Crd[ATLAS_MAINBORDER_TOOLBAR_BKG_MAX].height;
setSizeArray("ATLAS_LEFT_PANE_BKG", Crd[ATLAS_LEFT_PANE_BKG]);
}
// ====================================================================
function atlasMaximiseToolbar()
{
// Extend toolbar to one row.
guiUnHide("ATLAS_MAINBORDER_TOOLBAR");
guiHide("ATLAS_MAINBORDER_TOOLBAR_MAXIMISE_ARROW");
guiUnHide("ATLAS_MAINBORDER_TOOLBAR_BUTTON_ROW_1");
guiHide("ATLAS_MAINBORDER_TOOLBAR_BUTTON_ROW_2");
// Set toolbar height.
Crd[ATLAS_LEFT_PANE_BKG].y = Crd[ATLAS_MAINBORDER_TOOLBAR_BKG].y+Crd[ATLAS_MAINBORDER_TOOLBAR_BKG].height;
setSizeArray("ATLAS_LEFT_PANE_BKG", Crd[ATLAS_LEFT_PANE_BKG]);
}
// ====================================================================
function atlasOpenSectionMenu(atlasMenuName)
{
// Open the specified Section Menu; only one is open at a time.
// Clear all section menus to begin.
guiHide("ATLAS_LEFT_PANE_SECTION_MAP");
guiHide("ATLAS_LEFT_PANE_SECTION_TERRAIN");
guiHide("ATLAS_BOTTOM_PANE_SECTION_TERRAIN");
guiHide("ATLAS_LEFT_PANE_SECTION_OBJECT");
guiHide("ATLAS_BOTTOM_PANE_SECTION_OBJECT");
switch (atlasMenuName)
{
case "none":
// Hide backgrounds.
guiHide("ATLAS_LEFT_PANE");
guiHide("ATLAS_BOTTOM_PANE");
// Hide headings.
guiHide("ATLAS_LEFT_PANE_SECTION_HEADING_1");
guiHide("ATLAS_LEFT_PANE_SECTION_HEADING_2");
guiHide("ATLAS_LEFT_PANE_SECTION_HEADING_3");
break;
case "ATLAS_LEFT_PANE_SECTION_MAP":
// Toggle backgrounds.
guiUnHide("ATLAS_LEFT_PANE");
guiHide("ATLAS_BOTTOM_PANE");
// Reveal headings.
guiRenameAndReveal("ATLAS_LEFT_PANE_SECTION_HEADING_1", "Map Creator");
guiRenameAndReveal("ATLAS_LEFT_PANE_SECTION_HEADING_2", "Map Type");
guiRenameAndReveal("ATLAS_LEFT_PANE_SECTION_HEADING_3", "Map Settings");
break;
case "ATLAS_LEFT_PANE_SECTION_TERRAIN":
// Toggle backgrounds.
guiUnHide("ATLAS_LEFT_PANE");
guiUnHide("ATLAS_BOTTOM_PANE");
guiUnHide("ATLAS_BOTTOM_PANE_SECTION_TERRAIN");
// Reveal headings.
guiRenameAndReveal("ATLAS_LEFT_PANE_SECTION_HEADING_1", "Terrain Editor");
guiRenameAndReveal("ATLAS_LEFT_PANE_SECTION_HEADING_2", "Edit Elevation");
guiHide("ATLAS_LEFT_PANE_SECTION_HEADING_3");
break;
case "ATLAS_LEFT_PANE_SECTION_OBJECT":
// Toggle backgrounds.
guiUnHide("ATLAS_LEFT_PANE");
guiUnHide("ATLAS_BOTTOM_PANE");
guiUnHide("ATLAS_BOTTOM_PANE_SECTION_OBJECT");
// Reveal headings.
guiRenameAndReveal("ATLAS_LEFT_PANE_SECTION_HEADING_1", "Object Editor");
guiRenameAndReveal("ATLAS_LEFT_PANE_SECTION_HEADING_2", "Object List");
guiHide("ATLAS_LEFT_PANE_SECTION_HEADING_3");
break;
}
// Reveal Section Menu content.
if (atlasMenuName != "none")
guiUnHide(atlasMenuName);
}
// ====================================================================

View File

@ -1,248 +0,0 @@
function initAtlasSectionMapCreator()
{
// ============================================= MAP CREATOR SECTION MENU ===============================================
// ============================================= MAP CREATOR: MAP TYPE ===============================================
// ============================================= MAP CREATOR: MAP TYPE: MAP SIZE ===============================================
// Height input box for map size.
ATLAS_LEFT_PANE_SECTION_MAP_TILE_HEIGHT_INPUT_BOX = addArrayElement(Crd, Crd.last);
Crd[Crd.last-1].rleft = left_screen; Crd[Crd.last-1].rtop = top_screen;
Crd[Crd.last-1].rright = left_screen; Crd[Crd.last-1].rbottom = top_screen;
Crd[Crd.last-1].width = 58;
Crd[Crd.last-1].height = 14;
Crd[Crd.last-1].x = Crd[ATLAS_LEFT_PANE_SECTION_HEADING_2].x+Crd[ATLAS_LEFT_PANE_SECTION_HEADING_2].width-Crd[ATLAS_LEFT_PANE_SECTION_MAP_TILE_HEIGHT_INPUT_BOX].width-ATLAS_LEFT_PANE_SECTION.RMARGIN;
Crd[Crd.last-1].y = Crd[ATLAS_LEFT_PANE_SECTION_HEADING_2].y+Crd[ATLAS_LEFT_PANE_SECTION_HEADING_2].height+ATLAS_LEFT_PANE_SECTION.TMARGIN+ATLAS_LEFT_PANE_SECTION.TMARGIN;
// "X" between map size input boxes.
ATLAS_LEFT_PANE_SECTION_MAP_TILE_X = addArrayElement(Crd, Crd.last);
Crd[Crd.last-1].rleft = left_screen; Crd[Crd.last-1].rtop = top_screen;
Crd[Crd.last-1].rright = left_screen; Crd[Crd.last-1].rbottom = top_screen;
Crd[Crd.last-1].width = 20;
Crd[Crd.last-1].height = Crd[ATLAS_LEFT_PANE_SECTION_MAP_TILE_HEIGHT_INPUT_BOX].height;
Crd[Crd.last-1].x = Crd[ATLAS_LEFT_PANE_SECTION_MAP_TILE_HEIGHT_INPUT_BOX].x-Crd[ATLAS_LEFT_PANE_SECTION_MAP_TILE_X].width;
Crd[Crd.last-1].y = Crd[ATLAS_LEFT_PANE_SECTION_MAP_TILE_HEIGHT_INPUT_BOX].y;
// Width input box for map size.
ATLAS_LEFT_PANE_SECTION_MAP_TILE_WIDTH_INPUT_BOX = addArrayElement(Crd, Crd.last);
Crd[Crd.last-1].rleft = left_screen; Crd[Crd.last-1].rtop = top_screen;
Crd[Crd.last-1].rright = left_screen; Crd[Crd.last-1].rbottom = top_screen;
Crd[Crd.last-1].width = Crd[ATLAS_LEFT_PANE_SECTION_MAP_TILE_HEIGHT_INPUT_BOX].width;
Crd[Crd.last-1].height = Crd[ATLAS_LEFT_PANE_SECTION_MAP_TILE_HEIGHT_INPUT_BOX].height;
Crd[Crd.last-1].x = Crd[ATLAS_LEFT_PANE_SECTION_MAP_TILE_X].x-Crd[ATLAS_LEFT_PANE_SECTION_MAP_TILE_HEIGHT_INPUT_BOX].width;
Crd[Crd.last-1].y = Crd[ATLAS_LEFT_PANE_SECTION_MAP_TILE_HEIGHT_INPUT_BOX].y;
// "Size:" label.
ATLAS_LEFT_PANE_SECTION_MAP_SIZE_LABEL = addArrayElement(Crd, Crd.last);
Crd[Crd.last-1].rleft = left_screen; Crd[Crd.last-1].rtop = top_screen;
Crd[Crd.last-1].rright = left_screen; Crd[Crd.last-1].rbottom = top_screen;
Crd[Crd.last-1].width = 32;
Crd[Crd.last-1].height = Crd[ATLAS_LEFT_PANE_SECTION_MAP_TILE_HEIGHT_INPUT_BOX].height;
Crd[Crd.last-1].x = Crd[ATLAS_LEFT_PANE_SECTION_MAP_TILE_WIDTH_INPUT_BOX].x-Crd[ATLAS_LEFT_PANE_SECTION_MAP_SIZE_LABEL].width;
Crd[Crd.last-1].y = Crd[ATLAS_LEFT_PANE_SECTION_MAP_TILE_HEIGHT_INPUT_BOX].y;
ATLAS_LEFT_PANE_SECTION_MAP_SIZE_BUTTON_SPAN = 3;
// "Huge" map size button.
ATLAS_LEFT_PANE_SECTION_MAP_SIZE_BUTTON_HUGE = addArrayElement(Crd, Crd.last);
Crd[Crd.last-1].rleft = left_screen; Crd[Crd.last-1].rtop = top_screen;
Crd[Crd.last-1].rright = left_screen; Crd[Crd.last-1].rbottom = top_screen;
Crd[Crd.last-1].width = 40;
Crd[Crd.last-1].height = 20;
Crd[Crd.last-1].x = Crd[ATLAS_LEFT_PANE_SECTION_HEADING_2].x+Crd[ATLAS_LEFT_PANE_SECTION_HEADING_2].width-Crd[ATLAS_LEFT_PANE_SECTION_MAP_SIZE_BUTTON_HUGE].width-ATLAS_LEFT_PANE_SECTION.RMARGIN+2;
Crd[Crd.last-1].y = Crd[ATLAS_LEFT_PANE_SECTION_MAP_TILE_HEIGHT_INPUT_BOX].y+Crd[ATLAS_LEFT_PANE_SECTION_MAP_TILE_HEIGHT_INPUT_BOX].height+ATLAS_LEFT_PANE_SECTION.TMARGIN;
// "Large" map size button.
ATLAS_LEFT_PANE_SECTION_MAP_SIZE_BUTTON_LARGE = addArrayElement(Crd, Crd.last);
Crd[Crd.last-1].rleft = left_screen; Crd[Crd.last-1].rtop = top_screen;
Crd[Crd.last-1].rright = left_screen; Crd[Crd.last-1].rbottom = top_screen;
Crd[Crd.last-1].width = Crd[ATLAS_LEFT_PANE_SECTION_MAP_SIZE_BUTTON_HUGE].width;
Crd[Crd.last-1].height = Crd[ATLAS_LEFT_PANE_SECTION_MAP_SIZE_BUTTON_HUGE].height;
Crd[Crd.last-1].x = Crd[ATLAS_LEFT_PANE_SECTION_MAP_SIZE_BUTTON_HUGE].x-Crd[ATLAS_LEFT_PANE_SECTION_MAP_SIZE_BUTTON_HUGE].width-ATLAS_LEFT_PANE_SECTION_MAP_SIZE_BUTTON_SPAN;
Crd[Crd.last-1].y = Crd[ATLAS_LEFT_PANE_SECTION_MAP_SIZE_BUTTON_HUGE].y;
// "Medium" map size button.
ATLAS_LEFT_PANE_SECTION_MAP_SIZE_BUTTON_MEDIUM = addArrayElement(Crd, Crd.last);
Crd[Crd.last-1].rleft = left_screen; Crd[Crd.last-1].rtop = top_screen;
Crd[Crd.last-1].rright = left_screen; Crd[Crd.last-1].rbottom = top_screen;
Crd[Crd.last-1].width = Crd[ATLAS_LEFT_PANE_SECTION_MAP_SIZE_BUTTON_HUGE].width;
Crd[Crd.last-1].height = Crd[ATLAS_LEFT_PANE_SECTION_MAP_SIZE_BUTTON_HUGE].height;
Crd[Crd.last-1].x = Crd[ATLAS_LEFT_PANE_SECTION_MAP_SIZE_BUTTON_LARGE].x-Crd[ATLAS_LEFT_PANE_SECTION_MAP_SIZE_BUTTON_LARGE].width-ATLAS_LEFT_PANE_SECTION_MAP_SIZE_BUTTON_SPAN;
Crd[Crd.last-1].y = Crd[ATLAS_LEFT_PANE_SECTION_MAP_SIZE_BUTTON_HUGE].y;
// "Small" map size button.
ATLAS_LEFT_PANE_SECTION_MAP_SIZE_BUTTON_SMALL = addArrayElement(Crd, Crd.last);
Crd[Crd.last-1].rleft = left_screen; Crd[Crd.last-1].rtop = top_screen;
Crd[Crd.last-1].rright = left_screen; Crd[Crd.last-1].rbottom = top_screen;
Crd[Crd.last-1].width = Crd[ATLAS_LEFT_PANE_SECTION_MAP_SIZE_BUTTON_HUGE].width;
Crd[Crd.last-1].height = Crd[ATLAS_LEFT_PANE_SECTION_MAP_SIZE_BUTTON_HUGE].height;
Crd[Crd.last-1].x = Crd[ATLAS_LEFT_PANE_SECTION_MAP_SIZE_BUTTON_MEDIUM].x-Crd[ATLAS_LEFT_PANE_SECTION_MAP_SIZE_BUTTON_MEDIUM].width-ATLAS_LEFT_PANE_SECTION_MAP_SIZE_BUTTON_SPAN;
Crd[Crd.last-1].y = Crd[ATLAS_LEFT_PANE_SECTION_MAP_SIZE_BUTTON_HUGE].y;
// Horizontal rule at end of Map Size settings.
ATLAS_LEFT_PANE_SECTION_MAP_SIZE_HR = addArrayElement(Crd, Crd.last);
Crd[Crd.last-1].rleft = left_screen; Crd[Crd.last-1].rtop = top_screen;
Crd[Crd.last-1].rright = left_screen; Crd[Crd.last-1].rbottom = top_screen;
Crd[Crd.last-1].width = Crd[ATLAS_LEFT_PANE_BKG].width-ATLAS_LEFT_PANE_SECTION.LMARGIN-ATLAS_LEFT_PANE_SECTION.RMARGIN;
Crd[Crd.last-1].height = 2;
Crd[Crd.last-1].x = Crd[ATLAS_LEFT_PANE_BKG].x+ATLAS_LEFT_PANE_SECTION.LMARGIN;
Crd[Crd.last-1].y = Crd[ATLAS_LEFT_PANE_SECTION_MAP_SIZE_BUTTON_HUGE].y+Crd[ATLAS_LEFT_PANE_SECTION_MAP_SIZE_BUTTON_HUGE].height+ATLAS_LEFT_PANE_SECTION.BMARGIN;
// ============================================= MAP CREATOR: MAP TYPE: RANDOM MAP ===============================================
// ============================================= MAP CREATOR: MAP SETTINGS ===============================================
// "Players:" label for Map Settings.
ATLAS_LEFT_PANE_SECTION_MAP_SETTINGS_PLAYER_LABEL = addArrayElement(Crd, Crd.last);
Crd[Crd.last-1].rleft = left_screen; Crd[Crd.last-1].rtop = mid_screen;
Crd[Crd.last-1].rright = left_screen; Crd[Crd.last-1].rbottom = mid_screen;
Crd[Crd.last-1].width = 45;
Crd[Crd.last-1].height = 15;
Crd[Crd.last-1].x = Crd[ATLAS_LEFT_PANE_SECTION_HEADING_3].x+ATLAS_LEFT_PANE_SECTION.LMARGIN;
Crd[Crd.last-1].y = Crd[ATLAS_LEFT_PANE_SECTION_HEADING_3].y+Crd[ATLAS_LEFT_PANE_SECTION_HEADING_3].height+ATLAS_LEFT_PANE_SECTION.TMARGIN+ATLAS_LEFT_PANE_SECTION.TMARGIN;
// Players "counter" input box for Map Settings.
ATLAS_LEFT_PANE_SECTION_MAP_SETTINGS_PLAYER_INPUT_BOX = addArrayElement(Crd, Crd.last);
Crd[Crd.last-1].rleft = left_screen; Crd[Crd.last-1].rtop = mid_screen;
Crd[Crd.last-1].rright = left_screen; Crd[Crd.last-1].rbottom = mid_screen;
Crd[Crd.last-1].width = 30;
Crd[Crd.last-1].height = Crd[ATLAS_LEFT_PANE_SECTION_MAP_SETTINGS_PLAYER_LABEL].height;
Crd[Crd.last-1].x = Crd[ATLAS_LEFT_PANE_SECTION_MAP_SETTINGS_PLAYER_LABEL].x+Crd[ATLAS_LEFT_PANE_SECTION_MAP_SETTINGS_PLAYER_LABEL].width;
Crd[Crd.last-1].y = Crd[ATLAS_LEFT_PANE_SECTION_MAP_SETTINGS_PLAYER_LABEL].y;
// Players up button for "counter" input box for Map Settings.
ATLAS_LEFT_PANE_SECTION_MAP_SETTINGS_PLAYER_INPUT_BOX_UP = addArrayElement(Crd, Crd.last);
Crd[Crd.last-1].rleft = left_screen; Crd[Crd.last-1].rtop = mid_screen;
Crd[Crd.last-1].rright = left_screen; Crd[Crd.last-1].rbottom = mid_screen;
Crd[Crd.last-1].width = ATLAS_COUNTER_BOX.width;
Crd[Crd.last-1].height = (Crd[ATLAS_LEFT_PANE_SECTION_MAP_SETTINGS_PLAYER_INPUT_BOX].height/2)+3;
Crd[Crd.last-1].x = Crd[ATLAS_LEFT_PANE_SECTION_MAP_SETTINGS_PLAYER_INPUT_BOX].x+Crd[ATLAS_LEFT_PANE_SECTION_MAP_SETTINGS_PLAYER_INPUT_BOX].width-Crd[ATLAS_LEFT_PANE_SECTION_MAP_SETTINGS_PLAYER_INPUT_BOX_UP].width;
Crd[Crd.last-1].y = Crd[ATLAS_LEFT_PANE_SECTION_MAP_SETTINGS_PLAYER_INPUT_BOX].y-3;
// Players down button for "counter" input box for Map Settings.
ATLAS_LEFT_PANE_SECTION_MAP_SETTINGS_PLAYER_INPUT_BOX_DN = addArrayElement(Crd, Crd.last);
Crd[Crd.last-1].rleft = left_screen; Crd[Crd.last-1].rtop = mid_screen;
Crd[Crd.last-1].rright = left_screen; Crd[Crd.last-1].rbottom = mid_screen;
Crd[Crd.last-1].width = ATLAS_COUNTER_BOX.width;
Crd[Crd.last-1].height = Crd[ATLAS_LEFT_PANE_SECTION_MAP_SETTINGS_PLAYER_INPUT_BOX_UP].height;
Crd[Crd.last-1].x = Crd[ATLAS_LEFT_PANE_SECTION_MAP_SETTINGS_PLAYER_INPUT_BOX].x+Crd[ATLAS_LEFT_PANE_SECTION_MAP_SETTINGS_PLAYER_INPUT_BOX].width-Crd[ATLAS_LEFT_PANE_SECTION_MAP_SETTINGS_PLAYER_INPUT_BOX_UP].width;
Crd[Crd.last-1].y = Crd[ATLAS_LEFT_PANE_SECTION_MAP_SETTINGS_PLAYER_INPUT_BOX].y+Crd[ATLAS_LEFT_PANE_SECTION_MAP_SETTINGS_PLAYER_INPUT_BOX].height-Crd[ATLAS_LEFT_PANE_SECTION_MAP_SETTINGS_PLAYER_INPUT_BOX_DN].height;
// Settlements "counter" input box for Map Settings.
ATLAS_LEFT_PANE_SECTION_MAP_SETTINGS_SETTLEMENT_INPUT_BOX = addArrayElement(Crd, Crd.last);
Crd[Crd.last-1].rleft = left_screen; Crd[Crd.last-1].rtop = mid_screen;
Crd[Crd.last-1].rright = left_screen; Crd[Crd.last-1].rbottom = mid_screen;
Crd[Crd.last-1].width = Crd[ATLAS_LEFT_PANE_SECTION_MAP_SETTINGS_PLAYER_INPUT_BOX].width;
Crd[Crd.last-1].height = Crd[ATLAS_LEFT_PANE_SECTION_MAP_SETTINGS_PLAYER_INPUT_BOX].height;
Crd[Crd.last-1].x = Crd[ATLAS_LEFT_PANE_SECTION_HEADING_3].x+Crd[ATLAS_LEFT_PANE_SECTION_HEADING_3].width-Crd[ATLAS_LEFT_PANE_SECTION_MAP_SETTINGS_SETTLEMENT_INPUT_BOX].width-ATLAS_LEFT_PANE_SECTION.RMARGIN;
Crd[Crd.last-1].y = Crd[ATLAS_LEFT_PANE_SECTION_MAP_SETTINGS_PLAYER_INPUT_BOX].y;
// Settlements up button for "counter" input box for Map Settings.
ATLAS_LEFT_PANE_SECTION_MAP_SETTINGS_SETTLEMENT_INPUT_BOX_UP = addArrayElement(Crd, Crd.last);
Crd[Crd.last-1].rleft = left_screen; Crd[Crd.last-1].rtop = mid_screen;
Crd[Crd.last-1].rright = left_screen; Crd[Crd.last-1].rbottom = mid_screen;
Crd[Crd.last-1].width = ATLAS_COUNTER_BOX.width;
Crd[Crd.last-1].height = (Crd[ATLAS_LEFT_PANE_SECTION_MAP_SETTINGS_SETTLEMENT_INPUT_BOX].height/2)+3;
Crd[Crd.last-1].x = Crd[ATLAS_LEFT_PANE_SECTION_MAP_SETTINGS_SETTLEMENT_INPUT_BOX].x+Crd[ATLAS_LEFT_PANE_SECTION_MAP_SETTINGS_SETTLEMENT_INPUT_BOX].width-Crd[ATLAS_LEFT_PANE_SECTION_MAP_SETTINGS_SETTLEMENT_INPUT_BOX_UP].width;
Crd[Crd.last-1].y = Crd[ATLAS_LEFT_PANE_SECTION_MAP_SETTINGS_SETTLEMENT_INPUT_BOX].y-3;
// Settlements down button for "counter" input box for Map Settings.
ATLAS_LEFT_PANE_SECTION_MAP_SETTINGS_SETTLEMENT_INPUT_BOX_DN = addArrayElement(Crd, Crd.last);
Crd[Crd.last-1].rleft = left_screen; Crd[Crd.last-1].rtop = mid_screen;
Crd[Crd.last-1].rright = left_screen; Crd[Crd.last-1].rbottom = mid_screen;
Crd[Crd.last-1].width = ATLAS_COUNTER_BOX.width;
Crd[Crd.last-1].height = Crd[ATLAS_LEFT_PANE_SECTION_MAP_SETTINGS_SETTLEMENT_INPUT_BOX_UP].height;
Crd[Crd.last-1].x = Crd[ATLAS_LEFT_PANE_SECTION_MAP_SETTINGS_SETTLEMENT_INPUT_BOX].x+Crd[ATLAS_LEFT_PANE_SECTION_MAP_SETTINGS_SETTLEMENT_INPUT_BOX].width-Crd[ATLAS_LEFT_PANE_SECTION_MAP_SETTINGS_SETTLEMENT_INPUT_BOX_UP].width;
Crd[Crd.last-1].y = Crd[ATLAS_LEFT_PANE_SECTION_MAP_SETTINGS_SETTLEMENT_INPUT_BOX].y+Crd[ATLAS_LEFT_PANE_SECTION_MAP_SETTINGS_SETTLEMENT_INPUT_BOX].height-Crd[ATLAS_LEFT_PANE_SECTION_MAP_SETTINGS_SETTLEMENT_INPUT_BOX_DN].height;
// "Settlements" label for Map Settings.
ATLAS_LEFT_PANE_SECTION_MAP_SETTINGS_SETTLEMENT_LABEL = addArrayElement(Crd, Crd.last);
Crd[Crd.last-1].rleft = left_screen; Crd[Crd.last-1].rtop = mid_screen;
Crd[Crd.last-1].rright = left_screen; Crd[Crd.last-1].rbottom = mid_screen;
Crd[Crd.last-1].width = 62;
Crd[Crd.last-1].height = Crd[ATLAS_LEFT_PANE_SECTION_MAP_SETTINGS_PLAYER_LABEL].height;
Crd[Crd.last-1].x = Crd[ATLAS_LEFT_PANE_SECTION_MAP_SETTINGS_SETTLEMENT_INPUT_BOX].x-Crd[ATLAS_LEFT_PANE_SECTION_MAP_SETTINGS_SETTLEMENT_LABEL].width;
Crd[Crd.last-1].y = Crd[ATLAS_LEFT_PANE_SECTION_MAP_SETTINGS_SETTLEMENT_INPUT_BOX].y;
// "Resources:" label for Map Settings.
ATLAS_LEFT_PANE_SECTION_MAP_SETTINGS_RESOURCES_LABEL = addArrayElement(Crd, Crd.last);
Crd[Crd.last-1].rleft = left_screen; Crd[Crd.last-1].rtop = mid_screen;
Crd[Crd.last-1].rright = left_screen; Crd[Crd.last-1].rbottom = mid_screen;
Crd[Crd.last-1].width = 60;
Crd[Crd.last-1].height = 15;
Crd[Crd.last-1].x = Crd[ATLAS_LEFT_PANE_SECTION_MAP_SETTINGS_PLAYER_LABEL].x;
Crd[Crd.last-1].y = Crd[ATLAS_LEFT_PANE_SECTION_MAP_SETTINGS_PLAYER_LABEL].y+Crd[ATLAS_LEFT_PANE_SECTION_MAP_SETTINGS_PLAYER_LABEL].height+ATLAS_LEFT_PANE_SECTION.TMARGIN+ATLAS_LEFT_PANE_SECTION.TMARGIN;
// Resources "drop-down" box for Map Settings.
ATLAS_LEFT_PANE_SECTION_MAP_SETTINGS_RESOURCES_COMBO_BOX = addArrayElement(Crd, Crd.last);
Crd[Crd.last-1].rleft = left_screen; Crd[Crd.last-1].rtop = mid_screen;
Crd[Crd.last-1].rright = left_screen; Crd[Crd.last-1].rbottom = mid_screen;
Crd[Crd.last-1].width = 55;
Crd[Crd.last-1].height = Crd[ATLAS_LEFT_PANE_SECTION_MAP_SETTINGS_PLAYER_LABEL].height;
Crd[Crd.last-1].x = Crd[ATLAS_LEFT_PANE_SECTION_MAP_SETTINGS_RESOURCES_LABEL].x+Crd[ATLAS_LEFT_PANE_SECTION_MAP_SETTINGS_RESOURCES_LABEL].width;
Crd[Crd.last-1].y = Crd[ATLAS_LEFT_PANE_SECTION_MAP_SETTINGS_RESOURCES_LABEL].y;
// ============================================= MAP CREATOR: MAP SETTINGS: TERRITORIES ===============================================
// ============================================= MAP CREATOR: GENERATE ===============================================
// Terrain Map input box.
ATLAS_LEFT_PANE_SECTION_GENERATE_TERRAIN_MAP_INPUT_BOX = addArrayElement(Crd, Crd.last);
Crd[Crd.last-1].rleft = left_screen; Crd[Crd.last-1].rtop = bottom_screen;
Crd[Crd.last-1].rright = left_screen; Crd[Crd.last-1].rbottom = bottom_screen;
Crd[Crd.last-1].width = Crd[ATLAS_LEFT_PANE_SECTION_HEADING_3].width-ATLAS_LEFT_PANE_SECTION.LMARGIN-ATLAS_LEFT_PANE_SECTION.RMARGIN-ATLAS_LEFT_PANE_SECTION.LMARGIN;
Crd[Crd.last-1].height = 15;
Crd[Crd.last-1].x = Crd[ATLAS_LEFT_PANE_SECTION_HEADING_3].x+ATLAS_LEFT_PANE_SECTION.LMARGIN+ATLAS_LEFT_PANE_SECTION.LMARGIN;
Crd[Crd.last-1].y = ATLAS_LEFT_PANE_SECTION.BMARGIN;
// "Terrain Map:" label.
ATLAS_LEFT_PANE_SECTION_GENERATE_TERRAIN_MAP_LABEL = addArrayElement(Crd, Crd.last);
Crd[Crd.last-1].rleft = left_screen; Crd[Crd.last-1].rtop = bottom_screen;
Crd[Crd.last-1].rright = left_screen; Crd[Crd.last-1].rbottom = bottom_screen;
Crd[Crd.last-1].width = Crd[ATLAS_LEFT_PANE_SECTION_GENERATE_TERRAIN_MAP_INPUT_BOX].width;
Crd[Crd.last-1].height = 20;
Crd[Crd.last-1].x = Crd[ATLAS_LEFT_PANE_SECTION_GENERATE_TERRAIN_MAP_INPUT_BOX].x;
Crd[Crd.last-1].y = Crd[ATLAS_LEFT_PANE_SECTION_GENERATE_TERRAIN_MAP_INPUT_BOX].y+Crd[ATLAS_LEFT_PANE_SECTION_GENERATE_TERRAIN_MAP_INPUT_BOX].height;
// Height Map input box.
ATLAS_LEFT_PANE_SECTION_GENERATE_HEIGHT_MAP_INPUT_BOX = addArrayElement(Crd, Crd.last);
Crd[Crd.last-1].rleft = left_screen; Crd[Crd.last-1].rtop = bottom_screen;
Crd[Crd.last-1].rright = left_screen; Crd[Crd.last-1].rbottom = bottom_screen;
Crd[Crd.last-1].width = Crd[ATLAS_LEFT_PANE_SECTION_GENERATE_TERRAIN_MAP_INPUT_BOX].width;
Crd[Crd.last-1].height = Crd[ATLAS_LEFT_PANE_SECTION_GENERATE_TERRAIN_MAP_INPUT_BOX].height;
Crd[Crd.last-1].x = Crd[ATLAS_LEFT_PANE_SECTION_GENERATE_TERRAIN_MAP_INPUT_BOX].x;
Crd[Crd.last-1].y = Crd[ATLAS_LEFT_PANE_SECTION_GENERATE_TERRAIN_MAP_LABEL].y+Crd[ATLAS_LEFT_PANE_SECTION_GENERATE_TERRAIN_MAP_LABEL].height;
// "Height Map:" label.
ATLAS_LEFT_PANE_SECTION_GENERATE_HEIGHT_MAP_LABEL = addArrayElement(Crd, Crd.last);
Crd[Crd.last-1].rleft = left_screen; Crd[Crd.last-1].rtop = bottom_screen;
Crd[Crd.last-1].rright = left_screen; Crd[Crd.last-1].rbottom = bottom_screen;
Crd[Crd.last-1].width = Crd[ATLAS_LEFT_PANE_SECTION_GENERATE_TERRAIN_MAP_INPUT_BOX].width;
Crd[Crd.last-1].height = Crd[ATLAS_LEFT_PANE_SECTION_GENERATE_TERRAIN_MAP_LABEL].height;
Crd[Crd.last-1].x = Crd[ATLAS_LEFT_PANE_SECTION_GENERATE_TERRAIN_MAP_INPUT_BOX].x;
Crd[Crd.last-1].y = Crd[ATLAS_LEFT_PANE_SECTION_GENERATE_HEIGHT_MAP_INPUT_BOX].y+Crd[ATLAS_LEFT_PANE_SECTION_GENERATE_HEIGHT_MAP_INPUT_BOX].height;
// "Generate!" border.
ATLAS_LEFT_PANE_SECTION_GENERATE_BORDER = addArrayElement(Crd, Crd.last);
Crd[Crd.last-1].rleft = left_screen; Crd[Crd.last-1].rtop = bottom_screen;
Crd[Crd.last-1].rright = left_screen; Crd[Crd.last-1].rbottom = bottom_screen;
Crd[Crd.last-1].width = Crd[ATLAS_LEFT_PANE_SECTION_GENERATE_TERRAIN_MAP_INPUT_BOX].width;
Crd[Crd.last-1].height = 40;
Crd[Crd.last-1].x = Crd[ATLAS_LEFT_PANE_SECTION_GENERATE_TERRAIN_MAP_INPUT_BOX].x;
Crd[Crd.last-1].y = Crd[ATLAS_LEFT_PANE_SECTION_GENERATE_HEIGHT_MAP_INPUT_BOX].y+Crd[ATLAS_LEFT_PANE_SECTION_GENERATE_HEIGHT_MAP_INPUT_BOX].height+Crd[ATLAS_LEFT_PANE_SECTION_GENERATE_BORDER].height+ATLAS_LEFT_PANE_SECTION.BMARGIN;
ATLAS_LEFT_PANE_SECTION_GENERATE_SPAN = 7;
// "Generate!" button.
ATLAS_LEFT_PANE_SECTION_GENERATE_BUTTON = addArrayElement(Crd, Crd.last);
Crd[Crd.last-1].rleft = left_screen; Crd[Crd.last-1].rtop = bottom_screen;
Crd[Crd.last-1].rright = left_screen; Crd[Crd.last-1].rbottom = bottom_screen;
Crd[Crd.last-1].width = Crd[ATLAS_LEFT_PANE_SECTION_GENERATE_TERRAIN_MAP_INPUT_BOX].width-ATLAS_LEFT_PANE_SECTION_GENERATE_SPAN-ATLAS_LEFT_PANE_SECTION_GENERATE_SPAN;
Crd[Crd.last-1].height = Crd[ATLAS_LEFT_PANE_SECTION_GENERATE_BORDER].height-ATLAS_LEFT_PANE_SECTION_GENERATE_SPAN-ATLAS_LEFT_PANE_SECTION_GENERATE_SPAN;
Crd[Crd.last-1].x = Crd[ATLAS_LEFT_PANE_SECTION_GENERATE_BORDER].x+ATLAS_LEFT_PANE_SECTION_GENERATE_SPAN;
Crd[Crd.last-1].y = Crd[ATLAS_LEFT_PANE_SECTION_GENERATE_BORDER].y+ATLAS_LEFT_PANE_SECTION_GENERATE_SPAN;
}
// ====================================================================

View File

@ -1,163 +0,0 @@
function initAtlasSectionObjectEditor()
{
// ============================================= OBJECT EDITOR: SELECTION ==============================================
// Object category label.
ATLAS_LEFT_PANE_SECTION_OBJECT_CATEGORY_LABEL = addArrayElement(Crd, Crd.last);
Crd[Crd.last-1].rleft = left_screen; Crd[Crd.last-1].rtop = top_screen;
Crd[Crd.last-1].rright = left_screen; Crd[Crd.last-1].rbottom = top_screen;
Crd[Crd.last-1].width = Crd[ATLAS_LEFT_PANE_SECTION_HEADING_2].width-ATLAS_LEFT_PANE_SECTION.LMARGIN-ATLAS_LEFT_PANE_SECTION.RMARGIN-ATLAS_LEFT_PANE_SECTION.LMARGIN;
Crd[Crd.last-1].height = 20;
Crd[Crd.last-1].x = Crd[ATLAS_LEFT_PANE_SECTION_HEADING_2].x+ATLAS_LEFT_PANE_SECTION.LMARGIN+ATLAS_LEFT_PANE_SECTION.LMARGIN;
Crd[Crd.last-1].y = Crd[ATLAS_LEFT_PANE_SECTION_HEADING_2].y+Crd[ATLAS_LEFT_PANE_SECTION_HEADING_2].height;
// Object category input box.
ATLAS_LEFT_PANE_SECTION_OBJECT_CATEGORY_COMBO_BOX = addArrayElement(Crd, Crd.last);
Crd[Crd.last-1].rleft = left_screen; Crd[Crd.last-1].rtop = top_screen;
Crd[Crd.last-1].rright = left_screen; Crd[Crd.last-1].rbottom = top_screen;
Crd[Crd.last-1].width = Crd[ATLAS_LEFT_PANE_SECTION_OBJECT_CATEGORY_LABEL].width;
Crd[Crd.last-1].height = 15;
Crd[Crd.last-1].x = Crd[ATLAS_LEFT_PANE_SECTION_OBJECT_CATEGORY_LABEL].x;
Crd[Crd.last-1].y = Crd[ATLAS_LEFT_PANE_SECTION_OBJECT_CATEGORY_LABEL].y+Crd[ATLAS_LEFT_PANE_SECTION_OBJECT_CATEGORY_LABEL].height;
// Custom button.
ATLAS_LEFT_PANE_SECTION_OBJECT_BUTTON_CUSTOM_ACTOR = addArrayElement(Crd, Crd.last);
Crd[Crd.last-1].rleft = left_screen; Crd[Crd.last-1].rtop = top_screen;
Crd[Crd.last-1].rright = left_screen; Crd[Crd.last-1].rbottom = top_screen;
Crd[Crd.last-1].width = Crd[ATLAS_LEFT_PANE_SECTION_TERRAIN_CLIFF_BUTTON_CUSTOM].width;
Crd[Crd.last-1].height = Crd[ATLAS_LEFT_PANE_SECTION_TERRAIN_CLIFF_BUTTON_CUSTOM].height;
Crd[Crd.last-1].x = Crd[ATLAS_LEFT_PANE_SECTION_OBJECT_CATEGORY_COMBO_BOX].x-4;
Crd[Crd.last-1].y = Crd[ATLAS_LEFT_PANE_SECTION_OBJECT_CATEGORY_COMBO_BOX].y+Crd[ATLAS_LEFT_PANE_SECTION_OBJECT_CATEGORY_COMBO_BOX].height+ATLAS_LEFT_PANE_SECTION.TMARGIN;
// Custom button.
ATLAS_LEFT_PANE_SECTION_OBJECT_BUTTON_CUSTOM_ENTITY = addArrayElement(Crd, Crd.last);
Crd[Crd.last-1].rleft = left_screen; Crd[Crd.last-1].rtop = top_screen;
Crd[Crd.last-1].rright = left_screen; Crd[Crd.last-1].rbottom = top_screen;
Crd[Crd.last-1].width = Crd[ATLAS_LEFT_PANE_SECTION_OBJECT_BUTTON_CUSTOM_ACTOR].width;
Crd[Crd.last-1].height = Crd[ATLAS_LEFT_PANE_SECTION_OBJECT_BUTTON_CUSTOM_ACTOR].height;
Crd[Crd.last-1].x = Crd[ATLAS_LEFT_PANE_SECTION_OBJECT_CATEGORY_COMBO_BOX].x+4+Crd[ATLAS_LEFT_PANE_SECTION_OBJECT_CATEGORY_COMBO_BOX].width-Crd[ATLAS_LEFT_PANE_SECTION_OBJECT_BUTTON_CUSTOM_ENTITY].width;
Crd[Crd.last-1].y = Crd[ATLAS_LEFT_PANE_SECTION_OBJECT_BUTTON_CUSTOM_ACTOR].y;
// ============================================= OBJECT EDITOR: LIST ==============================================
// Background of Object List.
ATLAS_LEFT_PANE_SECTION_OBJECT_LIST_BKG = addArrayElement(Crd, Crd.last);
Crd[Crd.last-1].rleft = left_screen; Crd[Crd.last-1].rtop = top_screen;
Crd[Crd.last-1].rright = left_screen; Crd[Crd.last-1].rbottom = bottom_screen;
Crd[Crd.last-1].width = Crd[ATLAS_LEFT_PANE_SECTION_OBJECT_CATEGORY_COMBO_BOX].width+2;
Crd[Crd.last-1].height = 163+2;
Crd[Crd.last-1].x = Crd[ATLAS_LEFT_PANE_SECTION_OBJECT_CATEGORY_COMBO_BOX].x;
Crd[Crd.last-1].y = Crd[ATLAS_LEFT_PANE_SECTION_OBJECT_BUTTON_CUSTOM_ACTOR].y+Crd[ATLAS_LEFT_PANE_SECTION_OBJECT_BUTTON_CUSTOM_ACTOR].height+ATLAS_LEFT_PANE_SECTION.TMARGIN;
// Player input box.
ATLAS_LEFT_PANE_SECTION_OBJECT_LIST_PLAYER_INPUT_BOX = addArrayElement(Crd, Crd.last);
Crd[Crd.last-1].rleft = left_screen; Crd[Crd.last-1].rtop = top_screen;
Crd[Crd.last-1].rright = left_screen; Crd[Crd.last-1].rbottom = top_screen;
Crd[Crd.last-1].width = Crd[ATLAS_LEFT_PANE_SECTION_TERRAIN_WATER_DEPTH_INPUT_BOX].width;
Crd[Crd.last-1].height = Crd[ATLAS_LEFT_PANE_SECTION_TERRAIN_WATER_DEPTH_INPUT_BOX].height;
Crd[Crd.last-1].x = Crd[ATLAS_LEFT_PANE_SECTION_OBJECT_LIST_BKG].x+10;
Crd[Crd.last-1].y = Crd[ATLAS_LEFT_PANE_SECTION_OBJECT_LIST_BKG].y+10;
// Up button for Player input box.
ATLAS_LEFT_PANE_SECTION_OBJECT_LIST_PLAYER_INPUT_BOX_UP = addArrayElement(Crd, Crd.last);
Crd[Crd.last-1].rleft = left_screen; Crd[Crd.last-1].rtop = top_screen;
Crd[Crd.last-1].rright = left_screen; Crd[Crd.last-1].rbottom = top_screen;
Crd[Crd.last-1].width = ATLAS_COUNTER_BOX.width;
Crd[Crd.last-1].height = (Crd[ATLAS_LEFT_PANE_SECTION_OBJECT_LIST_PLAYER_INPUT_BOX].height/2)+3;
Crd[Crd.last-1].x = Crd[ATLAS_LEFT_PANE_SECTION_OBJECT_LIST_PLAYER_INPUT_BOX].x+Crd[ATLAS_LEFT_PANE_SECTION_OBJECT_LIST_PLAYER_INPUT_BOX].width-Crd[ATLAS_LEFT_PANE_SECTION_OBJECT_LIST_PLAYER_INPUT_BOX_UP].width;
Crd[Crd.last-1].y = Crd[ATLAS_LEFT_PANE_SECTION_OBJECT_LIST_PLAYER_INPUT_BOX].y-3;
// Down button for Player input box.
ATLAS_LEFT_PANE_SECTION_OBJECT_LIST_PLAYER_INPUT_BOX_DN = addArrayElement(Crd, Crd.last);
Crd[Crd.last-1].rleft = left_screen; Crd[Crd.last-1].rtop = top_screen;
Crd[Crd.last-1].rright = left_screen; Crd[Crd.last-1].rbottom = top_screen;
Crd[Crd.last-1].width = ATLAS_COUNTER_BOX.width;
Crd[Crd.last-1].height = Crd[ATLAS_LEFT_PANE_SECTION_OBJECT_LIST_PLAYER_INPUT_BOX_UP].height;
Crd[Crd.last-1].x = Crd[ATLAS_LEFT_PANE_SECTION_OBJECT_LIST_PLAYER_INPUT_BOX].x+Crd[ATLAS_LEFT_PANE_SECTION_OBJECT_LIST_PLAYER_INPUT_BOX].width-Crd[ATLAS_LEFT_PANE_SECTION_OBJECT_LIST_PLAYER_INPUT_BOX_UP].width;
Crd[Crd.last-1].y = Crd[ATLAS_LEFT_PANE_SECTION_OBJECT_LIST_PLAYER_INPUT_BOX].y+Crd[ATLAS_LEFT_PANE_SECTION_OBJECT_LIST_PLAYER_INPUT_BOX].height-Crd[ATLAS_LEFT_PANE_SECTION_OBJECT_LIST_PLAYER_INPUT_BOX_DN].height;
// Player label.
ATLAS_LEFT_PANE_SECTION_OBJECT_LIST_PLAYER_LABEL = addArrayElement(Crd, Crd.last);
Crd[Crd.last-1].rleft = left_screen; Crd[Crd.last-1].rtop = top_screen;
Crd[Crd.last-1].rright = left_screen; Crd[Crd.last-1].rbottom = top_screen;
Crd[Crd.last-1].width = Crd[ATLAS_LEFT_PANE_SECTION_TERRAIN_WATER_DEPTH_LABEL].width;
Crd[Crd.last-1].height = Crd[ATLAS_LEFT_PANE_SECTION_TERRAIN_WATER_DEPTH_LABEL].height;
Crd[Crd.last-1].x = Crd[ATLAS_LEFT_PANE_SECTION_OBJECT_LIST_PLAYER_INPUT_BOX].x+Crd[ATLAS_LEFT_PANE_SECTION_OBJECT_LIST_PLAYER_INPUT_BOX].width;
Crd[Crd.last-1].y = Crd[ATLAS_LEFT_PANE_SECTION_OBJECT_LIST_PLAYER_INPUT_BOX].y;
// Objects heading.
ATLAS_LEFT_PANE_SECTION_OBJECT_LIST_HEADING = addArrayElement(Crd, Crd.last);
Crd[Crd.last-1].rleft = left_screen; Crd[Crd.last-1].rtop = top_screen;
Crd[Crd.last-1].rright = left_screen; Crd[Crd.last-1].rbottom = top_screen;
Crd[Crd.last-1].width = 65;
Crd[Crd.last-1].height = Crd[ATLAS_LEFT_PANE_SECTION_TERRAIN_WATER_DEPTH_LABEL].height;
Crd[Crd.last-1].x = Crd[ATLAS_LEFT_PANE_SECTION_OBJECT_LIST_BKG].x+Crd[ATLAS_LEFT_PANE_SECTION_OBJECT_LIST_BKG].width-Crd[ATLAS_LEFT_PANE_SECTION_OBJECT_LIST_HEADING].width;
Crd[Crd.last-1].y = Crd[ATLAS_LEFT_PANE_SECTION_OBJECT_LIST_PLAYER_INPUT_BOX].y;
// Object list sort input box.
ATLAS_LEFT_PANE_SECTION_OBJECT_LIST_SORT_COMBO_BOX = addArrayElement(Crd, Crd.last);
Crd[Crd.last-1].rleft = left_screen; Crd[Crd.last-1].rtop = top_screen;
Crd[Crd.last-1].rright = left_screen; Crd[Crd.last-1].rbottom = top_screen;
Crd[Crd.last-1].width = 90;
Crd[Crd.last-1].height = 15;
Crd[Crd.last-1].x = Crd[ATLAS_LEFT_PANE_SECTION_OBJECT_LIST_BKG].x+Crd[ATLAS_LEFT_PANE_SECTION_OBJECT_LIST_BKG].width-Crd[ATLAS_LEFT_PANE_SECTION_OBJECT_LIST_SORT_COMBO_BOX].width-10;
Crd[Crd.last-1].y = Crd[ATLAS_LEFT_PANE_SECTION_OBJECT_LIST_HEADING].y+Crd[ATLAS_LEFT_PANE_SECTION_OBJECT_LIST_HEADING].height+10;
// Object list sort label.
ATLAS_LEFT_PANE_SECTION_OBJECT_LIST_SORT_LABEL = addArrayElement(Crd, Crd.last);
Crd[Crd.last-1].rleft = left_screen; Crd[Crd.last-1].rtop = top_screen;
Crd[Crd.last-1].rright = left_screen; Crd[Crd.last-1].rbottom = top_screen;
Crd[Crd.last-1].width = 35;
Crd[Crd.last-1].height = Crd[ATLAS_LEFT_PANE_SECTION_OBJECT_LIST_SORT_COMBO_BOX].height;
Crd[Crd.last-1].x = Crd[ATLAS_LEFT_PANE_SECTION_OBJECT_LIST_SORT_COMBO_BOX].x-Crd[ATLAS_LEFT_PANE_SECTION_OBJECT_LIST_SORT_LABEL].width;
Crd[Crd.last-1].y = Crd[ATLAS_LEFT_PANE_SECTION_OBJECT_LIST_SORT_COMBO_BOX].y-3;
// Object List.
ATLAS_LEFT_PANE_SECTION_OBJECT_LIST = addArrayElement(Crd, Crd.last);
Crd[Crd.last-1].rleft = left_screen; Crd[Crd.last-1].rtop = top_screen;
Crd[Crd.last-1].rright = left_screen; Crd[Crd.last-1].rbottom = bottom_screen;
Crd[Crd.last-1].width = Crd[ATLAS_LEFT_PANE_SECTION_OBJECT_LIST_BKG].width;
Crd[Crd.last-1].height = Crd[ATLAS_LEFT_PANE_SECTION_OBJECT_LIST_BKG].height;
Crd[Crd.last-1].x = Crd[ATLAS_LEFT_PANE_SECTION_OBJECT_LIST_BKG].x;
Crd[Crd.last-1].y = Crd[ATLAS_LEFT_PANE_SECTION_OBJECT_LIST_SORT_COMBO_BOX].y+Crd[ATLAS_LEFT_PANE_SECTION_OBJECT_LIST_SORT_COMBO_BOX].height+ATLAS_LEFT_PANE_SECTION.TMARGIN;
// ============================================= OBJECT EDITOR: ANIMATION VIEWER ===============================================
// Animation Viewer combobox label.
ATLAS_BOTTOM_PANE_SECTION_OBJECT_ANIM_COMBO_BOX_LABEL = addArrayElement(Crd, Crd.last);
Crd[Crd.last-1].rleft = left_screen; Crd[Crd.last-1].rtop = bottom_screen;
Crd[Crd.last-1].rright = left_screen; Crd[Crd.last-1].rbottom = bottom_screen;
Crd[Crd.last-1].width = 60;
Crd[Crd.last-1].height = 20;
Crd[Crd.last-1].x = ATLAS_LEFT_PANE_SECTION.LMARGIN;
Crd[Crd.last-1].y = 2;
// Animation Viewer combobox.
ATLAS_BOTTOM_PANE_SECTION_OBJECT_ANIM_COMBO_BOX = addArrayElement(Crd, Crd.last);
Crd[Crd.last-1].rleft = left_screen; Crd[Crd.last-1].rtop = bottom_screen;
Crd[Crd.last-1].rright = left_screen; Crd[Crd.last-1].rbottom = bottom_screen;
Crd[Crd.last-1].width = 65;
Crd[Crd.last-1].height = 10;
Crd[Crd.last-1].x = Crd[ATLAS_BOTTOM_PANE_SECTION_OBJECT_ANIM_COMBO_BOX_LABEL].x+Crd[ATLAS_BOTTOM_PANE_SECTION_OBJECT_ANIM_COMBO_BOX_LABEL].width;
Crd[Crd.last-1].y = Crd[ATLAS_BOTTOM_PANE_SECTION_OBJECT_ANIM_COMBO_BOX_LABEL].y+5;
// Animation Viewer.
ATLAS_BOTTOM_PANE_SECTION_OBJECT_ANIM_VIEWER = addArrayElement(Crd, Crd.last);
Crd[Crd.last-1].rleft = left_screen; Crd[Crd.last-1].rtop = bottom_screen;
Crd[Crd.last-1].rright = left_screen; Crd[Crd.last-1].rbottom = bottom_screen;
Crd[Crd.last-1].width = 125;
Crd[Crd.last-1].height = 125;
Crd[Crd.last-1].x = Crd[ATLAS_BOTTOM_PANE_SECTION_OBJECT_ANIM_COMBO_BOX_LABEL].x;
Crd[Crd.last-1].y = Crd[ATLAS_BOTTOM_PANE_SECTION_OBJECT_ANIM_COMBO_BOX_LABEL].y+Crd[ATLAS_BOTTOM_PANE_SECTION_OBJECT_ANIM_COMBO_BOX_LABEL].height;
// Animation Viewer label.
ATLAS_BOTTOM_PANE_SECTION_OBJECT_ANIM_VIEWER_LABEL = addArrayElement(Crd, Crd.last);
Crd[Crd.last-1].rleft = left_screen; Crd[Crd.last-1].rtop = bottom_screen;
Crd[Crd.last-1].rright = left_screen; Crd[Crd.last-1].rbottom = bottom_screen;
Crd[Crd.last-1].width = Crd[ATLAS_BOTTOM_PANE_SECTION_OBJECT_ANIM_VIEWER].width;
Crd[Crd.last-1].height = 15;
Crd[Crd.last-1].x = Crd[ATLAS_BOTTOM_PANE_SECTION_OBJECT_ANIM_VIEWER].x;
Crd[Crd.last-1].y = Crd[ATLAS_BOTTOM_PANE_SECTION_OBJECT_ANIM_VIEWER].y+Crd[ATLAS_BOTTOM_PANE_SECTION_OBJECT_ANIM_VIEWER].height;
}
// ====================================================================

View File

@ -1,614 +0,0 @@
function initAtlasSectionTerrainEditor()
{
// ============================================= TERRAIN EDITOR SECTION MENU ===============================================
// ============================================= TERRAIN EDITOR: EDIT ELEVATION ===============================================
ATLAS_LEFT_PANE_SECTION_TERRAIN_ELEVATION_BUTTON_SPAN = 10;
// Modify button.
ATLAS_LEFT_PANE_SECTION_TERRAIN_ELEVATION_MODIFY_BUTTON = addArrayElement(Crd, Crd.last);
Crd[Crd.last-1].rleft = left_screen; Crd[Crd.last-1].rtop = top_screen;
Crd[Crd.last-1].rright = left_screen; Crd[Crd.last-1].rbottom = top_screen;
Crd[Crd.last-1].width = 50;
Crd[Crd.last-1].height = 15;
Crd[Crd.last-1].x = Crd[ATLAS_LEFT_PANE_SECTION_HEADING_2].x+ATLAS_LEFT_PANE_SECTION.LMARGIN;
Crd[Crd.last-1].y = Crd[ATLAS_LEFT_PANE_SECTION_HEADING_2].y+Crd[ATLAS_LEFT_PANE_SECTION_HEADING_2].height+ATLAS_LEFT_PANE_SECTION.TMARGIN;
// Smooth button.
ATLAS_LEFT_PANE_SECTION_TERRAIN_ELEVATION_SMOOTH_BUTTON = addArrayElement(Crd, Crd.last);
Crd[Crd.last-1].rleft = left_screen; Crd[Crd.last-1].rtop = top_screen;
Crd[Crd.last-1].rright = left_screen; Crd[Crd.last-1].rbottom = top_screen;
Crd[Crd.last-1].width = Crd[ATLAS_LEFT_PANE_SECTION_TERRAIN_ELEVATION_MODIFY_BUTTON].width;
Crd[Crd.last-1].height = Crd[ATLAS_LEFT_PANE_SECTION_TERRAIN_ELEVATION_MODIFY_BUTTON].height;
Crd[Crd.last-1].x = Crd[ATLAS_LEFT_PANE_SECTION_TERRAIN_ELEVATION_MODIFY_BUTTON].x+Crd[ATLAS_LEFT_PANE_SECTION_TERRAIN_ELEVATION_MODIFY_BUTTON].width+ATLAS_LEFT_PANE_SECTION_TERRAIN_ELEVATION_BUTTON_SPAN;
Crd[Crd.last-1].y = Crd[ATLAS_LEFT_PANE_SECTION_TERRAIN_ELEVATION_MODIFY_BUTTON].y;
// Sample button.
ATLAS_LEFT_PANE_SECTION_TERRAIN_ELEVATION_SAMPLE_BUTTON = addArrayElement(Crd, Crd.last);
Crd[Crd.last-1].rleft = left_screen; Crd[Crd.last-1].rtop = top_screen;
Crd[Crd.last-1].rright = left_screen; Crd[Crd.last-1].rbottom = top_screen;
Crd[Crd.last-1].width = Crd[ATLAS_LEFT_PANE_SECTION_TERRAIN_ELEVATION_MODIFY_BUTTON].width;
Crd[Crd.last-1].height = Crd[ATLAS_LEFT_PANE_SECTION_TERRAIN_ELEVATION_MODIFY_BUTTON].height;
Crd[Crd.last-1].x = Crd[ATLAS_LEFT_PANE_SECTION_TERRAIN_ELEVATION_SMOOTH_BUTTON].x+Crd[ATLAS_LEFT_PANE_SECTION_TERRAIN_ELEVATION_SMOOTH_BUTTON].width+ATLAS_LEFT_PANE_SECTION_TERRAIN_ELEVATION_BUTTON_SPAN;
Crd[Crd.last-1].y = Crd[ATLAS_LEFT_PANE_SECTION_TERRAIN_ELEVATION_MODIFY_BUTTON].y;
// Intensity slider bar.
ATLAS_LEFT_PANE_SECTION_TERRAIN_ELEVATION_INTENSITY_SLIDER_BAR = addArrayElement(Crd, Crd.last);
Crd[Crd.last-1].rleft = left_screen; Crd[Crd.last-1].rtop = top_screen;
Crd[Crd.last-1].rright = left_screen; Crd[Crd.last-1].rbottom = top_screen;
Crd[Crd.last-1].width = 138;
Crd[Crd.last-1].height = Crd[ATLAS_LEFT_PANE_SECTION_TERRAIN_ELEVATION_SMOOTH_BUTTON].height;
Crd[Crd.last-1].x = Crd[ATLAS_LEFT_PANE_SECTION_TERRAIN_ELEVATION_SMOOTH_BUTTON].x;
Crd[Crd.last-1].y = Crd[ATLAS_LEFT_PANE_SECTION_TERRAIN_ELEVATION_SMOOTH_BUTTON].y+Crd[ATLAS_LEFT_PANE_SECTION_TERRAIN_ELEVATION_SMOOTH_BUTTON].height+ATLAS_LEFT_PANE_SECTION.TMARGIN;
// Intensity slider marker.
ATLAS_LEFT_PANE_SECTION_TERRAIN_ELEVATION_INTENSITY_SLIDER_MARKER = addArrayElement(Crd, Crd.last);
Crd[Crd.last-1].rleft = left_screen; Crd[Crd.last-1].rtop = top_screen;
Crd[Crd.last-1].rright = left_screen; Crd[Crd.last-1].rbottom = top_screen;
Crd[Crd.last-1].width = 8;
Crd[Crd.last-1].height = Crd[ATLAS_LEFT_PANE_SECTION_TERRAIN_ELEVATION_INTENSITY_SLIDER_BAR].height;
Crd[Crd.last-1].x = Crd[ATLAS_LEFT_PANE_SECTION_TERRAIN_ELEVATION_INTENSITY_SLIDER_BAR].x+40;
Crd[Crd.last-1].y = Crd[ATLAS_LEFT_PANE_SECTION_TERRAIN_ELEVATION_INTENSITY_SLIDER_BAR].y+(Crd[ATLAS_LEFT_PANE_SECTION_TERRAIN_ELEVATION_INTENSITY_SLIDER_BAR].height/3);
// Intensity label.
ATLAS_LEFT_PANE_SECTION_TERRAIN_ELEVATION_INTENSITY_LABEL = addArrayElement(Crd, Crd.last);
Crd[Crd.last-1].rleft = left_screen; Crd[Crd.last-1].rtop = top_screen;
Crd[Crd.last-1].rright = left_screen; Crd[Crd.last-1].rbottom = top_screen;
Crd[Crd.last-1].width = 50;
Crd[Crd.last-1].height = Crd[ATLAS_LEFT_PANE_SECTION_TERRAIN_ELEVATION_INTENSITY_SLIDER_BAR].height;
Crd[Crd.last-1].x = Crd[ATLAS_LEFT_PANE_SECTION_TERRAIN_ELEVATION_INTENSITY_SLIDER_BAR].x-Crd[ATLAS_LEFT_PANE_SECTION_TERRAIN_ELEVATION_INTENSITY_LABEL].width;
Crd[Crd.last-1].y = Crd[ATLAS_LEFT_PANE_SECTION_TERRAIN_ELEVATION_INTENSITY_SLIDER_BAR].y;
// Roughen button.
ATLAS_LEFT_PANE_SECTION_TERRAIN_ELEVATION_ROUGHEN_BUTTON = addArrayElement(Crd, Crd.last);
Crd[Crd.last-1].rleft = left_screen; Crd[Crd.last-1].rtop = top_screen;
Crd[Crd.last-1].rright = left_screen; Crd[Crd.last-1].rbottom = top_screen;
Crd[Crd.last-1].width = Crd[ATLAS_LEFT_PANE_SECTION_TERRAIN_ELEVATION_MODIFY_BUTTON].width;
Crd[Crd.last-1].height = Crd[ATLAS_LEFT_PANE_SECTION_TERRAIN_ELEVATION_MODIFY_BUTTON].height;
Crd[Crd.last-1].x = Crd[ATLAS_LEFT_PANE_SECTION_TERRAIN_ELEVATION_MODIFY_BUTTON].x;
Crd[Crd.last-1].y = Crd[ATLAS_LEFT_PANE_SECTION_TERRAIN_ELEVATION_INTENSITY_LABEL].y+Crd[ATLAS_LEFT_PANE_SECTION_TERRAIN_ELEVATION_MODIFY_BUTTON].height+ATLAS_LEFT_PANE_SECTION.TMARGIN;
// Roughen style combo box.
ATLAS_LEFT_PANE_SECTION_TERRAIN_ELEVATION_STYLE_COMBO_BOX = addArrayElement(Crd, Crd.last);
Crd[Crd.last-1].rleft = left_screen; Crd[Crd.last-1].rtop = top_screen;
Crd[Crd.last-1].rright = left_screen; Crd[Crd.last-1].rbottom = top_screen;
Crd[Crd.last-1].width = 75;
Crd[Crd.last-1].height = Crd[ATLAS_LEFT_PANE_SECTION_TERRAIN_ELEVATION_SAMPLE_BUTTON].height;
Crd[Crd.last-1].x = Crd[ATLAS_LEFT_PANE_SECTION_TERRAIN_ELEVATION_SAMPLE_BUTTON].x+Crd[ATLAS_LEFT_PANE_SECTION_TERRAIN_ELEVATION_SAMPLE_BUTTON].width-Crd[ATLAS_LEFT_PANE_SECTION_TERRAIN_ELEVATION_STYLE_COMBO_BOX].width;
Crd[Crd.last-1].y = Crd[ATLAS_LEFT_PANE_SECTION_TERRAIN_ELEVATION_ROUGHEN_BUTTON].y+4;
// Roughen style label.
ATLAS_LEFT_PANE_SECTION_TERRAIN_ELEVATION_STYLE_LABEL = addArrayElement(Crd, Crd.last);
Crd[Crd.last-1].rleft = left_screen; Crd[Crd.last-1].rtop = top_screen;
Crd[Crd.last-1].rright = left_screen; Crd[Crd.last-1].rbottom = top_screen;
Crd[Crd.last-1].width = 40;
Crd[Crd.last-1].height = Crd[ATLAS_LEFT_PANE_SECTION_TERRAIN_ELEVATION_ROUGHEN_BUTTON].height;
Crd[Crd.last-1].x = Crd[ATLAS_LEFT_PANE_SECTION_TERRAIN_ELEVATION_STYLE_COMBO_BOX].x-Crd[ATLAS_LEFT_PANE_SECTION_TERRAIN_ELEVATION_STYLE_LABEL].width;
Crd[Crd.last-1].y = Crd[ATLAS_LEFT_PANE_SECTION_TERRAIN_ELEVATION_ROUGHEN_BUTTON].y;
// Power input box.
ATLAS_LEFT_PANE_SECTION_TERRAIN_ELEVATION_POWER_INPUT_BOX = addArrayElement(Crd, Crd.last);
Crd[Crd.last-1].rleft = left_screen; Crd[Crd.last-1].rtop = top_screen;
Crd[Crd.last-1].rright = left_screen; Crd[Crd.last-1].rbottom = top_screen;
Crd[Crd.last-1].width = 40;
Crd[Crd.last-1].height = Crd[ATLAS_LEFT_PANE_SECTION_TERRAIN_ELEVATION_SAMPLE_BUTTON].height;
Crd[Crd.last-1].x = Crd[ATLAS_LEFT_PANE_SECTION_TERRAIN_ELEVATION_SAMPLE_BUTTON].x+Crd[ATLAS_LEFT_PANE_SECTION_TERRAIN_ELEVATION_SAMPLE_BUTTON].width-Crd[ATLAS_LEFT_PANE_SECTION_TERRAIN_ELEVATION_POWER_INPUT_BOX].width;
Crd[Crd.last-1].y = Crd[ATLAS_LEFT_PANE_SECTION_TERRAIN_ELEVATION_ROUGHEN_BUTTON].y+4+Crd[ATLAS_LEFT_PANE_SECTION_TERRAIN_ELEVATION_ROUGHEN_BUTTON].height+ATLAS_LEFT_PANE_SECTION.TMARGIN;
ATLAS_LEFT_PANE_SECTION_TERRAIN_ELEVATION_POWER_INPUT_BOX_UP = addArrayElement(Crd, Crd.last);
ATLAS_LEFT_PANE_SECTION_TERRAIN_ELEVATION_POWER_INPUT_BOX_DN = addArrayElement(Crd, Crd.last);
setCoordInputUpDown(Crd[Crd.last-2], Crd[Crd.last-1], ATLAS_LEFT_PANE_SECTION_TERRAIN_ELEVATION_POWER_INPUT_BOX,
left_screen, top_screen, left_screen, top_screen);
// Power label.
ATLAS_LEFT_PANE_SECTION_TERRAIN_ELEVATION_POWER_LABEL = addArrayElement(Crd, Crd.last);
Crd[Crd.last-1].rleft = left_screen; Crd[Crd.last-1].rtop = top_screen;
Crd[Crd.last-1].rright = left_screen; Crd[Crd.last-1].rbottom = top_screen;
Crd[Crd.last-1].width = 40;
Crd[Crd.last-1].height = Crd[ATLAS_LEFT_PANE_SECTION_TERRAIN_ELEVATION_ROUGHEN_BUTTON].height;
Crd[Crd.last-1].x = Crd[ATLAS_LEFT_PANE_SECTION_TERRAIN_ELEVATION_POWER_INPUT_BOX].x-Crd[ATLAS_LEFT_PANE_SECTION_TERRAIN_ELEVATION_POWER_LABEL].width;
Crd[Crd.last-1].y = Crd[ATLAS_LEFT_PANE_SECTION_TERRAIN_ELEVATION_POWER_INPUT_BOX].y;
// Scale label.
ATLAS_LEFT_PANE_SECTION_TERRAIN_ELEVATION_SCALE_LABEL = addArrayElement(Crd, Crd.last);
Crd[Crd.last-1].rleft = left_screen; Crd[Crd.last-1].rtop = top_screen;
Crd[Crd.last-1].rright = left_screen; Crd[Crd.last-1].rbottom = top_screen;
Crd[Crd.last-1].width = 40;
Crd[Crd.last-1].height = Crd[ATLAS_LEFT_PANE_SECTION_TERRAIN_ELEVATION_ROUGHEN_BUTTON].height;
Crd[Crd.last-1].x = Crd[ATLAS_LEFT_PANE_SECTION_TERRAIN_ELEVATION_ROUGHEN_BUTTON].x;
Crd[Crd.last-1].y = Crd[ATLAS_LEFT_PANE_SECTION_TERRAIN_ELEVATION_POWER_INPUT_BOX].y;
// Scale input box.
ATLAS_LEFT_PANE_SECTION_TERRAIN_ELEVATION_SCALE_INPUT_BOX = addArrayElement(Crd, Crd.last);
Crd[Crd.last-1].rleft = left_screen; Crd[Crd.last-1].rtop = top_screen;
Crd[Crd.last-1].rright = left_screen; Crd[Crd.last-1].rbottom = top_screen;
Crd[Crd.last-1].width = 40;
Crd[Crd.last-1].height = Crd[ATLAS_LEFT_PANE_SECTION_TERRAIN_ELEVATION_SAMPLE_BUTTON].height;
Crd[Crd.last-1].x = Crd[ATLAS_LEFT_PANE_SECTION_TERRAIN_ELEVATION_SCALE_LABEL].x+Crd[ATLAS_LEFT_PANE_SECTION_TERRAIN_ELEVATION_SCALE_LABEL].width;
Crd[Crd.last-1].y = Crd[ATLAS_LEFT_PANE_SECTION_TERRAIN_ELEVATION_POWER_INPUT_BOX].y;
ATLAS_LEFT_PANE_SECTION_TERRAIN_ELEVATION_SCALE_INPUT_BOX_UP = addArrayElement(Crd, Crd.last);
ATLAS_LEFT_PANE_SECTION_TERRAIN_ELEVATION_SCALE_INPUT_BOX_DN = addArrayElement(Crd, Crd.last);
setCoordInputUpDown(Crd[Crd.last-2], Crd[Crd.last-1], ATLAS_LEFT_PANE_SECTION_TERRAIN_ELEVATION_SCALE_INPUT_BOX,
left_screen, top_screen, left_screen, top_screen);
// Increment button.
ATLAS_LEFT_PANE_SECTION_TERRAIN_ELEVATION_INCREMENT_BUTTON = addArrayElement(Crd, Crd.last);
Crd[Crd.last-1].rleft = left_screen; Crd[Crd.last-1].rtop = top_screen;
Crd[Crd.last-1].rright = left_screen; Crd[Crd.last-1].rbottom = top_screen;
Crd[Crd.last-1].width = Crd[ATLAS_LEFT_PANE_SECTION_TERRAIN_ELEVATION_ROUGHEN_BUTTON].width;
Crd[Crd.last-1].height = Crd[ATLAS_LEFT_PANE_SECTION_TERRAIN_ELEVATION_ROUGHEN_BUTTON].height;
Crd[Crd.last-1].x = Crd[ATLAS_LEFT_PANE_SECTION_TERRAIN_ELEVATION_ROUGHEN_BUTTON].x;
Crd[Crd.last-1].y = Crd[ATLAS_LEFT_PANE_SECTION_TERRAIN_ELEVATION_SCALE_INPUT_BOX].y+Crd[ATLAS_LEFT_PANE_SECTION_TERRAIN_ELEVATION_SCALE_INPUT_BOX].height+ATLAS_LEFT_PANE_SECTION.TMARGIN;
// Amount input box.
ATLAS_LEFT_PANE_SECTION_TERRAIN_ELEVATION_AMOUNT_INPUT_BOX = addArrayElement(Crd, Crd.last);
Crd[Crd.last-1].rleft = left_screen; Crd[Crd.last-1].rtop = top_screen;
Crd[Crd.last-1].rright = left_screen; Crd[Crd.last-1].rbottom = top_screen;
Crd[Crd.last-1].width = 40;
Crd[Crd.last-1].height = Crd[ATLAS_LEFT_PANE_SECTION_TERRAIN_ELEVATION_SAMPLE_BUTTON].height;
Crd[Crd.last-1].x = Crd[ATLAS_LEFT_PANE_SECTION_TERRAIN_ELEVATION_SAMPLE_BUTTON].x+Crd[ATLAS_LEFT_PANE_SECTION_TERRAIN_ELEVATION_SAMPLE_BUTTON].width-Crd[ATLAS_LEFT_PANE_SECTION_TERRAIN_ELEVATION_POWER_INPUT_BOX].width;
Crd[Crd.last-1].y = Crd[ATLAS_LEFT_PANE_SECTION_TERRAIN_ELEVATION_INCREMENT_BUTTON].y;
ATLAS_LEFT_PANE_SECTION_TERRAIN_ELEVATION_AMOUNT_INPUT_BOX_UP = addArrayElement(Crd, Crd.last);
ATLAS_LEFT_PANE_SECTION_TERRAIN_ELEVATION_AMOUNT_INPUT_BOX_DN = addArrayElement(Crd, Crd.last);
setCoordInputUpDown(Crd[Crd.last-2], Crd[Crd.last-1], ATLAS_LEFT_PANE_SECTION_TERRAIN_ELEVATION_AMOUNT_INPUT_BOX,
left_screen, top_screen, left_screen, top_screen);
// Amount label.
ATLAS_LEFT_PANE_SECTION_TERRAIN_ELEVATION_AMOUNT_LABEL = addArrayElement(Crd, Crd.last);
Crd[Crd.last-1].rleft = left_screen; Crd[Crd.last-1].rtop = top_screen;
Crd[Crd.last-1].rright = left_screen; Crd[Crd.last-1].rbottom = top_screen;
Crd[Crd.last-1].width = 45;
Crd[Crd.last-1].height = Crd[ATLAS_LEFT_PANE_SECTION_TERRAIN_ELEVATION_ROUGHEN_BUTTON].height;
Crd[Crd.last-1].x = Crd[ATLAS_LEFT_PANE_SECTION_TERRAIN_ELEVATION_AMOUNT_INPUT_BOX].x-Crd[ATLAS_LEFT_PANE_SECTION_TERRAIN_ELEVATION_AMOUNT_LABEL].width;
Crd[Crd.last-1].y = Crd[ATLAS_LEFT_PANE_SECTION_TERRAIN_ELEVATION_AMOUNT_INPUT_BOX].y;
// Horizontal rule at end of Edit Elevation.
ATLAS_LEFT_PANE_SECTION_TERRAIN_ELEVATION_HR = addArrayElement(Crd, Crd.last);
Crd[Crd.last-1].rleft = left_screen; Crd[Crd.last-1].rtop = top_screen;
Crd[Crd.last-1].rright = left_screen; Crd[Crd.last-1].rbottom = top_screen;
Crd[Crd.last-1].width = Crd[ATLAS_LEFT_PANE_BKG].width-ATLAS_LEFT_PANE_SECTION.LMARGIN-ATLAS_LEFT_PANE_SECTION.RMARGIN;
Crd[Crd.last-1].height = 2;
Crd[Crd.last-1].x = Crd[ATLAS_LEFT_PANE_BKG].x+ATLAS_LEFT_PANE_SECTION.LMARGIN;
Crd[Crd.last-1].y = Crd[ATLAS_LEFT_PANE_SECTION_TERRAIN_ELEVATION_INCREMENT_BUTTON].y+Crd[ATLAS_LEFT_PANE_SECTION_TERRAIN_ELEVATION_INCREMENT_BUTTON].height+ATLAS_LEFT_PANE_SECTION.BMARGIN;
// ============================================= TERRAIN EDITOR: CLIFF ===============================================
// List of cliff portraits.
ATLAS_LEFT_PANE_SECTION_TERRAIN_CLIFF_LIST = addArrayElement(Crd, Crd.last);
Crd[Crd.last-1].rleft = left_screen; Crd[Crd.last-1].rtop = top_screen;
Crd[Crd.last-1].rright = left_screen; Crd[Crd.last-1].rbottom = top_screen;
Crd[Crd.last-1].width = 75;
Crd[Crd.last-1].height = 162;
Crd[Crd.last-1].x = Crd[ATLAS_LEFT_PANE_SECTION_TERRAIN_ELEVATION_HR].x+3;
Crd[Crd.last-1].y = Crd[ATLAS_LEFT_PANE_SECTION_TERRAIN_ELEVATION_HR].y+Crd[ATLAS_LEFT_PANE_SECTION_TERRAIN_ELEVATION_HR].x+3;
// "Cliff" heading.
ATLAS_LEFT_PANE_SECTION_TERRAIN_CLIFF_HEADING = addArrayElement(Crd, Crd.last);
Crd[Crd.last-1].rleft = left_screen; Crd[Crd.last-1].rtop = top_screen;
Crd[Crd.last-1].rright = left_screen; Crd[Crd.last-1].rbottom = top_screen;
Crd[Crd.last-1].width = Crd[ATLAS_LEFT_PANE_SECTION_HEADING_2].x+Crd[ATLAS_LEFT_PANE_SECTION_HEADING_2].width-Crd[ATLAS_LEFT_PANE_SECTION_TERRAIN_CLIFF_LIST].x-Crd[ATLAS_LEFT_PANE_SECTION_TERRAIN_CLIFF_LIST].width;
Crd[Crd.last-1].height = 22;
Crd[Crd.last-1].x = Crd[ATLAS_LEFT_PANE_SECTION_TERRAIN_CLIFF_LIST].x+Crd[ATLAS_LEFT_PANE_SECTION_TERRAIN_CLIFF_LIST].width;
Crd[Crd.last-1].y = Crd[ATLAS_LEFT_PANE_SECTION_TERRAIN_ELEVATION_HR].y+Crd[ATLAS_LEFT_PANE_SECTION_TERRAIN_ELEVATION_HR].height;
// Horizontal rule under heading.
ATLAS_LEFT_PANE_SECTION_TERRAIN_CLIFF_HEADING_HR = addArrayElement(Crd, Crd.last);
Crd[Crd.last-1].rleft = left_screen; Crd[Crd.last-1].rtop = top_screen;
Crd[Crd.last-1].rright = left_screen; Crd[Crd.last-1].rbottom = top_screen;
Crd[Crd.last-1].width = Crd[ATLAS_LEFT_PANE_SECTION_TERRAIN_CLIFF_HEADING].width-ATLAS_LEFT_PANE_SECTION.LMARGIN-ATLAS_LEFT_PANE_SECTION.RMARGIN;
Crd[Crd.last-1].height = Crd[ATLAS_LEFT_PANE_SECTION_TERRAIN_ELEVATION_HR].height;
Crd[Crd.last-1].x = Crd[ATLAS_LEFT_PANE_SECTION_TERRAIN_CLIFF_HEADING].x+ATLAS_LEFT_PANE_SECTION.LMARGIN;
Crd[Crd.last-1].y = Crd[ATLAS_LEFT_PANE_SECTION_TERRAIN_CLIFF_HEADING].y+Crd[ATLAS_LEFT_PANE_SECTION_TERRAIN_CLIFF_HEADING].height;
// Place button.
ATLAS_LEFT_PANE_SECTION_TERRAIN_CLIFF_BUTTON_PLACE = addArrayElement(Crd, Crd.last);
Crd[Crd.last-1].rleft = left_screen; Crd[Crd.last-1].rtop = top_screen;
Crd[Crd.last-1].rright = left_screen; Crd[Crd.last-1].rbottom = top_screen;
Crd[Crd.last-1].width = 84;
Crd[Crd.last-1].height = 15;
Crd[Crd.last-1].x = Crd[ATLAS_LEFT_PANE_SECTION_TERRAIN_CLIFF_HEADING_HR].x;
Crd[Crd.last-1].y = Crd[ATLAS_LEFT_PANE_SECTION_TERRAIN_CLIFF_HEADING_HR].y+Crd[ATLAS_LEFT_PANE_SECTION_TERRAIN_CLIFF_HEADING_HR].height+(ATLAS_LEFT_PANE_SECTION.TMARGIN/2);
// Height label.
ATLAS_LEFT_PANE_SECTION_TERRAIN_CLIFF_HEIGHT_LABEL = addArrayElement(Crd, Crd.last);
Crd[Crd.last-1].rleft = left_screen; Crd[Crd.last-1].rtop = top_screen;
Crd[Crd.last-1].rright = left_screen; Crd[Crd.last-1].rbottom = top_screen;
Crd[Crd.last-1].width = 48;
Crd[Crd.last-1].height = Crd[ATLAS_LEFT_PANE_SECTION_TERRAIN_CLIFF_BUTTON_PLACE].height;
Crd[Crd.last-1].x = Crd[ATLAS_LEFT_PANE_SECTION_TERRAIN_CLIFF_HEADING].x+2;
Crd[Crd.last-1].y = Crd[ATLAS_LEFT_PANE_SECTION_TERRAIN_CLIFF_BUTTON_PLACE].y+Crd[ATLAS_LEFT_PANE_SECTION_TERRAIN_CLIFF_BUTTON_PLACE].height+ATLAS_LEFT_PANE_SECTION.TMARGIN*1.5;
// Height input box.
ATLAS_LEFT_PANE_SECTION_TERRAIN_CLIFF_HEIGHT_INPUT_BOX = addArrayElement(Crd, Crd.last);
Crd[Crd.last-1].rleft = left_screen; Crd[Crd.last-1].rtop = top_screen;
Crd[Crd.last-1].rright = left_screen; Crd[Crd.last-1].rbottom = top_screen;
Crd[Crd.last-1].width = 40;
Crd[Crd.last-1].height = Crd[ATLAS_LEFT_PANE_SECTION_TERRAIN_CLIFF_HEIGHT_LABEL].height;
Crd[Crd.last-1].x = Crd[ATLAS_LEFT_PANE_SECTION_TERRAIN_CLIFF_HEIGHT_LABEL].x+Crd[ATLAS_LEFT_PANE_SECTION_TERRAIN_CLIFF_HEIGHT_LABEL].width;
Crd[Crd.last-1].y = Crd[ATLAS_LEFT_PANE_SECTION_TERRAIN_CLIFF_HEIGHT_LABEL].y;
ATLAS_LEFT_PANE_SECTION_TERRAIN_CLIFF_HEIGHT_INPUT_BOX_UP = addArrayElement(Crd, Crd.last);
ATLAS_LEFT_PANE_SECTION_TERRAIN_CLIFF_HEIGHT_INPUT_BOX_DN = addArrayElement(Crd, Crd.last);
setCoordInputUpDown(Crd[Crd.last-2], Crd[Crd.last-1], ATLAS_LEFT_PANE_SECTION_TERRAIN_CLIFF_HEIGHT_INPUT_BOX,
left_screen, top_screen, left_screen, top_screen);
// Angle label.
ATLAS_LEFT_PANE_SECTION_TERRAIN_CLIFF_ANGLE_LABEL = addArrayElement(Crd, Crd.last);
Crd[Crd.last-1].rleft = left_screen; Crd[Crd.last-1].rtop = top_screen;
Crd[Crd.last-1].rright = left_screen; Crd[Crd.last-1].rbottom = top_screen;
Crd[Crd.last-1].width = Crd[ATLAS_LEFT_PANE_SECTION_TERRAIN_CLIFF_HEIGHT_LABEL].width;
Crd[Crd.last-1].height = Crd[ATLAS_LEFT_PANE_SECTION_TERRAIN_CLIFF_HEIGHT_LABEL].height;
Crd[Crd.last-1].x = Crd[ATLAS_LEFT_PANE_SECTION_TERRAIN_CLIFF_HEIGHT_LABEL].x;
Crd[Crd.last-1].y = Crd[ATLAS_LEFT_PANE_SECTION_TERRAIN_CLIFF_HEIGHT_LABEL].y+Crd[ATLAS_LEFT_PANE_SECTION_TERRAIN_CLIFF_HEIGHT_LABEL].height+ATLAS_LEFT_PANE_SECTION.TMARGIN*1.5;
// Angle input box.
ATLAS_LEFT_PANE_SECTION_TERRAIN_CLIFF_ANGLE_INPUT_BOX = addArrayElement(Crd, Crd.last);
Crd[Crd.last-1].rleft = left_screen; Crd[Crd.last-1].rtop = top_screen;
Crd[Crd.last-1].rright = left_screen; Crd[Crd.last-1].rbottom = top_screen;
Crd[Crd.last-1].width = Crd[ATLAS_LEFT_PANE_SECTION_TERRAIN_CLIFF_HEIGHT_INPUT_BOX].width;
Crd[Crd.last-1].height = Crd[ATLAS_LEFT_PANE_SECTION_TERRAIN_CLIFF_HEIGHT_INPUT_BOX].height;
Crd[Crd.last-1].x = Crd[ATLAS_LEFT_PANE_SECTION_TERRAIN_CLIFF_HEIGHT_INPUT_BOX].x;
Crd[Crd.last-1].y = Crd[ATLAS_LEFT_PANE_SECTION_TERRAIN_CLIFF_HEIGHT_INPUT_BOX].y+Crd[ATLAS_LEFT_PANE_SECTION_TERRAIN_CLIFF_HEIGHT_INPUT_BOX].height+ATLAS_LEFT_PANE_SECTION.TMARGIN*1.5;
ATLAS_LEFT_PANE_SECTION_TERRAIN_CLIFF_ANGLE_INPUT_BOX_UP = addArrayElement(Crd, Crd.last);
ATLAS_LEFT_PANE_SECTION_TERRAIN_CLIFF_ANGLE_INPUT_BOX_DN = addArrayElement(Crd, Crd.last);
setCoordInputUpDown(Crd[Crd.last-2], Crd[Crd.last-1], ATLAS_LEFT_PANE_SECTION_TERRAIN_CLIFF_ANGLE_INPUT_BOX,
left_screen, top_screen, left_screen, top_screen);
// Smooth label.
ATLAS_LEFT_PANE_SECTION_TERRAIN_CLIFF_SMOOTH_LABEL = addArrayElement(Crd, Crd.last);
Crd[Crd.last-1].rleft = left_screen; Crd[Crd.last-1].rtop = top_screen;
Crd[Crd.last-1].rright = left_screen; Crd[Crd.last-1].rbottom = top_screen;
Crd[Crd.last-1].width = Crd[ATLAS_LEFT_PANE_SECTION_TERRAIN_CLIFF_HEIGHT_LABEL].width;
Crd[Crd.last-1].height = Crd[ATLAS_LEFT_PANE_SECTION_TERRAIN_CLIFF_HEIGHT_LABEL].height;
Crd[Crd.last-1].x = Crd[ATLAS_LEFT_PANE_SECTION_TERRAIN_CLIFF_HEIGHT_LABEL].x;
Crd[Crd.last-1].y = Crd[ATLAS_LEFT_PANE_SECTION_TERRAIN_CLIFF_ANGLE_LABEL].y+Crd[ATLAS_LEFT_PANE_SECTION_TERRAIN_CLIFF_ANGLE_LABEL].height+ATLAS_LEFT_PANE_SECTION.TMARGIN*1.5;
// Smooth input box.
ATLAS_LEFT_PANE_SECTION_TERRAIN_CLIFF_SMOOTH_INPUT_BOX = addArrayElement(Crd, Crd.last);
Crd[Crd.last-1].rleft = left_screen; Crd[Crd.last-1].rtop = top_screen;
Crd[Crd.last-1].rright = left_screen; Crd[Crd.last-1].rbottom = top_screen;
Crd[Crd.last-1].width = Crd[ATLAS_LEFT_PANE_SECTION_TERRAIN_CLIFF_HEIGHT_INPUT_BOX].width;
Crd[Crd.last-1].height = Crd[ATLAS_LEFT_PANE_SECTION_TERRAIN_CLIFF_HEIGHT_INPUT_BOX].height;
Crd[Crd.last-1].x = Crd[ATLAS_LEFT_PANE_SECTION_TERRAIN_CLIFF_HEIGHT_INPUT_BOX].x;
Crd[Crd.last-1].y = Crd[ATLAS_LEFT_PANE_SECTION_TERRAIN_CLIFF_ANGLE_INPUT_BOX].y+Crd[ATLAS_LEFT_PANE_SECTION_TERRAIN_CLIFF_ANGLE_INPUT_BOX].height+ATLAS_LEFT_PANE_SECTION.TMARGIN*1.5;
ATLAS_LEFT_PANE_SECTION_TERRAIN_CLIFF_SMOOTH_INPUT_BOX_UP = addArrayElement(Crd, Crd.last);
ATLAS_LEFT_PANE_SECTION_TERRAIN_CLIFF_SMOOTH_INPUT_BOX_DN = addArrayElement(Crd, Crd.last);
setCoordInputUpDown(Crd[Crd.last-2], Crd[Crd.last-1], ATLAS_LEFT_PANE_SECTION_TERRAIN_CLIFF_SMOOTH_INPUT_BOX,
left_screen, top_screen, left_screen, top_screen);
// Custom button.
ATLAS_LEFT_PANE_SECTION_TERRAIN_CLIFF_BUTTON_CUSTOM = addArrayElement(Crd, Crd.last);
Crd[Crd.last-1].rleft = left_screen; Crd[Crd.last-1].rtop = top_screen;
Crd[Crd.last-1].rright = left_screen; Crd[Crd.last-1].rbottom = top_screen;
Crd[Crd.last-1].width = Crd[ATLAS_LEFT_PANE_SECTION_TERRAIN_CLIFF_BUTTON_PLACE].width;
Crd[Crd.last-1].height = Crd[ATLAS_LEFT_PANE_SECTION_TERRAIN_CLIFF_BUTTON_PLACE].height;
Crd[Crd.last-1].x = Crd[ATLAS_LEFT_PANE_SECTION_TERRAIN_CLIFF_BUTTON_PLACE].x;
Crd[Crd.last-1].y = Crd[ATLAS_LEFT_PANE_SECTION_TERRAIN_CLIFF_LIST].y+Crd[ATLAS_LEFT_PANE_SECTION_TERRAIN_CLIFF_LIST].height-Crd[ATLAS_LEFT_PANE_SECTION_TERRAIN_CLIFF_BUTTON_CUSTOM].height;
// Horizontal rule at end of Paint Cliff.
ATLAS_LEFT_PANE_SECTION_TERRAIN_CLIFF_HR = addArrayElement(Crd, Crd.last);
Crd[Crd.last-1].rleft = left_screen; Crd[Crd.last-1].rtop = top_screen;
Crd[Crd.last-1].rright = left_screen; Crd[Crd.last-1].rbottom = top_screen;
Crd[Crd.last-1].width = Crd[ATLAS_LEFT_PANE_SECTION_TERRAIN_ELEVATION_HR].width;
Crd[Crd.last-1].height = Crd[ATLAS_LEFT_PANE_SECTION_TERRAIN_ELEVATION_HR].height;
Crd[Crd.last-1].x = Crd[ATLAS_LEFT_PANE_SECTION_TERRAIN_ELEVATION_HR].x;
Crd[Crd.last-1].y = Crd[ATLAS_LEFT_PANE_SECTION_TERRAIN_CLIFF_LIST].y+Crd[ATLAS_LEFT_PANE_SECTION_TERRAIN_CLIFF_LIST].height+ATLAS_LEFT_PANE_SECTION.BMARGIN;
// ============================================= TERRAIN EDITOR: WATER ===============================================
// List of water portraits.
ATLAS_LEFT_PANE_SECTION_TERRAIN_WATER_LIST = addArrayElement(Crd, Crd.last);
Crd[Crd.last-1].rleft = left_screen; Crd[Crd.last-1].rtop = top_screen;
Crd[Crd.last-1].rright = left_screen; Crd[Crd.last-1].rbottom = top_screen;
Crd[Crd.last-1].width = Crd[ATLAS_LEFT_PANE_SECTION_TERRAIN_CLIFF_LIST].width;
Crd[Crd.last-1].height = Crd[ATLAS_LEFT_PANE_SECTION_TERRAIN_CLIFF_LIST].height;
Crd[Crd.last-1].x = Crd[ATLAS_LEFT_PANE_SECTION_TERRAIN_CLIFF_LIST].x;
Crd[Crd.last-1].y = Crd[ATLAS_LEFT_PANE_SECTION_TERRAIN_CLIFF_HR].y+Crd[ATLAS_LEFT_PANE_SECTION_TERRAIN_CLIFF_HR].x+3;
// "Water" heading.
ATLAS_LEFT_PANE_SECTION_TERRAIN_WATER_HEADING = addArrayElement(Crd, Crd.last);
Crd[Crd.last-1].rleft = left_screen; Crd[Crd.last-1].rtop = top_screen;
Crd[Crd.last-1].rright = left_screen; Crd[Crd.last-1].rbottom = top_screen;
Crd[Crd.last-1].width = Crd[ATLAS_LEFT_PANE_SECTION_TERRAIN_CLIFF_HEADING].width;
Crd[Crd.last-1].height = Crd[ATLAS_LEFT_PANE_SECTION_TERRAIN_CLIFF_HEADING].height;
Crd[Crd.last-1].x = Crd[ATLAS_LEFT_PANE_SECTION_TERRAIN_CLIFF_HEADING].x;
Crd[Crd.last-1].y = Crd[ATLAS_LEFT_PANE_SECTION_TERRAIN_CLIFF_HR].y;
// Horizontal rule under heading.
ATLAS_LEFT_PANE_SECTION_TERRAIN_WATER_HEADING_HR = addArrayElement(Crd, Crd.last);
Crd[Crd.last-1].rleft = left_screen; Crd[Crd.last-1].rtop = top_screen;
Crd[Crd.last-1].rright = left_screen; Crd[Crd.last-1].rbottom = top_screen;
Crd[Crd.last-1].width = Crd[ATLAS_LEFT_PANE_SECTION_TERRAIN_CLIFF_HEADING_HR].width;
Crd[Crd.last-1].height = Crd[ATLAS_LEFT_PANE_SECTION_TERRAIN_CLIFF_HEADING_HR].height;
Crd[Crd.last-1].x = Crd[ATLAS_LEFT_PANE_SECTION_TERRAIN_CLIFF_HEADING_HR].x;
Crd[Crd.last-1].y = Crd[ATLAS_LEFT_PANE_SECTION_TERRAIN_WATER_HEADING].y+Crd[ATLAS_LEFT_PANE_SECTION_TERRAIN_WATER_HEADING].height;
// Place button.
ATLAS_LEFT_PANE_SECTION_TERRAIN_WATER_BUTTON_PLACE = addArrayElement(Crd, Crd.last);
Crd[Crd.last-1].rleft = left_screen; Crd[Crd.last-1].rtop = top_screen;
Crd[Crd.last-1].rright = left_screen; Crd[Crd.last-1].rbottom = top_screen;
Crd[Crd.last-1].width = Crd[ATLAS_LEFT_PANE_SECTION_TERRAIN_CLIFF_BUTTON_PLACE].width-15;
Crd[Crd.last-1].height = Crd[ATLAS_LEFT_PANE_SECTION_TERRAIN_CLIFF_BUTTON_PLACE].height;
Crd[Crd.last-1].x = Crd[ATLAS_LEFT_PANE_SECTION_TERRAIN_CLIFF_BUTTON_PLACE].x;
Crd[Crd.last-1].y = Crd[ATLAS_LEFT_PANE_SECTION_TERRAIN_WATER_HEADING_HR].y+Crd[ATLAS_LEFT_PANE_SECTION_TERRAIN_WATER_HEADING_HR].height+(ATLAS_LEFT_PANE_SECTION.TMARGIN/2);
// Beautify Water button.
ATLAS_LEFT_PANE_SECTION_TERRAIN_WATER_BUTTON_BEAUTIFY = addArrayElement(Crd, Crd.last);
Crd[Crd.last-1].rleft = left_screen; Crd[Crd.last-1].rtop = top_screen;
Crd[Crd.last-1].rright = left_screen; Crd[Crd.last-1].rbottom = top_screen;
Crd[Crd.last-1].width = 15;
Crd[Crd.last-1].height = 15;
Crd[Crd.last-1].x = Crd[ATLAS_LEFT_PANE_SECTION_TERRAIN_WATER_BUTTON_PLACE].x+Crd[ATLAS_LEFT_PANE_SECTION_TERRAIN_WATER_BUTTON_PLACE].width+1;
Crd[Crd.last-1].y = Crd[ATLAS_LEFT_PANE_SECTION_TERRAIN_WATER_BUTTON_PLACE].y;
// Depth label.
ATLAS_LEFT_PANE_SECTION_TERRAIN_WATER_DEPTH_LABEL = addArrayElement(Crd, Crd.last);
Crd[Crd.last-1].rleft = left_screen; Crd[Crd.last-1].rtop = top_screen;
Crd[Crd.last-1].rright = left_screen; Crd[Crd.last-1].rbottom = top_screen;
Crd[Crd.last-1].width = Crd[ATLAS_LEFT_PANE_SECTION_TERRAIN_CLIFF_HEIGHT_LABEL].width;
Crd[Crd.last-1].height = Crd[ATLAS_LEFT_PANE_SECTION_TERRAIN_CLIFF_HEIGHT_LABEL].height;
Crd[Crd.last-1].x = Crd[ATLAS_LEFT_PANE_SECTION_TERRAIN_CLIFF_HEIGHT_LABEL].x;
Crd[Crd.last-1].y = Crd[ATLAS_LEFT_PANE_SECTION_TERRAIN_WATER_BUTTON_PLACE].y+Crd[ATLAS_LEFT_PANE_SECTION_TERRAIN_WATER_BUTTON_PLACE].height+ATLAS_LEFT_PANE_SECTION.TMARGIN;
// Depth input box.
ATLAS_LEFT_PANE_SECTION_TERRAIN_WATER_DEPTH_INPUT_BOX = addArrayElement(Crd, Crd.last);
Crd[Crd.last-1].rleft = left_screen; Crd[Crd.last-1].rtop = top_screen;
Crd[Crd.last-1].rright = left_screen; Crd[Crd.last-1].rbottom = top_screen;
Crd[Crd.last-1].width = Crd[ATLAS_LEFT_PANE_SECTION_TERRAIN_CLIFF_HEIGHT_INPUT_BOX].width;
Crd[Crd.last-1].height = Crd[ATLAS_LEFT_PANE_SECTION_TERRAIN_CLIFF_HEIGHT_INPUT_BOX].height;
Crd[Crd.last-1].x = Crd[ATLAS_LEFT_PANE_SECTION_TERRAIN_CLIFF_HEIGHT_INPUT_BOX].x;
Crd[Crd.last-1].y = Crd[ATLAS_LEFT_PANE_SECTION_TERRAIN_WATER_DEPTH_LABEL].y;
ATLAS_LEFT_PANE_SECTION_TERRAIN_WATER_DEPTH_INPUT_BOX_UP = addArrayElement(Crd, Crd.last);
ATLAS_LEFT_PANE_SECTION_TERRAIN_WATER_DEPTH_INPUT_BOX_DN = addArrayElement(Crd, Crd.last);
setCoordInputUpDown(Crd[Crd.last-2], Crd[Crd.last-1], ATLAS_LEFT_PANE_SECTION_TERRAIN_WATER_DEPTH_INPUT_BOX,
left_screen, top_screen, left_screen, top_screen);
// Colour label.
ATLAS_LEFT_PANE_SECTION_TERRAIN_WATER_COLOUR_LABEL = addArrayElement(Crd, Crd.last);
Crd[Crd.last-1].rleft = left_screen; Crd[Crd.last-1].rtop = top_screen;
Crd[Crd.last-1].rright = left_screen; Crd[Crd.last-1].rbottom = top_screen;
Crd[Crd.last-1].width = Crd[ATLAS_LEFT_PANE_SECTION_TERRAIN_WATER_DEPTH_LABEL].width;
Crd[Crd.last-1].height = Crd[ATLAS_LEFT_PANE_SECTION_TERRAIN_WATER_DEPTH_LABEL].height;
Crd[Crd.last-1].x = Crd[ATLAS_LEFT_PANE_SECTION_TERRAIN_WATER_DEPTH_LABEL].x;
Crd[Crd.last-1].y = Crd[ATLAS_LEFT_PANE_SECTION_TERRAIN_WATER_DEPTH_LABEL].y+Crd[ATLAS_LEFT_PANE_SECTION_TERRAIN_WATER_DEPTH_LABEL].height+ATLAS_LEFT_PANE_SECTION.TMARGIN*1.5;
// Colour input box.
ATLAS_LEFT_PANE_SECTION_TERRAIN_WATER_COLOUR_R_INPUT_BOX = addArrayElement(Crd, Crd.last);
Crd[Crd.last-1].rleft = left_screen; Crd[Crd.last-1].rtop = top_screen;
Crd[Crd.last-1].rright = left_screen; Crd[Crd.last-1].rbottom = top_screen;
Crd[Crd.last-1].width = Crd[ATLAS_LEFT_PANE_SECTION_TERRAIN_WATER_DEPTH_INPUT_BOX].width;
Crd[Crd.last-1].height = Crd[ATLAS_LEFT_PANE_SECTION_TERRAIN_WATER_DEPTH_INPUT_BOX].height/1.5;
Crd[Crd.last-1].x = Crd[ATLAS_LEFT_PANE_SECTION_TERRAIN_WATER_DEPTH_INPUT_BOX].x;
Crd[Crd.last-1].y = Crd[ATLAS_LEFT_PANE_SECTION_TERRAIN_WATER_DEPTH_INPUT_BOX].y+Crd[ATLAS_LEFT_PANE_SECTION_TERRAIN_WATER_DEPTH_INPUT_BOX].height+ATLAS_LEFT_PANE_SECTION.TMARGIN/1.2;
// Colour input box.
ATLAS_LEFT_PANE_SECTION_TERRAIN_WATER_COLOUR_G_INPUT_BOX = addArrayElement(Crd, Crd.last);
Crd[Crd.last-1].rleft = left_screen; Crd[Crd.last-1].rtop = top_screen;
Crd[Crd.last-1].rright = left_screen; Crd[Crd.last-1].rbottom = top_screen;
Crd[Crd.last-1].width = Crd[ATLAS_LEFT_PANE_SECTION_TERRAIN_WATER_DEPTH_INPUT_BOX].width;
Crd[Crd.last-1].height = Crd[ATLAS_LEFT_PANE_SECTION_TERRAIN_WATER_DEPTH_INPUT_BOX].height/1.5;
Crd[Crd.last-1].x = Crd[ATLAS_LEFT_PANE_SECTION_TERRAIN_WATER_DEPTH_INPUT_BOX].x;
Crd[Crd.last-1].y = Crd[ATLAS_LEFT_PANE_SECTION_TERRAIN_WATER_COLOUR_R_INPUT_BOX].y+Crd[ATLAS_LEFT_PANE_SECTION_TERRAIN_WATER_COLOUR_R_INPUT_BOX].height+ATLAS_LEFT_PANE_SECTION.TMARGIN/1.2;
// Colour input box.
ATLAS_LEFT_PANE_SECTION_TERRAIN_WATER_COLOUR_B_INPUT_BOX = addArrayElement(Crd, Crd.last);
Crd[Crd.last-1].rleft = left_screen; Crd[Crd.last-1].rtop = top_screen;
Crd[Crd.last-1].rright = left_screen; Crd[Crd.last-1].rbottom = top_screen;
Crd[Crd.last-1].width = Crd[ATLAS_LEFT_PANE_SECTION_TERRAIN_WATER_DEPTH_INPUT_BOX].width;
Crd[Crd.last-1].height = Crd[ATLAS_LEFT_PANE_SECTION_TERRAIN_WATER_DEPTH_INPUT_BOX].height/1.5;
Crd[Crd.last-1].x = Crd[ATLAS_LEFT_PANE_SECTION_TERRAIN_WATER_DEPTH_INPUT_BOX].x;
Crd[Crd.last-1].y = Crd[ATLAS_LEFT_PANE_SECTION_TERRAIN_WATER_COLOUR_G_INPUT_BOX].y+Crd[ATLAS_LEFT_PANE_SECTION_TERRAIN_WATER_COLOUR_G_INPUT_BOX].height+ATLAS_LEFT_PANE_SECTION.TMARGIN/1.2;
// Colour tint box.
ATLAS_LEFT_PANE_SECTION_TERRAIN_WATER_COLOUR_TINT_BOX = addArrayElement(Crd, Crd.last);
Crd[Crd.last-1].rleft = left_screen; Crd[Crd.last-1].rtop = top_screen;
Crd[Crd.last-1].rright = left_screen; Crd[Crd.last-1].rbottom = top_screen;
Crd[Crd.last-1].width = Crd[ATLAS_LEFT_PANE_SECTION_TERRAIN_WATER_COLOUR_LABEL].width/3;
Crd[Crd.last-1].height = Crd[ATLAS_LEFT_PANE_SECTION_TERRAIN_WATER_COLOUR_TINT_BOX].width;
Crd[Crd.last-1].x = Crd[ATLAS_LEFT_PANE_SECTION_TERRAIN_WATER_COLOUR_LABEL].x+Crd[ATLAS_LEFT_PANE_SECTION_TERRAIN_WATER_COLOUR_LABEL].width/5;
Crd[Crd.last-1].y = Crd[ATLAS_LEFT_PANE_SECTION_TERRAIN_WATER_COLOUR_LABEL].y+Crd[ATLAS_LEFT_PANE_SECTION_TERRAIN_WATER_COLOUR_LABEL].height+Crd[ATLAS_LEFT_PANE_SECTION_TERRAIN_WATER_COLOUR_LABEL].height/3;
// Smooth input box.
ATLAS_LEFT_PANE_SECTION_TERRAIN_WATER_SMOOTH_INPUT_BOX = addArrayElement(Crd, Crd.last);
Crd[Crd.last-1].rleft = left_screen; Crd[Crd.last-1].rtop = top_screen;
Crd[Crd.last-1].rright = left_screen; Crd[Crd.last-1].rbottom = top_screen;
Crd[Crd.last-1].width = Crd[ATLAS_LEFT_PANE_SECTION_TERRAIN_WATER_DEPTH_INPUT_BOX].width;
Crd[Crd.last-1].height = Crd[ATLAS_LEFT_PANE_SECTION_TERRAIN_WATER_DEPTH_INPUT_BOX].height;
Crd[Crd.last-1].x = Crd[ATLAS_LEFT_PANE_SECTION_TERRAIN_WATER_DEPTH_INPUT_BOX].x;
Crd[Crd.last-1].y = Crd[ATLAS_LEFT_PANE_SECTION_TERRAIN_WATER_COLOUR_B_INPUT_BOX].y+Crd[ATLAS_LEFT_PANE_SECTION_TERRAIN_WATER_COLOUR_B_INPUT_BOX].height+ATLAS_LEFT_PANE_SECTION.TMARGIN;
ATLAS_LEFT_PANE_SECTION_TERRAIN_WATER_SMOOTH_INPUT_BOX_UP = addArrayElement(Crd, Crd.last);
ATLAS_LEFT_PANE_SECTION_TERRAIN_WATER_SMOOTH_INPUT_BOX_DN = addArrayElement(Crd, Crd.last);
setCoordInputUpDown(Crd[Crd.last-2], Crd[Crd.last-1], ATLAS_LEFT_PANE_SECTION_TERRAIN_WATER_SMOOTH_INPUT_BOX,
left_screen, top_screen, left_screen, top_screen);
// Smooth label.
ATLAS_LEFT_PANE_SECTION_TERRAIN_WATER_SMOOTH_LABEL = addArrayElement(Crd, Crd.last);
Crd[Crd.last-1].rleft = left_screen; Crd[Crd.last-1].rtop = top_screen;
Crd[Crd.last-1].rright = left_screen; Crd[Crd.last-1].rbottom = top_screen;
Crd[Crd.last-1].width = Crd[ATLAS_LEFT_PANE_SECTION_TERRAIN_WATER_DEPTH_LABEL].width;
Crd[Crd.last-1].height = Crd[ATLAS_LEFT_PANE_SECTION_TERRAIN_WATER_DEPTH_LABEL].height;
Crd[Crd.last-1].x = Crd[ATLAS_LEFT_PANE_SECTION_TERRAIN_WATER_DEPTH_LABEL].x;
Crd[Crd.last-1].y = Crd[ATLAS_LEFT_PANE_SECTION_TERRAIN_WATER_SMOOTH_INPUT_BOX].y-2;
// Custom button.
ATLAS_LEFT_PANE_SECTION_TERRAIN_WATER_BUTTON_CUSTOM = addArrayElement(Crd, Crd.last);
Crd[Crd.last-1].rleft = left_screen; Crd[Crd.last-1].rtop = top_screen;
Crd[Crd.last-1].rright = left_screen; Crd[Crd.last-1].rbottom = top_screen;
Crd[Crd.last-1].width = Crd[ATLAS_LEFT_PANE_SECTION_TERRAIN_CLIFF_BUTTON_CUSTOM].width;
Crd[Crd.last-1].height = Crd[ATLAS_LEFT_PANE_SECTION_TERRAIN_CLIFF_BUTTON_CUSTOM].height;
Crd[Crd.last-1].x = Crd[ATLAS_LEFT_PANE_SECTION_TERRAIN_CLIFF_BUTTON_CUSTOM].x;
Crd[Crd.last-1].y = Crd[ATLAS_LEFT_PANE_SECTION_TERRAIN_WATER_LIST].y+Crd[ATLAS_LEFT_PANE_SECTION_TERRAIN_WATER_LIST].height-Crd[ATLAS_LEFT_PANE_SECTION_TERRAIN_WATER_BUTTON_CUSTOM].height;
// Horizontal rule at end of Paint Water.
ATLAS_LEFT_PANE_SECTION_TERRAIN_WATER_HR = addArrayElement(Crd, Crd.last);
Crd[Crd.last-1].rleft = left_screen; Crd[Crd.last-1].rtop = top_screen;
Crd[Crd.last-1].rright = left_screen; Crd[Crd.last-1].rbottom = top_screen;
Crd[Crd.last-1].width = Crd[ATLAS_LEFT_PANE_SECTION_TERRAIN_CLIFF_HR].width;
Crd[Crd.last-1].height = Crd[ATLAS_LEFT_PANE_SECTION_TERRAIN_CLIFF_HR].height;
Crd[Crd.last-1].x = Crd[ATLAS_LEFT_PANE_SECTION_TERRAIN_CLIFF_HR].x;
Crd[Crd.last-1].y = Crd[ATLAS_LEFT_PANE_SECTION_TERRAIN_WATER_LIST].y+Crd[ATLAS_LEFT_PANE_SECTION_TERRAIN_WATER_LIST].height+ATLAS_LEFT_PANE_SECTION.BMARGIN;
// ============================================= TERRAIN EDITOR: BRUSH SETTINGS ==============================================
// Terrain Preview.
ATLAS_BOTTOM_PANE_SECTION_TERRAIN_PREVIEW = addArrayElement(Crd, Crd.last);
Crd[Crd.last-1].rleft = left_screen; Crd[Crd.last-1].rtop = bottom_screen;
Crd[Crd.last-1].rright = left_screen; Crd[Crd.last-1].rbottom = bottom_screen;
Crd[Crd.last-1].width = 125;
Crd[Crd.last-1].height = 125;
Crd[Crd.last-1].x = ATLAS_LEFT_PANE_SECTION.LMARGIN;
Crd[Crd.last-1].y = ATLAS_LEFT_PANE_SECTION.LMARGIN;
// Terrain Preview label.
ATLAS_BOTTOM_PANE_SECTION_TERRAIN_PREVIEW_LABEL = addArrayElement(Crd, Crd.last);
Crd[Crd.last-1].rleft = left_screen; Crd[Crd.last-1].rtop = bottom_screen;
Crd[Crd.last-1].rright = left_screen; Crd[Crd.last-1].rbottom = bottom_screen;
Crd[Crd.last-1].width = Crd[ATLAS_BOTTOM_PANE_SECTION_TERRAIN_PREVIEW].width;
Crd[Crd.last-1].height = 15;
Crd[Crd.last-1].x = Crd[ATLAS_BOTTOM_PANE_SECTION_TERRAIN_PREVIEW].x;
Crd[Crd.last-1].y = Crd[ATLAS_BOTTOM_PANE_SECTION_TERRAIN_PREVIEW].y+Crd[ATLAS_BOTTOM_PANE_SECTION_TERRAIN_PREVIEW].height;
// Brush border.
ATLAS_BOTTOM_PANE_SECTION_TERRAIN_BRUSH_BORDER = addArrayElement(Crd, Crd.last);
Crd[Crd.last-1].rleft = left_screen; Crd[Crd.last-1].rtop = bottom_screen;
Crd[Crd.last-1].rright = left_screen; Crd[Crd.last-1].rbottom = bottom_screen;
Crd[Crd.last-1].width = Crd[ATLAS_RB_CORNER].x-Crd[ATLAS_BOTTOM_PANE_SECTION_TERRAIN_PREVIEW].width;
Crd[Crd.last-1].height = Crd[ATLAS_BOTTOM_PANE_SECTION_TERRAIN_PREVIEW].height;
Crd[Crd.last-1].x = Crd[ATLAS_BOTTOM_PANE_SECTION_TERRAIN_PREVIEW].x+Crd[ATLAS_BOTTOM_PANE_SECTION_TERRAIN_PREVIEW].width+(Crd[ATLAS_RB_CORNER].width/4);
Crd[Crd.last-1].y = Crd[ATLAS_BOTTOM_PANE_SECTION_TERRAIN_PREVIEW].y;
// Brush border label.
ATLAS_BOTTOM_PANE_SECTION_TERRAIN_BRUSH_BORDER_LABEL = addArrayElement(Crd, Crd.last);
Crd[Crd.last-1].rleft = left_screen; Crd[Crd.last-1].rtop = bottom_screen;
Crd[Crd.last-1].rright = left_screen; Crd[Crd.last-1].rbottom = bottom_screen;
Crd[Crd.last-1].width = Crd[ATLAS_BOTTOM_PANE_SECTION_TERRAIN_BRUSH_BORDER].width;
Crd[Crd.last-1].height = 15;
Crd[Crd.last-1].x = Crd[ATLAS_BOTTOM_PANE_SECTION_TERRAIN_BRUSH_BORDER].x;
Crd[Crd.last-1].y = Crd[ATLAS_BOTTOM_PANE_SECTION_TERRAIN_BRUSH_BORDER].y+Crd[ATLAS_BOTTOM_PANE_SECTION_TERRAIN_BRUSH_BORDER].height;
// Brush size slider bar.
ATLAS_BOTTOM_PANE_SECTION_TERRAIN_BRUSH_SIZE_SLIDER_BAR = addArrayElement(Crd, Crd.last);
Crd[Crd.last-1].rleft = left_screen; Crd[Crd.last-1].rtop = bottom_screen;
Crd[Crd.last-1].rright = left_screen; Crd[Crd.last-1].rbottom = bottom_screen;
Crd[Crd.last-1].width = 15;
Crd[Crd.last-1].height = Crd[ATLAS_BOTTOM_PANE_SECTION_TERRAIN_BRUSH_BORDER].height+11;
Crd[Crd.last-1].x = Crd[ATLAS_BOTTOM_PANE_SECTION_TERRAIN_BRUSH_BORDER].x+Crd[ATLAS_BOTTOM_PANE_SECTION_TERRAIN_BRUSH_BORDER].width-Crd[ATLAS_BOTTOM_PANE_SECTION_TERRAIN_BRUSH_SIZE_SLIDER_BAR].width-5;
Crd[Crd.last-1].y = Crd[ATLAS_BOTTOM_PANE_SECTION_TERRAIN_BRUSH_BORDER].y-22;
// Brush size slider marker.
ATLAS_BOTTOM_PANE_SECTION_TERRAIN_BRUSH_SIZE_SLIDER_MARKER = addArrayElement(Crd, Crd.last);
Crd[Crd.last-1].rleft = left_screen; Crd[Crd.last-1].rtop = bottom_screen;
Crd[Crd.last-1].rright = left_screen; Crd[Crd.last-1].rbottom = bottom_screen;
Crd[Crd.last-1].width = Crd[ATLAS_BOTTOM_PANE_SECTION_TERRAIN_BRUSH_SIZE_SLIDER_BAR].width;
Crd[Crd.last-1].height = 8;
Crd[Crd.last-1].x = Crd[ATLAS_BOTTOM_PANE_SECTION_TERRAIN_BRUSH_SIZE_SLIDER_BAR].x-3;
Crd[Crd.last-1].y = Crd[ATLAS_BOTTOM_PANE_SECTION_TERRAIN_BRUSH_SIZE_SLIDER_BAR].y+70;
ATLAS_BOTTOM_PANE_SECTION_TERRAIN_BRUSH_BUTTON_SPAN = 5;
// Brush button.
ATLAS_BOTTOM_PANE_SECTION_TERRAIN_BRUSH_BUTTON_1 = addArrayElement(Crd, Crd.last);
Crd[Crd.last-1].rleft = left_screen; Crd[Crd.last-1].rtop = bottom_screen;
Crd[Crd.last-1].rright = left_screen; Crd[Crd.last-1].rbottom = bottom_screen;
Crd[Crd.last-1].width = 15;
Crd[Crd.last-1].height = 15;
Crd[Crd.last-1].x = Crd[ATLAS_BOTTOM_PANE_SECTION_TERRAIN_BRUSH_BORDER].x+10;
Crd[Crd.last-1].y = Crd[ATLAS_BOTTOM_PANE_SECTION_TERRAIN_BRUSH_BORDER].y+Crd[ATLAS_BOTTOM_PANE_SECTION_TERRAIN_BRUSH_BORDER].height-15-10;
// Brush button.
ATLAS_BOTTOM_PANE_SECTION_TERRAIN_BRUSH_BUTTON_2 = addArrayElement(Crd, Crd.last);
Crd[Crd.last-1].rleft = left_screen; Crd[Crd.last-1].rtop = bottom_screen;
Crd[Crd.last-1].rright = left_screen; Crd[Crd.last-1].rbottom = bottom_screen;
Crd[Crd.last-1].width = Crd[ATLAS_BOTTOM_PANE_SECTION_TERRAIN_BRUSH_BUTTON_1].width;
Crd[Crd.last-1].height = Crd[ATLAS_BOTTOM_PANE_SECTION_TERRAIN_BRUSH_BUTTON_1].height;
Crd[Crd.last-1].x = Crd[ATLAS_BOTTOM_PANE_SECTION_TERRAIN_BRUSH_BUTTON_1].x;
Crd[Crd.last-1].y = Crd[ATLAS_BOTTOM_PANE_SECTION_TERRAIN_BRUSH_BUTTON_1].y-Crd[ATLAS_BOTTOM_PANE_SECTION_TERRAIN_BRUSH_BUTTON_1].height-ATLAS_BOTTOM_PANE_SECTION_TERRAIN_BRUSH_BUTTON_SPAN;
// Brush button.
ATLAS_BOTTOM_PANE_SECTION_TERRAIN_BRUSH_BUTTON_3 = addArrayElement(Crd, Crd.last);
Crd[Crd.last-1].rleft = left_screen; Crd[Crd.last-1].rtop = bottom_screen;
Crd[Crd.last-1].rright = left_screen; Crd[Crd.last-1].rbottom = bottom_screen;
Crd[Crd.last-1].width = Crd[ATLAS_BOTTOM_PANE_SECTION_TERRAIN_BRUSH_BUTTON_1].width;
Crd[Crd.last-1].height = Crd[ATLAS_BOTTOM_PANE_SECTION_TERRAIN_BRUSH_BUTTON_1].height;
Crd[Crd.last-1].x = Crd[ATLAS_BOTTOM_PANE_SECTION_TERRAIN_BRUSH_BUTTON_1].x;
Crd[Crd.last-1].y = Crd[ATLAS_BOTTOM_PANE_SECTION_TERRAIN_BRUSH_BUTTON_2].y-Crd[ATLAS_BOTTOM_PANE_SECTION_TERRAIN_BRUSH_BUTTON_2].height-ATLAS_BOTTOM_PANE_SECTION_TERRAIN_BRUSH_BUTTON_SPAN;
// Brush button.
ATLAS_BOTTOM_PANE_SECTION_TERRAIN_BRUSH_BUTTON_4 = addArrayElement(Crd, Crd.last);
Crd[Crd.last-1].rleft = left_screen; Crd[Crd.last-1].rtop = bottom_screen;
Crd[Crd.last-1].rright = left_screen; Crd[Crd.last-1].rbottom = bottom_screen;
Crd[Crd.last-1].width = Crd[ATLAS_BOTTOM_PANE_SECTION_TERRAIN_BRUSH_BUTTON_1].width;
Crd[Crd.last-1].height = Crd[ATLAS_BOTTOM_PANE_SECTION_TERRAIN_BRUSH_BUTTON_1].height;
Crd[Crd.last-1].x = Crd[ATLAS_BOTTOM_PANE_SECTION_TERRAIN_BRUSH_BUTTON_1].x;
Crd[Crd.last-1].y = Crd[ATLAS_BOTTOM_PANE_SECTION_TERRAIN_BRUSH_BUTTON_3].y-Crd[ATLAS_BOTTOM_PANE_SECTION_TERRAIN_BRUSH_BUTTON_3].height-ATLAS_BOTTOM_PANE_SECTION_TERRAIN_BRUSH_BUTTON_SPAN;
// Beautify Terrain button.
ATLAS_BOTTOM_PANE_SECTION_TERRAIN_BRUSH_BUTTON_BEAUTIFY = addArrayElement(Crd, Crd.last);
Crd[Crd.last-1].rleft = left_screen; Crd[Crd.last-1].rtop = bottom_screen;
Crd[Crd.last-1].rright = left_screen; Crd[Crd.last-1].rbottom = bottom_screen;
Crd[Crd.last-1].width = Crd[ATLAS_BOTTOM_PANE_SECTION_TERRAIN_BRUSH_BUTTON_1].width;
Crd[Crd.last-1].height = Crd[ATLAS_BOTTOM_PANE_SECTION_TERRAIN_BRUSH_BUTTON_1].height;
Crd[Crd.last-1].x = Crd[ATLAS_BOTTOM_PANE_SECTION_TERRAIN_BRUSH_BUTTON_1].x;
Crd[Crd.last-1].y = Crd[ATLAS_BOTTOM_PANE_SECTION_TERRAIN_BRUSH_BORDER].y+10;
// ============================================= TERRAIN EDITOR: PAINT TERRAIN ===============================================
// Terrain Palette Background.
ATLAS_BOTTOM_PANE_SECTION_TERRAIN_PALETTE_BKG = addArrayElement(Crd, Crd.last);
Crd[Crd.last-1].rleft = right_screen; Crd[Crd.last-1].rtop = bottom_screen;
Crd[Crd.last-1].rright = right_screen; Crd[Crd.last-1].rbottom = bottom_screen;
Crd[Crd.last-1].width = 603;
Crd[Crd.last-1].height = 122;
Crd[Crd.last-1].x = Crd[ATLAS_RB_CORNER].x+Crd[ATLAS_RB_CORNER].width;
Crd[Crd.last-1].y = Crd[ATLAS_BOTTOM_PANE_BKG].y+5;
// Terrain Palette Tabs.
ATLAS_BOTTOM_PANE_SECTION_TERRAIN_PALETTE_TAB = new Object();
ATLAS_BOTTOM_PANE_SECTION_TERRAIN_PALETTE_TAB.span = 9;
ATLAS_BOTTOM_PANE_SECTION_TERRAIN_PALETTE_TAB.max = 9;
for (ATLAS_BOTTOM_PANE_SECTION_TERRAIN_PALETTE_TAB.last = 1; ATLAS_BOTTOM_PANE_SECTION_TERRAIN_PALETTE_TAB.last <= ATLAS_BOTTOM_PANE_SECTION_TERRAIN_PALETTE_TAB.max; ATLAS_BOTTOM_PANE_SECTION_TERRAIN_PALETTE_TAB.last++)
{
ATLAS_BOTTOM_PANE_SECTION_TERRAIN_PALETTE_TAB[ATLAS_BOTTOM_PANE_SECTION_TERRAIN_PALETTE_TAB.last] = Crd.last;
Crd[Crd.last] = new Object();
Crd[Crd.last].width = 63;
Crd[Crd.last].height = 17;
Crd[Crd.last].rleft = right_screen; Crd[Crd.last].rtop = bottom_screen;
Crd[Crd.last].rright = right_screen; Crd[Crd.last].rbottom = bottom_screen;
if (ATLAS_BOTTOM_PANE_SECTION_TERRAIN_PALETTE_TAB.last == 1)
Crd[Crd.last].x = Crd[ATLAS_BOTTOM_PANE_SECTION_TERRAIN_PALETTE_BKG].x+Crd[ATLAS_BOTTOM_PANE_SECTION_TERRAIN_PALETTE_BKG].width-Crd[Crd.last].width+2;
else
Crd[Crd.last].x = Crd[ATLAS_BOTTOM_PANE_SECTION_TERRAIN_PALETTE_TAB[ATLAS_BOTTOM_PANE_SECTION_TERRAIN_PALETTE_TAB.last]-1].x-Crd[Crd.last].width+ATLAS_BOTTOM_PANE_SECTION_TERRAIN_PALETTE_TAB.span;
Crd[Crd.last].y = Crd[ATLAS_BOTTOM_PANE_SECTION_TERRAIN_PALETTE_BKG].y+Crd[ATLAS_BOTTOM_PANE_SECTION_TERRAIN_PALETTE_BKG].height;
Crd.last++;
}
// Custom button.
ATLAS_BOTTOM_PANE_SECTION_TERRAIN_PALETTE_BUTTON_CUSTOM = addArrayElement(Crd, Crd.last);
Crd[Crd.last-1].rleft = right_screen; Crd[Crd.last-1].rtop = bottom_screen;
Crd[Crd.last-1].rright = right_screen; Crd[Crd.last-1].rbottom = bottom_screen;
Crd[Crd.last-1].width = Crd[ATLAS_LEFT_PANE_SECTION_TERRAIN_CLIFF_BUTTON_CUSTOM].width;
Crd[Crd.last-1].height = Crd[ATLAS_LEFT_PANE_SECTION_TERRAIN_CLIFF_BUTTON_CUSTOM].height;
Crd[Crd.last-1].x = Crd[ATLAS_BOTTOM_PANE_SECTION_TERRAIN_PALETTE_BKG].x-1;
Crd[Crd.last-1].y = Crd[ATLAS_BOTTOM_PANE_SECTION_TERRAIN_PALETTE_BKG].y+Crd[ATLAS_BOTTOM_PANE_SECTION_TERRAIN_PALETTE_BKG].height+3;
// Right arrow on Terrain Palette.
ATLAS_BOTTOM_PANE_SECTION_TERRAIN_PALETTE_RT_ARROW = addArrayElement(Crd, Crd.last);
Crd[Crd.last-1].rleft = right_screen; Crd[Crd.last-1].rtop = bottom_screen;
Crd[Crd.last-1].rright = right_screen; Crd[Crd.last-1].rbottom = bottom_screen;
Crd[Crd.last-1].width = 6;
Crd[Crd.last-1].height = 12;
Crd[Crd.last-1].x = Crd[ATLAS_BOTTOM_PANE_SECTION_TERRAIN_PALETTE_TAB[ATLAS_BOTTOM_PANE_SECTION_TERRAIN_PALETTE_TAB.last-1]].x-Crd[ATLAS_BOTTOM_PANE_SECTION_TERRAIN_PALETTE_RT_ARROW].width-Crd[ATLAS_BOTTOM_PANE_SECTION_TERRAIN_PALETTE_RT_ARROW].width;
Crd[Crd.last-1].y = Crd[ATLAS_BOTTOM_PANE_SECTION_TERRAIN_PALETTE_BUTTON_CUSTOM].y-2;
}
// ====================================================================

View File

@ -1,148 +0,0 @@
/*
***************************************
functions_global.js
Contains global GUI functions, which will
later be accessible from every GUI script/file.
So far, only the message box-related functions
are implemented.
***************************************
File version: 0.1
Edited by: Malte, Nov 14 2004
***************************************
Further comments:
Changelog:
v0.1: - first version.
***************************************
*/
// *******************************************
// messageBox
// *******************************************
// @params: int mbWidth, int mbHeight, string mbMessage, string mbTitle, int mbMode, arr mbButtonCaptions
// @return: void
// @desc: Displays a new message box. So far, we can only display one message box at
// a time, since the message box is based on one base-object which is modified
// according to the parameters. Later, we should probably be able to create GUI
// Objects (like the message box) at runtime.
// *******************************************
/*
TODO: Make button code work for any number of buttons without extending the code each time! ((arrays | nested variables) & calculating sizes)
*/
// ====================================================================
function initGlobal()
{
// Bottom-left product logo; used when taking official screenshots.
GLOBAL_WATERMARK_PRODUCT_LOGO = addArrayElement(Crd, Crd.last);
Crd[Crd.last-1].rleft = left_screen; Crd[Crd.last-1].rtop = bottom_screen;
Crd[Crd.last-1].rright = left_screen; Crd[Crd.last-1].rbottom = bottom_screen;
Crd[Crd.last-1].width = 200;
Crd[Crd.last-1].height = 98;
Crd[Crd.last-1].x = 0;
Crd[Crd.last-1].y = 0;
// Bottom-right company logo; used when taking official screenshots.
GLOBAL_WATERMARK_COMPANY_LOGO = addArrayElement(Crd, Crd.last);
Crd[Crd.last-1].rleft = right_screen; Crd[Crd.last-1].rtop = bottom_screen;
Crd[Crd.last-1].rright = right_screen; Crd[Crd.last-1].rbottom = bottom_screen;
Crd[Crd.last-1].width = 207;
Crd[Crd.last-1].height = 28;
Crd[Crd.last-1].x = 0;
Crd[Crd.last-1].y = 0;
}
// ====================================================================
function messageBox(mbWidth, mbHeight, mbMessage, mbTitle, mbMode, mbButtonCaptions, mbButtonsCode) {
mbMainObj = getGUIObjectByName("mb_main");
mbTitleObj = getGUIObjectByName("mb_titlebar_text");
mbTextObj = getGUIObjectByName("mb_text");
mbButton1Obj = getGUIObjectByName("mb_button1");
mbButton2Obj = getGUIObjectByName("mb_button2");
mbButton3Obj = getGUIObjectByName("mb_button3");
// Calculate size
mbLRDiff = mbWidth / 2; // Message box left/right difference from 50% of screen
mbUDDiff = mbHeight / 2; // Message box up/down difference from 50% of screen
mbSizeString = "50%-" + mbLRDiff + " 50%-" + mbUDDiff + " 50%+" + mbLRDiff + " 50%+" + mbUDDiff;
mbMainObj.size = mbSizeString;
// Texts
mbTitleObj.caption = mbTitle;
mbTextObj.caption = mbMessage;
// Message box modes
// There is a number of standard modes, and if none of these is used (mbMode == 0), the button captions will be
// taken from the array mbButtonCaptions; there currently is a maximum of three buttons.
switch (mbMode) {
case 1:
// Simple Yes/No question box
mbButtonCaptions = new Array("Yes", "No");
break;
case 2:
// Okay-only box
mbButtonCaptions = new Array("OK");
break;
case 3:
// Retry/Abort/Ignore box (will we ever need this?!)
mbButtonCaptions = new Array("Retry", "Ignore", "Abort");
default:
}
// Buttons
switch (mbButtonCaptions.length) {
case 1:
// One Button only
mbButton1Obj.caption = mbButtonCaptions[0];
mbButton1Obj.size = "30% 100%-80 70% 100%-50";
mbButton1Obj.hidden = false;
mbButton2Obj.hidden = true;
mbButton3Obj.hidden = true;
break;
case 2:
// Two Buttons
mbButton1Obj.caption = mbButtonCaptions[0];
mbButton2Obj.caption = mbButtonCaptions[1];
mbButton1Obj.size = "10% 100%-80 45% 100%-50";
mbButton2Obj.size = "55% 100%-80 90% 100%-50";
mbButton1Obj.hidden = false;
mbButton2Obj.hidden = false;
mbButton3Obj.hidden = true;
break;
case 3:
// Three Buttons
mbButton1Obj.caption = mbButtonCaptions[0];
mbButton2Obj.caption = mbButtonCaptions[1];
mbButton3Obj.caption = mbButtonCaptions[2];
mbButton1Obj.size = "10% 100%-80 30% 100%-50";
mbButton2Obj.size = "40% 100%-80 60% 100%-50";
mbButton3Obj.size = "70% 100%-80 90% 100%-50";
mbButton1Obj.hidden = false;
mbButton2Obj.hidden = false;
mbButton3Obj.hidden = false;
break;
}
// Show the message box
mbMainObj.hidden=false;
// Testing
getGUIGlobal().mbButton1Code = mbButtonsCode[0];
getGUIGlobal().mbButton2Code = mbButtonsCode[1];
getGUIGlobal().mbButton3Code = mbButtonsCode[2];
}

View File

@ -1,31 +0,0 @@
// Main Pregame JS Script file
// Contains functions and code for Main Menu.
// ====================================================================
function openMainMenuSubWindow (windowName)
{
// Helper function that enables the dark background mask, then reveals a given subwindow object.
guiUnHide ("pregame_subwindow_bkg");
guiUnHide (windowName);
}
// ====================================================================
function closeMainMenuSubWindow (windowName)
{
// Helper function that disables the dark background mask, then hides a given subwindow object.
guiHide ("pregame_subwindow_bkg");
guiHide (windowName);
}
// ====================================================================
function initPreGame()
{
}
// ====================================================================

View File

@ -1,177 +0,0 @@
// ====================================================================
function StartMap (MapName, OpenWindow, GameMode)
{
// Starts the map, closing the current window.
// MapName: .pmp to load.
// OpenWindow: Window group (usually parent string) of control that called the function. It'll be hidden.
// GameMode: 0: SP
// 1: MP
// Check whether we have a correct file extension, to avoid crashes
Extension = MapName.substring(MapName.length, MapName.length-4);
if (Extension != ".pmp")
{
// Add .pmp to the file name - shouldn't help if the name is mistyped, but may be useful in some cases.
MapName = MapName + ".pmp";
console.write ("Trying to fix the map name (probably missing extension).");
}
// Set up game
g_GameAttributes.mapFile = MapName;
// Close setup window
closeMainMenuSubWindow (OpenWindow);
// Display loading screen.
StartLoadingScreen();
// Begin game session.
if (! startGame())
{
// Failed to start the game; go back to the main menu.
guiHide ("loading_screen");
guiUnHide ("pregame_gui");
// Show an error message
btCaptions = new Array("OK");
btCode = new Array("");
messageBox(400, 200, "The game could not be started with the given parameters. You probably have entered an invalid map name.", "Error", 0, btCaptions, btCode);
}
}
// ====================================================================
function StartLoadingScreen()
{
// Switch screens from main menu to loading screen.
guiSwitch ("pregame_gui", "loading_screen");
console.write ("Loading " + g_GameAttributes.mapFile + " (" + g_GameAttributes.numPlayers + " players) ...");
// Generate random number for random concept art (should be depending on the selected civ later)
RandVar = getRandom(1, 6);
switch (RandVar) {
case 1:
sprite = "load_concept_he";
break;
case 2:
sprite = "load_concept_ce";
break;
case 3:
sprite = "load_concept_pe";
break;
case 4:
sprite = "load_concept_ro";
break;
case 5:
sprite = "load_concept_ca";
break;
case 6:
sprite = "load_concept_ib";
break;
}
getGUIObjectByName ("loading_screen_background_concept").sprite = sprite;
console.write (getGUIObjectByName ("loading_screen_background_concept").sprite);
// janwas: main loop now sets progress / description, but that won't
// happen until the first timeslice completes, so set initial values.
getGUIObjectByName ("loading_screen_titlebar").caption = "Loading Scenario ...";
getGUIObjectByName ("loading_screen_progress_bar_text").caption = "";
getGUIObjectByName ("loading_screen_progress_bar").caption = 0;
getGUIObjectByName ("loading_screen_text").caption = "LOADING " + g_GameAttributes.mapFile + " ...\nPlease wait ...";
// Pick a random tip of the day (each line is a separate tip).
tipArray = readFileLines("gui/text/tips.txt");
// Set tip string.
getGUIObjectByName ("loading_screen_tip").caption = tipArray[getRandom(0, tipArray.length-1)];
}
// ====================================================================
function reallyStartGame()
{
// This is a reserved function name that is executed by the engine when it is ready
// to start the game (ie loading progress has reached 100%).
// Create resource pools for each player, etc.
SetupSession();
// Switch GUI from loading screen to game session.
guiSwitch ("loading_screen", "session_gui");
}
// ====================================================================
function SetupSession (GameMode)
{
// GameMode: 0: SP
// 1: MP
// Do essentials that can only be done when the session has been loaded ...
// For example, create the resource types, scores, etc, for each player.
// Initialise Resource Pools by attaching them to the Player object.
// (CPlayer code takes care of giving a copy to each player.)
CreateResources();
if (GameMode == "0")
{
// Set up a bunch of players so we can see them pretty colours. :P
console.write ("Setting Up Temporary Single Players");
// The first player is by default allocated to the local player in SP, so
// adding 7 players means that we'll have 8 players in total
for (i=0; i<7; i++)
{
g_GameAttributes.slots[i+1].assignLocal();
console.write ("Slot "+(i+1)+" is assigned: " + g_GameAttributes.slots[i+1].assignment);
}
}
// Set starting UI layout.
FlipGUI(GUIType);
// Select session peace track.
curr_session_playlist_1 = newRandomSound("music", "peace");
// Fade out main theme and fade in session theme.
CrossFade(curr_music, curr_session_playlist_1, 0.1);
// janwas: greatly accelerate this timesink;
// will be replaced soon by native version that doesn't block.
// Start refreshing the session controls.
setInterval( getObjectInfo, 1, 100 );
}
// ====================================================================
function EndSession (CloseType)
{
// Occurs when the player chooses to close the current game.
switch (CloseType)
{
case ("return"):
// If the player has chosen to quit game and return to main menu,
// End the session.
endGame();
// Fade out current music and return to playing menu theme.
curr_music = newRandomSound('music', 'menu');
CrossFade(curr_session_playlist_1, curr_music, 0.1);
// janwas: greatly accelerate this timesink;
// will be replaced soon by native version that doesn't block.
// Swap GUIs to display main menu.
guiSwitch ("session_gui", "pregame_gui");
break;
case ("exit"):
// If the player has chosen to shutdown and immediately return to operating system,
exit();
break;
}
}
// ====================================================================

View File

@ -1,102 +0,0 @@
// ====================================================================
function initMPSessionHost()
{
var gameName = getGUIObjectByName("pregame_mp_host_gamename").caption;
guiSwitch ("pregame_mp_host", "pregame_mp_setup_host");
guiHide("pregame_mainmenu_versionnumber");
// Set up the server
var server = createServer();
// Welcome message
server.welcomeMessage = getGUIObjectByName("pregame_mp_host_welcomemsg").caption;
// Server Name
server.serverName = gameName;
// start listening
var success = server.open();
if(!success) {
messageBox(400, 200, "Failed to start server. Please review the logfile for more information on the problem.", "Problem", 2, new Array(), new Array());
}
// Set the title for the setup screen
getGUIObjectByName("pregame_mp_setup_host_titlebar").caption = "Hosting: " + getGUIObjectByName("pregame_mp_host_gamename").caption;
// Set the host player's name on the setup screen
getGUIObjectByName("pregame_mp_setup_host_p1_txt").caption = "P1: " + getGUIObjectByName("pregame_mp_modesel_playername").caption + " (Host)";
// Set the map to use
//g_GameAttributes.mapFile = mapName;
// -------------------------
// INCOMING CONNECTIONS
// -------------------------
server.onClientConnect=function (event) {
console.write("Client connected.");
//console.write("A new client has successfully connected! ID: " + event.id + ", Name: " + event.name + ", Session: " + event.session);
//console.write("New client.");
//var playerSlot = g_GameAttributes.getOpenSlot();
// assign a slot
//playerSlot.assignToSession(event.session);
//console.write("slot: " + playerSlot.player);
//console.write("got here");
// need to refresh the dialog control data here
};
server.onClientDisconnect=function (event) {
console.write("Client disconnected.");
};
// CHAT
/*server.onChat=function (event) {
messageBox(400, 200, event.sender+" says: "+event.message, "Chat Message", 2, new Array(), new Array());
};*/
// Need "waiting for more players to join and start game" code here
/*btCaptions = new Array("OK");
btCode = new Array("startLoadingScreen();");
messageBox(400, 200, "Waiting for clients to join - Click OK to start the game.", "Ready", 0, btCaptions, btCode);*/
}
// ====================================================================
function initMPSessionClient(playerName, serverIP)
{
GUIObjectHide("pregame_mp_ip");
GUIObjectHide("pregame_subwindow_bkg");
var client=createClient();
client.playerName=playerName;
client.onStartGame=function () {
messageBox(400, 200, "The game starts now!!!", "Get Ready!", 2, new Array(), new Array());
startLoadingScreen();
};
client.onChat=function (event) {
messageBox(400, 200, event.sender+" says: "+event.message, "Chat Message", 2, new Array(), new Array());
};
client.onConnectComplete=function (event) {
messageBox(400, 200, "Result message: "+event.message, "Connect complete", 2, new Array(), new Array());
};
// Join MP game
var success = client.beginConnect(serverIP);
if(!success) {
messageBox(400, 200, "Failed to join game. Please review the logfile for more information on the problem.", "Failure", 2, new Array(), new Array());
}
// Need "waiting for game to start" code here - it should automatically start if the client recieves the start signal from the server,
// but I currently don't know how that could be done.
/*btCaptions = new Array("OK");
btCode = new Array("");
messageBox(400, 200, "Data: " + playerName + ";" + serverIP + ";", "Test", 0, btCaptions, btCode);*/
}
// ====================================================================

View File

@ -1,426 +0,0 @@
function initSession()
{
// ============================================= CONSTANTS =================================================
GUIType="bottom";
// Coord-style size table.
SizeCoord = new Array();
SizeCoord.last = 0;
// 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;
// Small icons (eg Movement Rate, Food).
crd_mini_icon_width = 20;
crd_mini_icon_height = crd_mini_icon_width;
// Define cell reference constants for icon sheets.
initCellReference();
// ============================================= GLOBALS =================================================
initGroupPane();
initResourcePool();
initStatusOrb();
initMapOrb();
initTeamTray();
initSubWindows();
initManual();
initJukebox();
}
// ====================================================================
function initCellReference()
{
// Define cell reference constants for icon sheets.
// icon_sheet_statistic
stat_accuracy = 0;
stat_attack = 1;
stat_armour = 2;
stat_los = 3;
stat_speed = 4;
stat_range = 5;
stat_hack = 6;
stat_pierce = 7;
stat_crush = 8;
stat_rank1 = 9;
stat_rank2 = 10;
stat_rank3 = 11;
stat_garrison = 12;
stat_heart = 13;
// portrait_sheet_action
// generic actions
action_empty = 0;
action_attack = 1;
action_patrol = 2;
action_stop = 3;
action_gather_food = 4;
action_gather_wood = 5;
action_gather_stone = 6;
action_gather_ore = 7;
action_rally = 8;
action_repair = 9;
action_heal = 10;
action_scout = 11;
action_townbell = 12;
action_lock = 13;
action_unlock = 14;
// formation actions
action_formation_box = 23;
action_formation_column_c = 24;
action_formation_column_o = 25;
action_formation_line_c = 26;
action_formation_line_o = 27;
action_formation_phalanx = 28;
action_formation_skirmish = 29;
action_formation_testudo = 30;
action_formation_wedge = 31;
// stance actions
action_stance_aggress = 39;
action_stance_avoid = 40;
action_stance_defend = 41;
action_stance_hold = 42;
action_stance_stand = 43;
// tab actions
action_tab_command = 48;
action_tab_train = 49;
action_tab_buildciv = 50;
action_tab_buildmil = 51;
action_tab_research = 52;
action_tab_formation = 53;
action_tab_stance = 54;
action_tab_barter = 55;
}
// ====================================================================
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.
// Sprite Format: "ui_portrait_"portraitString"_"portraitSuffix
// Sprite Format: "ui_portrait_"portraitString"_"portraitSuffix"_lit"
// Sprite Format: "ui_portrait_"portraitString"_"portraitSuffix"_grey"
// Note: Make sure the file follows this naming convention or bad things could happen.
// Get GUI object
setPortraitGUIObject = getGUIObjectByName(objectName);
// Set the three portraits.
if (portraitSuffix && portraitSuffix != "")
setPortraitGUIObject.sprite = "ui_portrait_" + portraitString + "_" + portraitSuffix;
else
setPortraitGUIObject.sprite = "ui_portrait_" + portraitString;
setPortraitGUIObject.sprite_over = setPortraitGUIObject.sprite + "_lit";
setPortraitGUIObject.sprite_disabled = setPortraitGUIObject.sprite + "_grey";
// 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 = "";
}
// ====================================================================
function getObjectInfo()
{
// Updated each tick to extract entity information from selected unit(s).
// Don't process GUI when we're full-screen.
if (GUIType != "none")
{
if (!selection.length) // If no entity selected,
{
// Hide Status Orb
getGUIObjectByName("session_status_orb").hidden = true;
// Hide Group Pane.
getGUIObjectByName("session_group_pane").hidden = true;
getGlobal().MultipleEntitiesSelected = 0;
}
else // If at least one entity selected,
{
// Store globals for entity information.
// strString = "" + selection[0].position;
// EntityPos = strString.substring(20,strString.length-3);
UpdateStatusOrb(); // (later, we need to base this on the selected unit's stats changing)
// Check if a group of entities selected
if (selection.length > 1)
{
// If a group pane isn't already open, and we don't have the same set as last time,
// NOTE: This "if" is an optimisation because the game crawls if this set of processing occurs every frame.
// It's quite possible for the player to select another group of the same size and for it to not be recognised.
// Best solution would be to base this off a "new entities selected" instead of an on-tick.
if (
// getGUIObjectByName("session_group_pane").hidden == true ||
selection.length != getGlobal().MultipleEntitiesSelected)
{
UpdateGroupPane(); // (later, we need to base this on the selection changing)
getGlobal().MultipleEntitiesSelected = selection.length;
}
}
else
{
getGlobal().MultipleEntitiesSelected = 0;
// Hide Group Pane.
getGUIObjectByName("session_group_pane").hidden = true;
}
}
// Modify any resources given/taken (later, we need to base this on a resource-changing event).
UpdateResourcePool();
// Update Team Tray (later, we need to base this on the player creating a group).
UpdateTeamTray();
}
}
// ====================================================================
function MakeUnit(x, y, z, MakeUnitName)
{
// Spawn an entity at the given coordinates.
DudeSpawnPoint = new Vector3D(x, y, z);
new Entity(getEntityTemplate(MakeUnitName), DudeSpawnPoint, 1.0);
// writeConsole(MakeUnitName + " created at " + DudeSpawnPoint);
}
// ====================================================================
function selected()
{
// Returns how many units selected.
if( selection.length > 0 )
return( selection[0] );
return( null );
}
// ====================================================================
function FlipGUI(NewGUIType)
{
// Sets the GUI coordinates and graphics so that the panel is either at the top or bottom of the screen.
switch (NewGUIType)
{
// Set which GUI to use.
case "top":
case "bottom":
case "none":
GUIType=NewGUIType;
break;
default:
// If no type specified, toggle.
if (GUIType == "top")
GUIType = "bottom";
else
if (GUIType == "bottom")
GUIType = "none";
else
GUIType = "top";
break;
}
if (GUIType != "none")
{
guiUnHide("session_gui");
guiUnHide("always_on");
// Seek through all sizes created.
for (FlipGUILoop = 0; FlipGUILoop <= SizeCoord.last-1; FlipGUILoop++)
{
// Set each object to the other size.
switch (GUIType)
{
case "bottom":
setSize(SizeCoord[FlipGUILoop].name, SizeCoord[FlipGUILoop].size1);
switch (SizeCoord[FlipGUILoop].name){
case "SN_MAP_ORB_SEGBOTTOM1":
getGUIObjectByName(SizeCoord[FlipGUILoop].name).sprite = "session_panel_minimap_segtop1";
getGUIObjectByName(SizeCoord[FlipGUILoop].name).sprite_over = "session_panel_minimap_segtop1" + "_lit";
break;
case "SN_MAP_ORB_SEGBOTTOM2":
getGUIObjectByName(SizeCoord[FlipGUILoop].name).sprite = "session_panel_minimap_segtop2";
getGUIObjectByName(SizeCoord[FlipGUILoop].name).sprite_over = "session_panel_minimap_segtop2" + "_lit";
break;
case "SN_MAP_ORB_SEGBOTTOM3":
getGUIObjectByName(SizeCoord[FlipGUILoop].name).sprite = "session_panel_minimap_segtop3";
getGUIObjectByName(SizeCoord[FlipGUILoop].name).sprite_over = "session_panel_minimap_segtop3" + "_lit";
break;
case "SN_MAP_ORB_SEGBOTTOM4":
getGUIObjectByName(SizeCoord[FlipGUILoop].name).sprite = "session_panel_minimap_segtop4";
getGUIObjectByName(SizeCoord[FlipGUILoop].name).sprite_over = "session_panel_minimap_segtop4" + "_lit";
break;
case "SN_STATUS_PANE_BG":
getGUIObjectByName(SizeCoord[FlipGUILoop].name).sprite = "session_panel_status_bg_top";
break;
default:
break;
}
break;
case "top":
setSize(SizeCoord[FlipGUILoop].name, SizeCoord[FlipGUILoop].size2);
switch (SizeCoord[FlipGUILoop].name){
case "SN_MAP_ORB_SEGBOTTOM1":
getGUIObjectByName(SizeCoord[FlipGUILoop].name).sprite = "session_panel_minimap_segbottom1";
getGUIObjectByName(SizeCoord[FlipGUILoop].name).sprite_over = "session_panel_minimap_segbottom1_lit";
break;
case "SN_MAP_ORB_SEGBOTTOM2":
getGUIObjectByName(SizeCoord[FlipGUILoop].name).sprite = "session_panel_minimap_segbottom2";
getGUIObjectByName(SizeCoord[FlipGUILoop].name).sprite_over = "session_panel_minimap_segbottom2_lit";
break;
case "SN_MAP_ORB_SEGBOTTOM3":
getGUIObjectByName(SizeCoord[FlipGUILoop].name).sprite = "session_panel_minimap_segbottom3";
getGUIObjectByName(SizeCoord[FlipGUILoop].name).sprite_over = "session_panel_minimap_segbottom3_lit";
break;
case "SN_MAP_ORB_SEGBOTTOM4":
getGUIObjectByName(SizeCoord[FlipGUILoop].name).sprite = "session_panel_minimap_segbottom4";
getGUIObjectByName(SizeCoord[FlipGUILoop].name).sprite_over = "session_panel_minimap_segbottom4_lit";
break;
case "SN_STATUS_PANE_BG":
getGUIObjectByName(SizeCoord[FlipGUILoop].name).sprite = "session_panel_status_bg_bottom";
break;
default:
break;
}
break;
}
}
UpdateGroupPane();
}
else
{
guiHide("session_gui");
guiHide("always_on");
}
writeConsole("GUI flipped to " + GUIType + ".");
}
// ====================================================================
function selectEntity(handler)
{
endSelection();
startSelection(function (event) {
// Selection is performed when single-clicking the right mouse
// button.
if (event.button == SDL_BUTTON_RIGHT && event.clicks == 1)
{
handler(event.entity);
}
// End selection on first mouse-click
endSelection();
});
}
function selectLocation(handler)
{
endSelection();
startSelection(function (event) {
// Selection is performed when single-clicking the right mouse
// button.
if (event.button == SDL_BUTTON_RIGHT && event.clicks == 1)
{
handler(event.x, event.y);
}
// End selection on first mouse-click
endSelection();
});
}
function startSelection(handler)
{
gameView.startCustomSelection();
getGlobal().selectionWorldClickHandler=handler;
console.write("isSelecting(): "+isSelecting());
}
function endSelection()
{
if (!isSelecting())
return;
gameView.endCustomSelection();
getGlobal().selectionWorldClickHandler = null;
}
function isSelecting()
{
return getGlobal().selectionWorldClickHandler != null;
}
// The world-click handler - called whenever the user clicks the terrain
function worldClickHandler(event)
{
args=new Array(null, null);
console.write("worldClickHandler: button "+event.button+", clicks "+event.clicks);
if (isSelecting())
{
getGlobal().selectionWorldClickHandler(event);
return;
}
// Right button single- or double-clicks
if (event.button == SDL_BUTTON_RIGHT && event.clicks <= 2)
{
if (event.clicks == 1)
cmd = event.command;
else if (event.clicks == 2)
{
console.write("Issuing secondary command");
cmd = event.secondaryCommand;
}
}
else
return;
switch (cmd)
{
// location target commands
case NMT_Goto:
case NMT_Patrol:
if (event.queued)
{
cmd = NMT_AddWaypoint;
}
case NMT_AddWaypoint:
args[0]=event.x;
args[1]=event.y;
break;
// entity target commands
case NMT_AttackMelee:
case NMT_Gather:
args[0]=event.entity;
args[1]=null;
break;
default:
console.write("worldClickHandler: Unknown command: "+cmd);
return;
}
issueCommand(selection, cmd, args[0], args[1]);
}
addGlobalHandler("worldClick", worldClickHandler);

View File

@ -1,218 +0,0 @@
function initGroupPane()
{
// Populate the table of Group Pane portrait coordinates.
// Group Pane table.
crd_grppane_prt_col = new Array();
crd_grppane_prt_col.last = 0; // Last size added.
crd_grppane_prt_col.style = 2; // Style length.
crd_grppane_prt_row = new Array();
crd_grppane_prt_row_bar = new Array();
crd_grppane_prt_row.last = 0; // Last size added.
crd_grppane_prt_row.style = 2; // Style length.
crd_grppane_prt = new Array();
crd_grppane_prt.last = 0; // Total group portraits.
// Build table of group pane coordinates.
initGroupPaneTable();
}
// ====================================================================
function initGroupPaneTable()
{
AddGroupPaneRow(0, 24, 100, -62); // Row 0
AddGroupPaneRow(0, 70, 100, -102); // Row 1
AddGroupPaneRow(0, 116, 100, -148); // Row 2
AddGroupPaneRow(0, 162, 100, -194); // Row 3
// AddGroupPaneRow(0, 208, 100, -240); // Row 4
// AddGroupPaneRow(0, 254, 100, -286); // Row 5
// AddGroupPaneRow(0, 300, 100, -332); // Row 6
AddGroupPaneCol(50, -16, 50, -16); // Col 0
AddGroupPaneCol(50, -52, 50, -52); // Col 1
AddGroupPaneCol(50, 20, 50, 20); // Col 2
AddGroupPaneCol(50, -88, 50, -88); // Col 3
AddGroupPaneCol(50, 56, 50, 56); // Col 4
AddGroupPaneCol(50, -124, 50, -124); // Col 5
AddGroupPaneCol(50, 92, 50, 92); // Col 6
AddGroupPaneCol(50, -160, 50, -160); // Col 7
AddGroupPaneCol(50, 128, 50, 128); // Col 8
AddGroupPaneCol(50, -196, 50, -196); // Col 9
AddGroupPaneCol(50, 164, 50, 164); // Col 10
AddGroupPaneCol(50, 200, 50, 200); // Col 11
AddGroupPaneCol(50, 236, 50, 236); // Col 12
}
// ====================================================================
function AddGroupPaneCol(rleft1, left1, rleft2, left2)
{
// Add a set of column coordinates to the Group Pane table.
crd_grppane_prt_col[crd_grppane_prt_col.last] = new Array();
style=1;
crd_grppane_prt_col[crd_grppane_prt_col.last][style] = new Array();
crd_grppane_prt_col[crd_grppane_prt_col.last][style].size = new GUISize(left1, 0, left1 + crd_portrait_sml_width, 0, rleft1, 0, rleft1, 0);
style=0;
crd_grppane_prt_col[crd_grppane_prt_col.last][style] = new Array();
crd_grppane_prt_col[crd_grppane_prt_col.last][style].size = new GUISize(left2, 0, left2 + crd_portrait_sml_width, 0, rleft2, 0, rleft2, 0);
crd_grppane_prt_col.last++; // Increment array.
}
// ====================================================================
function AddGroupPaneRow(rtop1, top1, rtop2, top2)
{
// Add a set of row coordinates to the Group Pane table.
crd_grppane_prt_row[crd_grppane_prt_row.last] = new Array();
style=1;
crd_grppane_prt_row[crd_grppane_prt_row.last][style] = new Array();
crd_grppane_prt_row[crd_grppane_prt_row.last][style].size = new GUISize(0, top1, 0, top1 + crd_portrait_sml_height, 0, rtop1, 0, rtop1);
style=0;
crd_grppane_prt_row[crd_grppane_prt_row.last][style] = new Array();
crd_grppane_prt_row[crd_grppane_prt_row.last][style].size = new GUISize(0, top2, 0, top2 + crd_portrait_sml_height, 0, rtop2, 0, rtop2);
crd_grppane_prt_row.last++; // Increment array.
}
// ====================================================================
function AddSizeGroupPane(objectName, row, col)
{
// Used to store the two GUI style sizes for an object on creation.
// This is a special method that uses the group pane table to specify values.
// Used later by FlipGUI() to switch the objects to a new set of positions.
SizeCoord[SizeCoord.last] = new Object();
SizeCoord[SizeCoord.last].name = objectName;
style = 0; // Set top GUI style.
size_col = crd_grppane_prt_col[col][style].size;
size_row = crd_grppane_prt_row[row][style].size;
SizeCoord[SizeCoord.last].size1 = new GUISize(size_col.left, size_row.top, size_col.right, size_row.bottom, size_col.rleft, size_row.rtop, size_col.rright, size_row.rbottom);
style = 1; // Set bottom GUI style.
size_col = crd_grppane_prt_col[col][style].size;
size_row = crd_grppane_prt_row[row][style].size;
SizeCoord[SizeCoord.last].size2 = new GUISize(size_col.left, size_row.top, size_col.right, size_row.bottom, size_col.rleft, size_row.rtop, size_col.rright, size_row.rbottom);
SizeCoord.last++; // Increment counter for next entry.
crd_grppane_prt.last++; // Increment group pane portrait counter.
}
// ====================================================================
function AddSizeGroupPaneBar(objectName)
{
// Create a health bar for the last group pane portrait created.
var size1 = SizeCoord[SizeCoord.last-1].size1;
var size2 = SizeCoord[SizeCoord.last-1].size2;
AddSizeCoord(objectName,
size1.left, size1.bottom+2, size1.right, size1.bottom+6, size1.rleft, size1.rtop, size1.rright, size1.rbottom,
size2.left, size2.bottom+2, size2.right, size2.bottom+6, size2.rleft, size2.rtop, size2.rright, size2.rbottom);
}
// ====================================================================
function SelectUnit(unitNumber)
{
// Sets the current unit selection to a given number in the selection[] array (selects a unit in the current selection).
// Occurs when clicking a portrait in the Group Pane.
clickedUnit = selection[unitNumber-1];
selection.clear();
selection.push(clickedUnit);
}
// ====================================================================
function UpdateGroupPane()
{
// Reveal Group Pane.
getGUIObjectByName("session_group_pane").hidden = false;
/*
// Set size of Group Pane background.
if (selection.length <= 13)
{
switch (GUIType)
{
case "top":
setSize("session_group_pane_bg", "50%-215 0% 50%+285 0%+86");
break;
case "bottom":
setSize("session_group_pane_bg", "50%-215 100%-86 50%+285 100%");
break;
}
}
else
if (selection.length > 13 && selection.length <= 26)
{
switch (GUIType)
{
case "top":
setSize("session_group_pane_bg", "50%-215 0% 50%+285 0%+127");
break;
case "bottom":
setSize("session_group_pane_bg", "50%-215 100%-127 50%+285 100%");
break;
}
}
else
if (selection.length > 26 && selection.length <= 39)
{
switch (GUIType)
{
case "top":
setSize("session_group_pane_bg", "50%-215 0% 50%+285 0%+168");
break;
case "bottom":
setSize("session_group_pane_bg", "50%-215 100%-168 50%+285 100%");
break;
}
}
else
{
switch (GUIType)
{
case "top":
setSize("session_group_pane_bg", "50%-215 0% 50%+285 0%+209");
break;
case "bottom":
setSize("session_group_pane_bg", "50%-215 100%-209 50%+285 100%");
break;
}
}
*/
// Display appropriate portraits.
for (groupPaneLoop = 1; groupPaneLoop <= crd_grppane_prt.last; groupPaneLoop++)
{
groupPanePortrait = getGUIObjectByName("SESSION_GROUP_PANE_PORTRAIT_" + groupPaneLoop);
groupPaneBar = getGUIObjectByName("SESSION_GROUP_PANE_PORTRAIT_" + groupPaneLoop + "_BAR");
// If it's a valid entity,
if (groupPaneLoop <= selection.length){
// Reveal and set to display this entity's portrait in the group pane.
groupPanePortrait.hidden = false;
groupPaneBar.hidden = false;
// Set progress bar for 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.
setPortrait("SESSION_GROUP_PANE_PORTRAIT_" + groupPaneLoop, selection[groupPaneLoop-1].traits.id.icon, selection[groupPaneLoop-1].traits.id.civ_code, selection[groupPaneLoop-1].traits.id.icon_cell);
}
// If it's empty, hide its group portrait.
else
{
groupPanePortrait.hidden = true;
groupPaneBar.hidden = true;
}
}
}

View File

@ -1,140 +0,0 @@
function initMapOrb()
{
SN_MINIMAP = addArrayElement(Crd, Crd.last);
Crd[Crd.last-1].rleft = right_screen; Crd[Crd.last-1].rtop = bottom_screen;
Crd[Crd.last-1].rright = right_screen; Crd[Crd.last-1].rbottom = bottom_screen;
Crd[Crd.last-1].width = 180;
Crd[Crd.last-1].height = Crd[Crd.last-1].width;
Crd[Crd.last-1].x = 0;
Crd[Crd.last-1].y = 0;
SN_MAP_ORB_SEGLEFT1 = addArrayElement(Crd, Crd.last);
Crd[Crd.last-1].rleft = right_screen; Crd[Crd.last-1].rtop = bottom_screen;
Crd[Crd.last-1].rright = right_screen; Crd[Crd.last-1].rbottom = bottom_screen;
Crd[Crd.last-1].width = 32;
Crd[Crd.last-1].height = 46;
Crd[Crd.last-1].x = Crd[SN_MINIMAP].width;
Crd[Crd.last-1].y = Crd[SN_MINIMAP].height-Crd[Crd.last-1].height;
SN_MAP_ORB_SEGLEFT1_FLP = addArrayElement(Crd, Crd.last);
Crd[Crd.last-1].rleft = Crd[Crd.last-2].rleft; Crd[Crd.last-1].rtop = top_screen;
Crd[Crd.last-1].rright = Crd[Crd.last-2].rright; Crd[Crd.last-1].rbottom = top_screen;
Crd[Crd.last-1].width = Crd[Crd.last-2].width;
Crd[Crd.last-1].height = Crd[Crd.last-2].height;
Crd[Crd.last-1].x = Crd[SN_MINIMAP].width;
Crd[Crd.last-1].y = 0;
SN_MAP_ORB_SEGLEFT2 = addArrayElement(Crd, Crd.last);
Crd[Crd.last-1].rleft = right_screen; Crd[Crd.last-1].rtop = bottom_screen;
Crd[Crd.last-1].rright = right_screen; Crd[Crd.last-1].rbottom = bottom_screen;
Crd[Crd.last-1].width = 40;
Crd[Crd.last-1].height = 44;
Crd[Crd.last-1].x = Crd[SN_MAP_ORB_SEGLEFT1].x;
Crd[Crd.last-1].y = Crd[SN_MAP_ORB_SEGLEFT1].y-Crd[Crd.last-1].height;
SN_MAP_ORB_SEGLEFT2_FLP = addArrayElement(Crd, Crd.last);
Crd[Crd.last-1].rleft = Crd[Crd.last-2].rleft; Crd[Crd.last-1].rtop = top_screen;
Crd[Crd.last-1].rright = Crd[Crd.last-2].rright; Crd[Crd.last-1].rbottom = top_screen;
Crd[Crd.last-1].width = Crd[Crd.last-2].width;
Crd[Crd.last-1].height = Crd[Crd.last-2].height;
Crd[Crd.last-1].x = Crd[SN_MAP_ORB_SEGLEFT1].x;
Crd[Crd.last-1].y = Crd[SN_MAP_ORB_SEGLEFT2].y-Crd[Crd.last-1].height;
SN_MAP_ORB_SEGLEFT3 = addArrayElement(Crd, Crd.last);
Crd[Crd.last-1].rleft = right_screen; Crd[Crd.last-1].rtop = bottom_screen;
Crd[Crd.last-1].rright = right_screen; Crd[Crd.last-1].rbottom = bottom_screen;
Crd[Crd.last-1].width = Crd[SN_MAP_ORB_SEGLEFT2].width;
Crd[Crd.last-1].height = Crd[SN_MAP_ORB_SEGLEFT2].height;
Crd[Crd.last-1].x = Crd[SN_MAP_ORB_SEGLEFT2].x;
Crd[Crd.last-1].y = Crd[SN_MAP_ORB_SEGLEFT2].y-Crd[Crd.last-1].height;
SN_MAP_ORB_SEGLEFT3_FLP = addArrayElement(Crd, Crd.last);
Crd[Crd.last-1].rleft = Crd[Crd.last-2].rleft; Crd[Crd.last-1].rtop = top_screen;
Crd[Crd.last-1].rright = Crd[Crd.last-2].rright; Crd[Crd.last-1].rbottom = top_screen;
Crd[Crd.last-1].width = Crd[Crd.last-2].width;
Crd[Crd.last-1].height = Crd[Crd.last-2].height;
Crd[Crd.last-1].x = Crd[SN_MAP_ORB_SEGLEFT2].x;
Crd[Crd.last-1].y = Crd[SN_MAP_ORB_SEGLEFT1].y-Crd[Crd.last-1].height;
SN_MAP_ORB_SEGLEFT4 = new Object();
SN_MAP_ORB_SEGLEFT4 = addArrayElement(Crd, Crd.last);
Crd[Crd.last-1].rleft = right_screen; Crd[Crd.last-1].rtop = bottom_screen;
Crd[Crd.last-1].rright = right_screen; Crd[Crd.last-1].rbottom = bottom_screen;
Crd[Crd.last-1].width = Crd[SN_MAP_ORB_SEGLEFT1].width;
Crd[Crd.last-1].height = Crd[SN_MAP_ORB_SEGLEFT1].height;
Crd[Crd.last-1].x = Crd[SN_MAP_ORB_SEGLEFT2].x;
Crd[Crd.last-1].y = Crd[SN_MAP_ORB_SEGLEFT3].y-Crd[Crd.last-1].height;
SN_MAP_ORB_SEGLEFT4_FLP = addArrayElement(Crd, Crd.last);
Crd[Crd.last-1].rleft = Crd[Crd.last-2].rleft; Crd[Crd.last-1].rtop = top_screen;
Crd[Crd.last-1].rright = Crd[Crd.last-2].rright; Crd[Crd.last-1].rbottom = top_screen;
Crd[Crd.last-1].width = Crd[Crd.last-2].width;
Crd[Crd.last-1].height = Crd[Crd.last-2].height;
Crd[Crd.last-1].x = Crd[SN_MAP_ORB_SEGLEFT2].x;
Crd[Crd.last-1].y = Crd[SN_MINIMAP].height-Crd[Crd.last-1].height;
SN_MAP_ORB_SEGBOTTOM1 = addArrayElement(Crd, Crd.last);
Crd[Crd.last-1].rleft = right_screen; Crd[Crd.last-1].rtop = bottom_screen;
Crd[Crd.last-1].rright = right_screen; Crd[Crd.last-1].rbottom = bottom_screen;
Crd[Crd.last-1].width = 46;
Crd[Crd.last-1].height = 32;
Crd[Crd.last-1].x = Crd[SN_MINIMAP].width-Crd[Crd.last-1].width;
Crd[Crd.last-1].y = Crd[SN_MINIMAP].height;
SN_MAP_ORB_SEGBOTTOM1_FLP = addArrayElement(Crd, Crd.last);
Crd[Crd.last-1].rleft = Crd[Crd.last-2].rleft; Crd[Crd.last-1].rtop = top_screen;
Crd[Crd.last-1].rright = Crd[Crd.last-2].rright; Crd[Crd.last-1].rbottom = top_screen;
Crd[Crd.last-1].width = Crd[Crd.last-2].width;
Crd[Crd.last-1].height = Crd[Crd.last-2].height;
Crd[Crd.last-1].x = Crd[SN_MINIMAP].width-Crd[Crd.last-1].width;
Crd[Crd.last-1].y = Crd[SN_MINIMAP].height;
SN_MAP_ORB_SEGBOTTOM2 = addArrayElement(Crd, Crd.last);
Crd[Crd.last-1].rleft = right_screen; Crd[Crd.last-1].rtop = bottom_screen;
Crd[Crd.last-1].rright = right_screen; Crd[Crd.last-1].rbottom = bottom_screen;
Crd[Crd.last-1].width = 44;
Crd[Crd.last-1].height = 40;
Crd[Crd.last-1].x = Crd[SN_MAP_ORB_SEGBOTTOM1].x-Crd[Crd.last-1].width;
Crd[Crd.last-1].y = Crd[SN_MAP_ORB_SEGBOTTOM1].y;
SN_MAP_ORB_SEGBOTTOM2_FLP = addArrayElement(Crd, Crd.last);
Crd[Crd.last-1].rleft = Crd[Crd.last-2].rleft; Crd[Crd.last-1].rtop = top_screen;
Crd[Crd.last-1].rright = Crd[Crd.last-2].rright; Crd[Crd.last-1].rbottom = top_screen;
Crd[Crd.last-1].width = Crd[Crd.last-2].width;
Crd[Crd.last-1].height = Crd[Crd.last-2].height;
Crd[Crd.last-1].x = Crd[SN_MAP_ORB_SEGBOTTOM1].x-Crd[Crd.last-1].width;
Crd[Crd.last-1].y = Crd[SN_MAP_ORB_SEGBOTTOM1].y;
SN_MAP_ORB_SEGBOTTOM3 = addArrayElement(Crd, Crd.last);
Crd[Crd.last-1].rleft = right_screen; Crd[Crd.last-1].rtop = bottom_screen;
Crd[Crd.last-1].rright = right_screen; Crd[Crd.last-1].rbottom = bottom_screen;
Crd[Crd.last-1].width = Crd[SN_MAP_ORB_SEGBOTTOM2].width;
Crd[Crd.last-1].height = Crd[SN_MAP_ORB_SEGBOTTOM2].height;
Crd[Crd.last-1].x = Crd[SN_MAP_ORB_SEGBOTTOM2].x-Crd[Crd.last-1].width;
Crd[Crd.last-1].y = Crd[SN_MAP_ORB_SEGBOTTOM2].y;
SN_MAP_ORB_SEGBOTTOM3_FLP = addArrayElement(Crd, Crd.last);
Crd[Crd.last-1].rleft = Crd[Crd.last-2].rleft; Crd[Crd.last-1].rtop = top_screen;
Crd[Crd.last-1].rright = Crd[Crd.last-2].rright; Crd[Crd.last-1].rbottom = top_screen;
Crd[Crd.last-1].width = Crd[Crd.last-2].width;
Crd[Crd.last-1].height = Crd[Crd.last-2].height;
Crd[Crd.last-1].x = Crd[SN_MAP_ORB_SEGBOTTOM2].x-Crd[Crd.last-1].width;
Crd[Crd.last-1].y = Crd[SN_MAP_ORB_SEGBOTTOM2].y;
SN_MAP_ORB_SEGBOTTOM4 = new Object();
SN_MAP_ORB_SEGBOTTOM4 = addArrayElement(Crd, Crd.last);
Crd[Crd.last-1].rleft = right_screen; Crd[Crd.last-1].rtop = bottom_screen;
Crd[Crd.last-1].rright = right_screen; Crd[Crd.last-1].rbottom = bottom_screen;
Crd[Crd.last-1].width = Crd[SN_MAP_ORB_SEGBOTTOM1].width;
Crd[Crd.last-1].height = Crd[SN_MAP_ORB_SEGBOTTOM1].height;
Crd[Crd.last-1].x = Crd[SN_MAP_ORB_SEGBOTTOM3].x-Crd[Crd.last-1].width;
Crd[Crd.last-1].y = Crd[SN_MAP_ORB_SEGBOTTOM2].y;
SN_MAP_ORB_SEGBOTTOM4_FLP = addArrayElement(Crd, Crd.last);
Crd[Crd.last-1].rleft = Crd[Crd.last-2].rleft; Crd[Crd.last-1].rtop = top_screen;
Crd[Crd.last-1].rright = Crd[Crd.last-2].rright; Crd[Crd.last-1].rbottom = top_screen;
Crd[Crd.last-1].width = Crd[Crd.last-2].width;
Crd[Crd.last-1].height = Crd[Crd.last-2].height;
Crd[Crd.last-1].x = 0;
Crd[Crd.last-1].y = Crd[SN_MAP_ORB_SEGBOTTOM2].y;
}

View File

@ -1,143 +0,0 @@
function initResourcePool()
{
SN_RESOURCE_COUNTER_SPAN = 5;
SN_RESOURCE_COUNTER_FOOD = addArrayElement(Crd, Crd.last);
Crd[Crd.last-1].rleft = mid_screen; Crd[Crd.last-1].rtop = top_screen;
Crd[Crd.last-1].rright = mid_screen; Crd[Crd.last-1].rbottom = top_screen;
Crd[Crd.last-1].width = crd_mini_icon_width+54;
Crd[Crd.last-1].height = crd_mini_icon_height;
Crd[Crd.last-1].x = -200;
Crd[Crd.last-1].y = 4;
SN_RESOURCE_COUNTER_WOOD = addArrayElement(Crd, Crd.last);
Crd[Crd.last-1].rleft = mid_screen; Crd[Crd.last-1].rtop = top_screen;
Crd[Crd.last-1].rright = mid_screen; Crd[Crd.last-1].rbottom = top_screen;
Crd[Crd.last-1].width = Crd[SN_RESOURCE_COUNTER_FOOD].width;
Crd[Crd.last-1].height = Crd[SN_RESOURCE_COUNTER_FOOD].height;
Crd[Crd.last-1].x = Crd[SN_RESOURCE_COUNTER_FOOD].x+Crd[SN_RESOURCE_COUNTER_FOOD].width+SN_RESOURCE_COUNTER_SPAN;
Crd[Crd.last-1].y = Crd[SN_RESOURCE_COUNTER_FOOD].y;
SN_RESOURCE_COUNTER_STONE = addArrayElement(Crd, Crd.last);
Crd[Crd.last-1].rleft = mid_screen; Crd[Crd.last-1].rtop = top_screen;
Crd[Crd.last-1].rright = mid_screen; Crd[Crd.last-1].rbottom = top_screen;
Crd[Crd.last-1].width = Crd[SN_RESOURCE_COUNTER_FOOD].width;
Crd[Crd.last-1].height = Crd[SN_RESOURCE_COUNTER_FOOD].height;
Crd[Crd.last-1].x = Crd[SN_RESOURCE_COUNTER_WOOD].x+Crd[SN_RESOURCE_COUNTER_WOOD].width+SN_RESOURCE_COUNTER_SPAN;
Crd[Crd.last-1].y = Crd[SN_RESOURCE_COUNTER_FOOD].y;
SN_RESOURCE_COUNTER_ORE = addArrayElement(Crd, Crd.last);
Crd[Crd.last-1].rleft = mid_screen; Crd[Crd.last-1].rtop = top_screen;
Crd[Crd.last-1].rright = mid_screen; Crd[Crd.last-1].rbottom = top_screen;
Crd[Crd.last-1].width = Crd[SN_RESOURCE_COUNTER_FOOD].width;
Crd[Crd.last-1].height = Crd[SN_RESOURCE_COUNTER_FOOD].height;
Crd[Crd.last-1].x = Crd[SN_RESOURCE_COUNTER_STONE].x+Crd[SN_RESOURCE_COUNTER_STONE].width+SN_RESOURCE_COUNTER_SPAN;
Crd[Crd.last-1].y = Crd[SN_RESOURCE_COUNTER_FOOD].y;
SN_RESOURCE_COUNTER_POPULATION = addArrayElement(Crd, Crd.last);
Crd[Crd.last-1].rleft = mid_screen; Crd[Crd.last-1].rtop = top_screen;
Crd[Crd.last-1].rright = mid_screen; Crd[Crd.last-1].rbottom = top_screen;
Crd[Crd.last-1].width = Crd[SN_RESOURCE_COUNTER_FOOD].width+9;
Crd[Crd.last-1].height = Crd[SN_RESOURCE_COUNTER_FOOD].height;
Crd[Crd.last-1].x = Crd[SN_RESOURCE_COUNTER_ORE].x+Crd[SN_RESOURCE_COUNTER_ORE].width+SN_RESOURCE_COUNTER_SPAN;
Crd[Crd.last-1].y = Crd[SN_RESOURCE_COUNTER_FOOD].y;
}
// ====================================================================
function AddResource(resourceName, resourceQty)
{
// Creates a resource type.
// MT: Rewritten to use JavaScript's nice associative-array-alikes. Requires the valueOf() hack - I'm looking into this.
if (!localPlayer.resource)
{
// Define the base resource group if it does not exist.
localPlayer.resource = new Array();
}
// Set resource name to upper-case to ensure it matches resource control name.
resourceName = resourceName.toUpperCase();
// Store resource's name and starting value.
localPlayer.resource.valueOf()[resourceName] = resourceQty;
console.write("Added " + resourceName );
}
// ====================================================================
function CreateResources()
{
// Defines all resource types for future use.
AddResource("Food", 0);
AddResource("Wood", 0);
AddResource("Stone", 0);
AddResource("Ore", 0);
AddResource("Population", 0);
AddResource("Housing", 0);
}
// ====================================================================
function GiveResources(resourceName, resourceQty)
{
// Generic function to add resources to the player's Pool.
if( localPlayer.resource.valueOf()[resourceName] )
{
localPlayer.resource.valueOf()[resourceName] += resourceQty;
console.write("Earned " + resourceQty + " resources.");
return( true );
}
// If the resource wasn't in the list, report an error.
return false;
}
// ====================================================================
function DeductResources(resourceName, resourceQty)
{
// Generic function to remove resources from the player's Pool.
if( localPlayer.resource.valueOf()[resourceName] )
{
localPlayer.resource.valueOf()[resourceName] -= resourceQty;
console.write("Deducted " + resourceQty + " resources.");
return( true );
}
// If the resource wasn't in the list, report an error.
return false;
}
// ====================================================================
function UpdateResourcePool()
{
// Populate the resource pool with current quantities.
// MT: Rewritten to use JavaScript's nice associative-array-alikes. Requires the valueOf() hack - I'm looking into this.
pool = localPlayer.resource.valueOf();
for( resource in pool )
{
switch( resource )
{
case "POPULATION":
// If it's population, combine population and housing in one string.
getGUIObjectByName("SN_RESOURCE_COUNTER_POPULATION").caption = pool.POPULATION + "/" + pool.HOUSING;
break;
case "HOUSING":
// Skip housing, as it's handled as a component of population.
break;
default:
// Set the value of a normal resource caption.
getGUIObjectByName("SN_RESOURCE_COUNTER_" + resource ).caption = pool[resource].toString();
break;
}
}
}

View File

@ -1,838 +0,0 @@
function initStatusOrb()
{
SN_STATUS_PANE_BG = addArrayElement(Crd, Crd.last);
Crd[Crd.last-1].rleft = left_screen; Crd[Crd.last-1].rtop = bottom_screen;
Crd[Crd.last-1].rright = left_screen; Crd[Crd.last-1].rbottom = bottom_screen;
Crd[Crd.last-1].width = 255;
Crd[Crd.last-1].height = 170;
Crd[Crd.last-1].x = 0;
Crd[Crd.last-1].y = 0;
SN_STATUS_PANE_HEADING = addArrayElement(Crd, Crd.last);
Crd[Crd.last-1].rleft = left_screen; Crd[Crd.last-1].rtop = bottom_screen;
Crd[Crd.last-1].rright = left_screen; Crd[Crd.last-1].rbottom = bottom_screen;
Crd[Crd.last-1].width = Crd[SN_STATUS_PANE_BG].width;
Crd[Crd.last-1].height = 14;
Crd[Crd.last-1].x = Crd[SN_STATUS_PANE_BG].x+2;
Crd[Crd.last-1].y = Crd[SN_STATUS_PANE_BG].y+Crd[SN_STATUS_PANE_BG].height-Crd[Crd.last-1].height-3;
SN_STATUS_PANE_HEADING_FLP = addArrayElement(Crd, Crd.last);
Crd[Crd.last-1].rleft = Crd[Crd.last-2].rleft; Crd[Crd.last-1].rtop = top_screen;
Crd[Crd.last-1].rright = Crd[Crd.last-2].rright; Crd[Crd.last-1].rbottom = top_screen;
Crd[Crd.last-1].width = Crd[Crd.last-2].width;
Crd[Crd.last-1].height = Crd[Crd.last-2].height;
Crd[Crd.last-1].x = Crd[Crd.last-2].x;
Crd[Crd.last-1].y = Crd[SN_STATUS_PANE_BG].y+3;
SN_STATUS_PANE_PORTRAIT = addArrayElement(Crd, Crd.last);
Crd[Crd.last-1].rleft = left_screen; Crd[Crd.last-1].rtop = bottom_screen;
Crd[Crd.last-1].rright = left_screen; Crd[Crd.last-1].rbottom = bottom_screen;
Crd[Crd.last-1].width = crd_portrait_lrg_width;
Crd[Crd.last-1].height = crd_portrait_lrg_height;
Crd[Crd.last-1].x = Crd[SN_STATUS_PANE_HEADING].x+5;
Crd[Crd.last-1].y = Crd[SN_STATUS_PANE_HEADING].y-Crd[Crd.last-1].height-7;
SN_STATUS_PANE_PORTRAIT_FLP = addArrayElement(Crd, Crd.last);
Crd[Crd.last-1].rleft = Crd[Crd.last-2].rleft; Crd[Crd.last-1].rtop = top_screen;
Crd[Crd.last-1].rright = Crd[Crd.last-2].rright; Crd[Crd.last-1].rbottom = top_screen;
Crd[Crd.last-1].width = Crd[Crd.last-2].width;
Crd[Crd.last-1].height = Crd[Crd.last-2].height;
Crd[Crd.last-1].x = Crd[Crd.last-2].x;
Crd[Crd.last-1].y = Crd[SN_STATUS_PANE_HEADING_FLP].y+Crd[SN_STATUS_PANE_HEADING_FLP].height+7;
SN_STATUS_PANE_ICON_RANK = addArrayElement(Crd, Crd.last);
Crd[Crd.last-1].rleft = left_screen; Crd[Crd.last-1].rtop = bottom_screen;
Crd[Crd.last-1].rright = left_screen; Crd[Crd.last-1].rbottom = bottom_screen;
Crd[Crd.last-1].width = crd_mini_icon_width;
Crd[Crd.last-1].height = crd_mini_icon_height;
Crd[Crd.last-1].x = Crd[SN_STATUS_PANE_PORTRAIT].x+Crd[SN_STATUS_PANE_PORTRAIT].width-Crd[Crd.last-1].width;
Crd[Crd.last-1].y = Crd[SN_STATUS_PANE_PORTRAIT].y;
SN_STATUS_PANE_ICON_RANK_FLP = addArrayElement(Crd, Crd.last);
Crd[Crd.last-1].rleft = Crd[Crd.last-2].rleft; Crd[Crd.last-1].rtop = top_screen;
Crd[Crd.last-1].rright = Crd[Crd.last-2].rright; Crd[Crd.last-1].rbottom = top_screen;
Crd[Crd.last-1].width = Crd[Crd.last-2].width;
Crd[Crd.last-1].height = Crd[Crd.last-2].height;
Crd[Crd.last-1].x = Crd[Crd.last-2].x;
Crd[Crd.last-1].y = Crd[SN_STATUS_PANE_PORTRAIT_FLP].y;
SN_STATUS_PANE_NAME1 = addArrayElement(Crd, Crd.last);
Crd[Crd.last-1].rleft = left_screen; Crd[Crd.last-1].rtop = bottom_screen;
Crd[Crd.last-1].rright = left_screen; Crd[Crd.last-1].rbottom = bottom_screen;
Crd[Crd.last-1].width = Crd[SN_STATUS_PANE_BG].width-Crd[SN_STATUS_PANE_PORTRAIT].width-10;
Crd[Crd.last-1].height = Crd[SN_STATUS_PANE_PORTRAIT].height;
Crd[Crd.last-1].x = Crd[SN_STATUS_PANE_PORTRAIT].x+Crd[SN_STATUS_PANE_PORTRAIT].width+2;
Crd[Crd.last-1].y = Crd[SN_STATUS_PANE_PORTRAIT].y;
SN_STATUS_PANE_NAME1_FLP = addArrayElement(Crd, Crd.last);
Crd[Crd.last-1].rleft = Crd[Crd.last-2].rleft; Crd[Crd.last-1].rtop = top_screen;
Crd[Crd.last-1].rright = Crd[Crd.last-2].rright; Crd[Crd.last-1].rbottom = top_screen;
Crd[Crd.last-1].width = Crd[Crd.last-2].width;
Crd[Crd.last-1].height = Crd[Crd.last-2].height;
Crd[Crd.last-1].x = Crd[Crd.last-2].x;
Crd[Crd.last-1].y = Crd[SN_STATUS_PANE_PORTRAIT_FLP].y;
SN_STATUS_PANE_ICON_HP_BAR_SPAN = 2;
SN_STATUS_PANE_ICON_HP_TEXT_X_SPAN = 4;
SN_STATUS_PANE_ICON_HP_TEXT_Y_SPAN = 0;
SN_STATUS_PANE_ICON_HP_BAR = addArrayElement(Crd, Crd.last);
Crd[Crd.last-1].rleft = left_screen; Crd[Crd.last-1].rtop = bottom_screen;
Crd[Crd.last-1].rright = left_screen; Crd[Crd.last-1].rbottom = bottom_screen;
Crd[Crd.last-1].width = Crd[SN_STATUS_PANE_PORTRAIT].width;
Crd[Crd.last-1].height = 6;
Crd[Crd.last-1].x = Crd[SN_STATUS_PANE_PORTRAIT].x;
Crd[Crd.last-1].y = Crd[SN_STATUS_PANE_PORTRAIT].y-Crd[Crd.last-1].height-SN_STATUS_PANE_ICON_HP_BAR_SPAN;
SN_STATUS_PANE_ICON_HP_BAR_FLP = addArrayElement(Crd, Crd.last);
Crd[Crd.last-1].rleft = Crd[Crd.last-2].rleft; Crd[Crd.last-1].rtop = top_screen;
Crd[Crd.last-1].rright = Crd[Crd.last-2].rright; Crd[Crd.last-1].rbottom = top_screen;
Crd[Crd.last-1].width = Crd[Crd.last-2].width;
Crd[Crd.last-1].height = Crd[Crd.last-2].height;
Crd[Crd.last-1].x = Crd[Crd.last-2].x;
Crd[Crd.last-1].y = Crd[SN_STATUS_PANE_PORTRAIT_FLP].y+Crd[SN_STATUS_PANE_PORTRAIT_FLP].height+SN_STATUS_PANE_ICON_HP_BAR_SPAN;
SN_STATUS_PANE_ICON_HP_TEXT = addArrayElement(Crd, Crd.last);
Crd[Crd.last-1].rleft = left_screen; Crd[Crd.last-1].rtop = bottom_screen;
Crd[Crd.last-1].rright = left_screen; Crd[Crd.last-1].rbottom = bottom_screen;
Crd[Crd.last-1].width = 55;
Crd[Crd.last-1].height = Crd[SN_STATUS_PANE_ICON_HP_BAR].height;
Crd[Crd.last-1].x = Crd[SN_STATUS_PANE_NAME1].x;
Crd[Crd.last-1].y = Crd[SN_STATUS_PANE_ICON_HP_BAR].y+SN_STATUS_PANE_ICON_HP_TEXT_Y_SPAN;
SN_STATUS_PANE_ICON_HP_TEXT_FLP = addArrayElement(Crd, Crd.last);
Crd[Crd.last-1].rleft = Crd[Crd.last-2].rleft; Crd[Crd.last-1].rtop = top_screen;
Crd[Crd.last-1].rright = Crd[Crd.last-2].rright; Crd[Crd.last-1].rbottom = top_screen;
Crd[Crd.last-1].width = Crd[Crd.last-2].width;
Crd[Crd.last-1].height = Crd[Crd.last-2].height;
Crd[Crd.last-1].x = Crd[Crd.last-2].x;
Crd[Crd.last-1].y = Crd[SN_STATUS_PANE_ICON_HP_BAR_FLP].y+SN_STATUS_PANE_ICON_HP_TEXT_Y_SPAN;
SN_STATUS_PANE_ICON_XP_BAR = addArrayElement(Crd, Crd.last);
Crd[Crd.last-1].rleft = left_screen; Crd[Crd.last-1].rtop = bottom_screen;
Crd[Crd.last-1].rright = left_screen; Crd[Crd.last-1].rbottom = bottom_screen;
Crd[Crd.last-1].width = Crd[SN_STATUS_PANE_ICON_HP_BAR].width;
Crd[Crd.last-1].height = Crd[SN_STATUS_PANE_ICON_HP_BAR].height;
Crd[Crd.last-1].x = Crd[SN_STATUS_PANE_ICON_HP_BAR].x;
Crd[Crd.last-1].y = Crd[SN_STATUS_PANE_ICON_HP_BAR].y-Crd[SN_STATUS_PANE_ICON_HP_BAR].height-SN_STATUS_PANE_ICON_HP_BAR_SPAN-1;
SN_STATUS_PANE_ICON_XP_BAR_FLP = addArrayElement(Crd, Crd.last);
Crd[Crd.last-1].rleft = Crd[Crd.last-2].rleft; Crd[Crd.last-1].rtop = top_screen;
Crd[Crd.last-1].rright = Crd[Crd.last-2].rright; Crd[Crd.last-1].rbottom = top_screen;
Crd[Crd.last-1].width = Crd[Crd.last-2].width;
Crd[Crd.last-1].height = Crd[Crd.last-2].height;
Crd[Crd.last-1].x = Crd[Crd.last-2].x;
Crd[Crd.last-1].y = Crd[SN_STATUS_PANE_ICON_HP_BAR_FLP].y+Crd[SN_STATUS_PANE_ICON_HP_BAR_FLP].height+SN_STATUS_PANE_ICON_HP_BAR_SPAN+1;
SN_STATUS_PANE_ICON_XP_TEXT = addArrayElement(Crd, Crd.last);
Crd[Crd.last-1].rleft = left_screen; Crd[Crd.last-1].rtop = bottom_screen;
Crd[Crd.last-1].rright = left_screen; Crd[Crd.last-1].rbottom = bottom_screen;
Crd[Crd.last-1].width = Crd[SN_STATUS_PANE_ICON_HP_TEXT].width;
Crd[Crd.last-1].height = Crd[SN_STATUS_PANE_ICON_HP_TEXT].height;
Crd[Crd.last-1].x = Crd[SN_STATUS_PANE_ICON_HP_TEXT].x;
Crd[Crd.last-1].y = Crd[SN_STATUS_PANE_ICON_XP_BAR].y+SN_STATUS_PANE_ICON_HP_TEXT_Y_SPAN;
SN_STATUS_PANE_ICON_XP_TEXT_FLP = addArrayElement(Crd, Crd.last);
Crd[Crd.last-1].rleft = Crd[Crd.last-2].rleft; Crd[Crd.last-1].rtop = top_screen;
Crd[Crd.last-1].rright = Crd[Crd.last-2].rright; Crd[Crd.last-1].rbottom = top_screen;
Crd[Crd.last-1].width = Crd[Crd.last-2].width;
Crd[Crd.last-1].height = Crd[Crd.last-2].height;
Crd[Crd.last-1].x = Crd[Crd.last-2].x;
Crd[Crd.last-1].y = Crd[SN_STATUS_PANE_ICON_XP_BAR_FLP].y+SN_STATUS_PANE_ICON_HP_TEXT_Y_SPAN;
SN_STATUS_PANE_2STAT = addArrayElement(Crd, Crd.last);
Crd[Crd.last-1].rleft = left_screen; Crd[Crd.last-1].rtop = bottom_screen;
Crd[Crd.last-1].rright = left_screen; Crd[Crd.last-1].rbottom = bottom_screen;
Crd[Crd.last-1].width = 126;
Crd[Crd.last-1].height = 30;
Crd[Crd.last-1].x = Crd[SN_STATUS_PANE_ICON_HP_TEXT].x+Crd[SN_STATUS_PANE_ICON_HP_TEXT].width;
Crd[Crd.last-1].y = Crd[SN_STATUS_PANE_ICON_HP_BAR].y+crd_mini_icon_width+1;
SN_STATUS_PANE_2STAT_FLP = addArrayElement(Crd, Crd.last);
Crd[Crd.last-1].rleft = Crd[Crd.last-2].rleft; Crd[Crd.last-1].rtop = top_screen;
Crd[Crd.last-1].rright = Crd[Crd.last-2].rright; Crd[Crd.last-1].rbottom = top_screen;
Crd[Crd.last-1].width = Crd[Crd.last-2].width;
Crd[Crd.last-1].height = Crd[Crd.last-2].height;
Crd[Crd.last-1].x = Crd[Crd.last-2].x;
Crd[Crd.last-1].y = Crd[SN_STATUS_PANE_ICON_HP_BAR_FLP].y+crd_mini_icon_width+1;
SN_STATUS_PANE_STAT = new Array();
SN_STATUS_PANE_STAT_FLP = new Array();
SN_STATUS_PANE_STAT.last = 0;
SN_STATUS_PANE_STAT.row_curr = 1;
SN_STATUS_PANE_STAT.col_curr = 1;
SN_STATUS_PANE_STAT.row = 2;
SN_STATUS_PANE_STAT.col = 6;
SN_STATUS_PANE_STAT.max = 12;
for (SN_STATUS_PANE_STAT.curr = 1; SN_STATUS_PANE_STAT.curr <= SN_STATUS_PANE_STAT.max; SN_STATUS_PANE_STAT.curr++)
{
SN_STATUS_PANE_STAT[SN_STATUS_PANE_STAT.curr] = addArrayElement(Crd, Crd.last);
Crd[Crd.last-1].rleft = left_screen; Crd[Crd.last-1].rtop = bottom_screen;
Crd[Crd.last-1].rright = left_screen; Crd[Crd.last-1].rbottom = bottom_screen;
Crd[Crd.last-1].width = (Crd[SN_STATUS_PANE_BG].width-14)/6;
Crd[Crd.last-1].height = 30;
if (SN_STATUS_PANE_STAT.col_curr == 1)
Crd[Crd.last-1].x = Crd[SN_STATUS_PANE_PORTRAIT].x;
else
Crd[Crd.last-1].x = Crd[Crd.last-3].x+Crd[Crd.last-3].width;
if (SN_STATUS_PANE_STAT.row_curr == 1)
Crd[Crd.last-1].y = Crd[SN_STATUS_PANE_ICON_XP_BAR].y-Crd[Crd.last-1].height;
else
Crd[Crd.last-1].y = Crd[SN_STATUS_PANE_ICON_XP_BAR].y-Crd[Crd.last-1].height-Crd[Crd.last-3].height;
SN_STATUS_PANE_STAT_FLP[SN_STATUS_PANE_STAT.curr] = addArrayElement(Crd, Crd.last);
Crd[Crd.last-1].rleft = Crd[Crd.last-2].rleft; Crd[Crd.last-1].rtop = top_screen;
Crd[Crd.last-1].rright = Crd[Crd.last-2].rright; Crd[Crd.last-1].rbottom = top_screen;
Crd[Crd.last-1].width = Crd[Crd.last-2].width;
Crd[Crd.last-1].height = Crd[Crd.last-2].height;
if (SN_STATUS_PANE_STAT.col_curr == 1)
Crd[Crd.last-1].x = Crd[SN_STATUS_PANE_PORTRAIT_FLP].x;
else
Crd[Crd.last-1].x = Crd[Crd.last-3].x+Crd[Crd.last-3].width;
if (SN_STATUS_PANE_STAT.row_curr == 1)
Crd[Crd.last-1].y = Crd[SN_STATUS_PANE_ICON_XP_BAR_FLP].y+Crd[SN_STATUS_PANE_ICON_XP_BAR_FLP].height;
else
Crd[Crd.last-1].y = Crd[SN_STATUS_PANE_ICON_XP_BAR_FLP].y+Crd[SN_STATUS_PANE_ICON_XP_BAR_FLP].height+Crd[Crd.last-3].height;
if (SN_STATUS_PANE_STAT.col_curr == SN_STATUS_PANE_STAT.col)
{
SN_STATUS_PANE_STAT.row_curr++;
SN_STATUS_PANE_STAT.col_curr = 0;
}
SN_STATUS_PANE_STAT.col_curr++;
}
SN_STATUS_PANE_STAT.last = SN_STATUS_PANE_STAT.curr;
SN_STATUS_PANE_COMMAND = new Array();
SN_STATUS_PANE_COMMAND.tab = new Object();
SN_STATUS_PANE_COMMAND.list = new Object();
SN_STATUS_PANE_COMMAND.button = new Object();
SN_STATUS_PANE_COMMAND.tab.max = 13; // Maximum number of buttons (either single or lists).
SN_STATUS_PANE_COMMAND.list.max = 11; // Maximum number of entries in a list.
SN_STATUS_PANE_COMMAND.button.max = 5; // Number of tabs that are single buttons (no list).
SN_STATUS_PANE_COMMAND.split = 9; // When we reach this button, split the rows (remainder are vertical, not horizontal).
SN_STATUS_PANE_COMMAND.span = 2; // Spacing between lists.
for (loop = 0; loop < SN_STATUS_PANE_COMMAND.list.max+1; loop++)
SN_STATUS_PANE_COMMAND[loop] = new Array();
SN_STATUS_PANE_COMMAND_FLP = new Array();
for (loop = 0; loop < SN_STATUS_PANE_COMMAND.list.max+1; loop++)
SN_STATUS_PANE_COMMAND_FLP[loop] = new Array();
for (SN_STATUS_PANE_COMMAND.tab.curr = 1; SN_STATUS_PANE_COMMAND.tab.curr <= SN_STATUS_PANE_COMMAND.tab.max; SN_STATUS_PANE_COMMAND.tab.curr++)
{
for (SN_STATUS_PANE_COMMAND.list.curr = 1; SN_STATUS_PANE_COMMAND.list.curr <= SN_STATUS_PANE_COMMAND.list.max; SN_STATUS_PANE_COMMAND.list.curr++)
{
SN_STATUS_PANE_COMMAND[SN_STATUS_PANE_COMMAND.list.curr][SN_STATUS_PANE_COMMAND.tab.curr] = new Number( addArrayElement(Crd, Crd.last) );
Crd[Crd.last-1].rleft = left_screen; Crd[Crd.last-1].rtop = bottom_screen;
Crd[Crd.last-1].rright = left_screen; Crd[Crd.last-1].rbottom = bottom_screen;
Crd[Crd.last-1].width = crd_portrait_sml_width;
Crd[Crd.last-1].height = crd_portrait_sml_height;
SN_STATUS_PANE_COMMAND[SN_STATUS_PANE_COMMAND.list.curr][SN_STATUS_PANE_COMMAND.tab.curr].type = new Object();
SN_STATUS_PANE_COMMAND[SN_STATUS_PANE_COMMAND.list.curr][SN_STATUS_PANE_COMMAND.tab.curr].name = new Object();
SN_STATUS_PANE_COMMAND[SN_STATUS_PANE_COMMAND.list.curr][SN_STATUS_PANE_COMMAND.tab.curr].last = new Object();
if (SN_STATUS_PANE_COMMAND.tab.curr >= SN_STATUS_PANE_COMMAND.split)
{
if (SN_STATUS_PANE_COMMAND.list.curr == 1)
{
Crd[Crd.last-1].x = Crd[SN_STATUS_PANE_BG].x+Crd[SN_STATUS_PANE_BG].width;
if (SN_STATUS_PANE_COMMAND.tab.curr == SN_STATUS_PANE_COMMAND.split && SN_STATUS_PANE_COMMAND.list.curr == 1)
Crd[Crd.last-1].y = Crd[SN_STATUS_PANE_BG].y;
else
Crd[Crd.last-1].y = Crd[Crd.last-3].y+Crd[Crd.last-3].height;
}
else
{
Crd[Crd.last-1].x = Crd[Crd.last-3].x+Crd[Crd.last-3].width+SN_STATUS_PANE_COMMAND.span;
Crd[Crd.last-1].y = Crd[Crd.last-3].y;
}
}
else
{
if (SN_STATUS_PANE_COMMAND.list.curr == 1)
{
if (SN_STATUS_PANE_COMMAND.tab.curr == 1 && SN_STATUS_PANE_COMMAND.list.curr == 1)
Crd[Crd.last-1].x = Crd[SN_STATUS_PANE_BG].x;
else
Crd[Crd.last-1].x = Crd[Crd.last-3].x+Crd[Crd.last-3].width;
Crd[Crd.last-1].y = Crd[SN_STATUS_PANE_BG].y+Crd[SN_STATUS_PANE_BG].height;
}
else
{
Crd[Crd.last-1].x = Crd[Crd.last-3].x;
Crd[Crd.last-1].y = Crd[Crd.last-3].y+Crd[Crd.last-3].height+SN_STATUS_PANE_COMMAND.span;
}
}
SN_STATUS_PANE_COMMAND_FLP[SN_STATUS_PANE_COMMAND.list.curr][SN_STATUS_PANE_COMMAND.tab.curr] = addArrayElement(Crd, Crd.last);
Crd[Crd.last-1].rleft = Crd[Crd.last-2].rleft; Crd[Crd.last-1].rtop = top_screen;
Crd[Crd.last-1].rright = Crd[Crd.last-2].rright; Crd[Crd.last-1].rbottom = top_screen;
Crd[Crd.last-1].width = Crd[Crd.last-2].width;
Crd[Crd.last-1].height = Crd[Crd.last-2].height;
if (SN_STATUS_PANE_COMMAND.tab.curr >= SN_STATUS_PANE_COMMAND.split)
{
if (SN_STATUS_PANE_COMMAND.list.curr == 1)
{
Crd[Crd.last-1].x = Crd[SN_STATUS_PANE_BG].x+Crd[SN_STATUS_PANE_BG].width;
if (SN_STATUS_PANE_COMMAND.tab.curr == SN_STATUS_PANE_COMMAND.split && SN_STATUS_PANE_COMMAND.list.curr == 1)
Crd[Crd.last-1].y = Crd[SN_STATUS_PANE_BG].y;
else
Crd[Crd.last-1].y = Crd[Crd.last-3].y+Crd[Crd.last-3].height;
}
else
{
Crd[Crd.last-1].x = Crd[Crd.last-3].x+Crd[Crd.last-3].width+SN_STATUS_PANE_COMMAND.span;
Crd[Crd.last-1].y = Crd[Crd.last-3].y;
}
}
else
{
if (SN_STATUS_PANE_COMMAND.list.curr == 1)
{
if (SN_STATUS_PANE_COMMAND.tab.curr == 1 && SN_STATUS_PANE_COMMAND.list.curr == 1)
Crd[Crd.last-1].x = Crd[SN_STATUS_PANE_BG].x;
else
Crd[Crd.last-1].x = Crd[Crd.last-3].x+Crd[Crd.last-3].width;
Crd[Crd.last-1].y = Crd[SN_STATUS_PANE_BG].y+Crd[SN_STATUS_PANE_BG].height;
}
else
{
Crd[Crd.last-1].x = Crd[Crd.last-3].x;
Crd[Crd.last-1].y = Crd[Crd.last-3].y+Crd[Crd.last-3].height+SN_STATUS_PANE_COMMAND.span;
}
}
}
}
SN_STATUS_PANE_COMMAND_PROGRESS = addArrayElement(Crd, Crd.last);
Crd[Crd.last-1].rleft = left_screen; Crd[Crd.last-1].rtop = bottom_screen;
Crd[Crd.last-1].rright = left_screen; Crd[Crd.last-1].rbottom = bottom_screen;
Crd[Crd.last-1].width = crd_portrait_sml_width;
Crd[Crd.last-1].height = crd_portrait_sml_height;
Crd[Crd.last-1].x = Crd[SN_STATUS_PANE_BG].x+Crd[SN_STATUS_PANE_BG].width;
Crd[Crd.last-1].y = Crd[SN_STATUS_PANE_BG].y;
}
// ====================================================================
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)
listName = selection[0].actions.create.list.unit.toString();
break;
case action_tab_buildciv:
if (selection[0].actions.create.list.structciv)
listName = selection[0].actions.create.list.structciv.toString();
break;
case action_tab_buildmil:
if (selection[0].actions.create.list.structmil)
listName = selection[0].actions.create.list.structmil.toString();
break;
case action_tab_research:
if (selection[0].actions.create.list.tech)
listName = selection[0].actions.create.list.tech.toString();
break;
default:
return 0;
break;
}
if (listName != "")
{
// Enable tab portrait.
setPortrait("SN_STATUS_PANE_COMMAND_" + listCol + "_1", "sheet_action", "", listIcon);
guiUnHide("SN_STATUS_PANE_COMMAND_" + listCol + "_1");
// Store content info in tab button for future reference.
SN_STATUS_PANE_COMMAND[1][listCol].type = "list";
// Extract entity list into an array.
listArray = parseDelimiterString(listName, ";", listName.length);
// Reset list length.
SN_STATUS_PANE_COMMAND[1][listCol].last = 0;
// Populate appropriate command buttons.
for (createLoop = 0; createLoop < SN_STATUS_PANE_COMMAND.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("SN_STATUS_PANE_COMMAND_" + listCol + "_" + parseInt(createLoop+2), getEntityTemplate(UpdateListEntityName).traits.id.icon, selection[0].traits.id.civ_code, getEntityTemplate(UpdateListEntityName).traits.id.icon_cell);
getGUIObjectByName("SN_STATUS_PANE_COMMAND_" + listCol + "_" + parseInt(createLoop+2)).caption = "";
guiUnHide("SN_STATUS_PANE_COMMAND_" + listCol + "_" + parseInt(createLoop+2));
// Store content info in tab button for future reference.
SN_STATUS_PANE_COMMAND[parseInt(createLoop+2)][listCol].name = listArray[createLoop];
SN_STATUS_PANE_COMMAND[parseInt(createLoop+2)][listCol].last++;
}
else
guiHide("SN_STATUS_PANE_COMMAND_" + listCol + "_" + parseInt(createLoop+2));
}
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)
)
{
setPortrait("SN_STATUS_PANE_COMMAND_" + listCol + "_1", "sheet_action", "", listIcon);
guiUnHide("SN_STATUS_PANE_COMMAND_" + listCol + "_1");
// Store content info in tab button for future reference.
SN_STATUS_PANE_COMMAND[1][listCol].type = "command";
SN_STATUS_PANE_COMMAND[1][listCol].last = 0;
SN_STATUS_PANE_COMMAND[1][listCol].name = listIcon;
return (listCol-1);
}
else
return (listCol);
}
// ====================================================================
function PressCommandButton(GUIObject, list, tab)
{
switch (list)
{
case 1:
GUIObject.caption = "";
if (SN_STATUS_PANE_COMMAND[list][tab].type == "list")
{
//console.write("Clicked [" + list + "," + tab + "]: tab of type " + SN_STATUS_PANE_COMMAND[list][tab].type + "; " + SN_STATUS_PANE_COMMAND[list][tab].last + "; " + SN_STATUS_PANE_COMMAND[list][tab].name);
// Click the tab button to toggle visibility of its list (if it's of a list type).
GUIObjectToggle("SN_STATUS_PANE_COMMAND_" + tab + "_GROUP");
}
else
{
// Perform appropriate actions for different command buttons.
console.write("Clicked [" + list + "," + tab + "]: command of type " + SN_STATUS_PANE_COMMAND[list][tab].type + "; " + SN_STATUS_PANE_COMMAND[list][tab].last + "; " + SN_STATUS_PANE_COMMAND[list][tab].name);
switch (SN_STATUS_PANE_COMMAND[list][tab].name)
{
case action_patrol:
// setCursor(...)
selectLocation(
function (x, y) {
issueCommand(selection, NMT_Patrol, x, y);
});
break;
case action_attack:
// setCursor(...)
selectEntity(
function (target) {
issueCommand(selection, NMT_AttackMelee, target);
});
break;
}
}
break;
default:
// Left-clicked list button.
console.write("Clicked [" + list + "," + tab + "]: list of type " + SN_STATUS_PANE_COMMAND[list][tab].type + "; " + SN_STATUS_PANE_COMMAND[list][tab].name);
// Attempt to add the entry to the queue.
attempt_add_to_build_queue( selection[0], selection[0].traits.id.civ_code + "_" + SN_STATUS_PANE_COMMAND[list][tab].name, list, tab);
break;
}
}
// ====================================================================
function UpdateCommandButtons()
{
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 = SN_STATUS_PANE_COMMAND.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);
// Clear remaining buttons between them.
for (commandClearLoop = listCounter; commandClearLoop <= commandCounter; commandClearLoop++)
{
guiHide("SN_STATUS_PANE_COMMAND_" + commandClearLoop + "_1");
// If this slot could possibly contain a list, hide that too.
guiHide("SN_STATUS_PANE_COMMAND_" + commandClearLoop + "_GROUP");
}
}
// Update production queue.
GUIObject = getGUIObjectByName("SN_STATUS_PANE_COMMAND_PROGRESS");
// If the entity has a production item underway,
if (selection[0].actions.create && selection[0].actions.create.progress && selection[0].actions.create.progress.valueOf() && selection[0].actions.create.progress.valueOf().current && selection[0].actions.create.queue.valueOf() && selection[0].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("SN_STATUS_PANE_COMMAND_" + 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("SN_STATUS_PANE_COMMAND_" + 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 = "";
}
}
// ====================================================================
// Update-on-alteration trickery...
// We don't really want to update every single time we get a
// selection-changed or property-changed event; that could happen
// a lot. Instead, use this bunch of globals to cache any changes
// that happened between GUI updates.
// This boolean determines whether the selection has been changed.
var selectionChanged = false;
// This boolean determines what the template of the selected object
// was when last we looked
var selectionTemplate = null;
// This array holds the name of all properties that need to be updated
var selectionPropertiesChanged = new Array();
// This array holds a list of all the objects we hold property-change
// watches on
var propertyWatches = new Array();
// This function resets all the update variables, above
function resetUpdateVars()
{
if( selectionChanged )
{
for( watchedObject in propertyWatches )
propertyWatches[watchedObject].unwatchAll( selectionWatchHandler ); // Remove the handler
propertyWatches = new Array();
if( selection[0] )
{
// Watch the object itself
selection[0].watchAll( selectionWatchHandler );
propertyWatches.push( selection[0] );
// And every parent back up the tree (changes there will affect
// displayed properties via inheritance)
var parent = selection[0].template
while( parent )
{
parent.watchAll( selectionWatchHandler );
propertyWatches.push( selection[0] );
parent = parent.parent;
}
}
}
selectionChanged = false;
if( selection[0] )
{
selectionTemplate = selection[0].template;
}
else
selectionTemplate = null;
selectionPropertiesChanged = new Array();
}
// This function returns whether we should update a particular statistic
// in the GUI (e.g. "actions.attack") - this should happen if: the selection
// changed, the selection had its template altered (changing lots of stuff)
// or an assignment has been made to that stat or any property within that
// stat.
function shouldUpdateStat( statname )
{
if( selectionChanged || ( selectionTemplate != selection[0].template ) )
return( true );
for( var property in selectionPropertiesChanged )
{
// If property starts with statname
if( selectionPropertiesChanged[property].substring( 0, statname.length ) == statname )
return( true );
}
return( false );
}
// This function is a handler for the 'selectionChanged' event,
// it updates the selectionChanged flag
function selectionChangedHandler()
{
selectionChanged = true;
}
// Register it.
addGlobalHandler( "selectionChanged", selectionChangedHandler );
// This function is a handler for a watch event; it updates the
// selectionPropertiesChanged array
function selectionWatchHandler( propname, oldvalue, newvalue )
{
selectionPropertiesChanged.push( propname );
// This bit's important (watches allow the handler to change the value
// before it gets written; we don't want to affect things, so make sure
// the value we send back is the one that was going to be written)
return( newvalue );
}
function UpdateStatusOrb()
{
// Update heading.
if( shouldUpdateStat( "player" ) || shouldUpdateStat( "traits.id.civ" ) )
{
GUIObject = getGUIObjectByName("SN_STATUS_PANE_HEADING");
GUIObject.caption = selection[0].player.name; // Player name (placeholder; replace with proper callsign).
if (selection[0].traits.id.civ)
GUIObject.caption += " [icon=bullet_icon] " + selection[0].traits.id.civ;
}
// Update name text.
if( shouldUpdateStat( "traits.id" ) )
{
GUIObject = getGUIObjectByName("SN_STATUS_PANE_NAME1");
GUIObject.caption = "";
// Personal name.
if (selection[0].traits.id.personal && selection[0].traits.id.personal != "")
GUIObject.caption += selection[0].traits.id.personal + "\n";
// Generic name.
if (selection[0].traits.id.generic)
GUIObject.caption += selection[0].traits.id.generic + "\n";
// Specific/ranked name.
if (selection[0].traits.id.ranked)
{
GUIObject = getGUIObjectByName("SN_STATUS_PANE_NAME1");
GUIObject.caption += selection[0].traits.id.ranked + "\n";
}
else{
if (selection[0].traits.id.specific)
{
GUIObject.caption += selection[0].traits.id.specific + "\n";
}
}
}
if( shouldUpdateStat( "traits.id.icon" ) )
{
// Update portrait
if (selection[0].traits.id.icon)
setPortrait("SN_STATUS_PANE_PORTRAIT", selection[0].traits.id.icon, selection[0].traits.id.civ_code, selection[0].traits.id.icon_cell);
}
if( shouldUpdateStat( "traits.up.rank" ) )
{
// Update rank.
GUIObject = getGUIObjectByName("SN_STATUS_PANE_ICON_RANK");
if (selection[0].traits.up.rank > 1)
{
GUIObject.sprite = "ui_icon_sheet_statistic";
GUIObject.cell_id = stat_rank1 + (selection[0].traits.up.rank-2);
}
else
GUIObject.sprite = "";
}
if( shouldUpdateStat( "traits.health" ) )
{
// Update hitpoints
if (selection[0].traits.health.curr && selection[0].traits.health.max)
{
getGUIObjectByName("SN_STATUS_PANE_ICON_HP_TEXT").caption = Math.round(selection[0].traits.health.curr) + "/" + Math.round(selection[0].traits.health.max);
getGUIObjectByName("SN_STATUS_PANE_ICON_HP_TEXT").hidden = false;
getGUIObjectByName("SN_STATUS_PANE_ICON_HP_BAR").caption = ((Math.round(selection[0].traits.health.curr) * 100 ) / Math.round(selection[0].traits.health.max));
getGUIObjectByName("SN_STATUS_PANE_ICON_HP_BAR").hidden = false;
}
else
{
getGUIObjectByName("SN_STATUS_PANE_ICON_HP_TEXT").hidden = true;
getGUIObjectByName("SN_STATUS_PANE_ICON_HP_BAR").hidden = true;
}
}
if( shouldUpdateStat( "traits.up" ) )
{
// Update upgrade points
if (selection[0].traits.up && selection[0].traits.up.curr && selection[0].traits.up.req)
{
getGUIObjectByName("SN_STATUS_PANE_ICON_XP_TEXT").caption = Math.round(selection[0].traits.up.curr) + "/" + Math.round(selection[0].traits.up.req);
getGUIObjectByName("SN_STATUS_PANE_ICON_XP_TEXT").hidden = false;
getGUIObjectByName("SN_STATUS_PANE_ICON_XP_BAR").caption = ((Math.round(selection[0].traits.up.curr) * 100 ) / Math.round(selection[0].traits.up.req));
getGUIObjectByName("SN_STATUS_PANE_ICON_XP_BAR").hidden = false;
}
else
{
getGUIObjectByName("SN_STATUS_PANE_ICON_XP_TEXT").hidden = true;
getGUIObjectByName("SN_STATUS_PANE_ICON_XP_BAR").hidden = true;
}
}
if( shouldUpdateStat( "traits.garrison" ) )
{
// Update Supply/Garrison
GUIObject = getGUIObjectByName("SN_STATUS_PANE_2STAT");
GUIObject.caption = '';
if (selection[0].traits.garrison)
{
if (selection[0].traits.garrison.curr && selection[0].traits.garrison.max)
{
GUIObject.caption += '[icon="icon_statistic_garrison"] [color="100 100 255"]' + selection[0].traits.garrison.curr + '/' + selection[0].traits.garrison.max + '[/color] ';
}
}
}
if( shouldUpdateStat( "traits.supply" ) )
{
GUIObject = getGUIObjectByName("SN_STATUS_PANE_2STAT");
GUIObject.caption = '';
if (selection[0].traits.supply)
{
if (selection[0].traits.supply.curr && selection[0].traits.supply.max && selection[0].traits.supply.type)
{
// Special case for infinity.
if (selection[0].traits.supply.curr == "0" && selection[0].traits.supply.max == "0")
GUIObject.caption += '[icon="icon_resource_' + selection[0].traits.supply.type + '"] [color="100 100 255"] [icon="infinity_icon"] [/color] ';
else
GUIObject.caption += '[icon="icon_resource_' + selection[0].traits.supply.type + '"] [color="100 100 255"]' + selection[0].traits.supply.curr + '/' + selection[0].traits.supply.max + '[/color] ';
}
}
}
// Update Attack stats
if( shouldUpdateStat( "actions.attack" ) )
{
if (selection[0].actions.attack && selection[0].actions.attack.damage && selection[0].actions.attack.damage > 0)
getGUIObjectByName("SN_STATUS_PANE_STAT1").caption = '[icon="icon_statistic_attack"]' + selection[0].actions.attack.damage;
else
getGUIObjectByName("SN_STATUS_PANE_STAT1").caption = "";
if (selection[0].actions.attack && selection[0].actions.attack.hack && selection[0].actions.attack.hack > 0)
getGUIObjectByName("SN_STATUS_PANE_STAT2").caption = '[icon="icon_statistic_hack"]' + Math.round(selection[0].actions.attack.hack*100) + '%';
else
getGUIObjectByName("SN_STATUS_PANE_STAT2").caption = "";
if (selection[0].actions.attack && selection[0].actions.attack.pierce && selection[0].actions.attack.pierce > 0)
getGUIObjectByName("SN_STATUS_PANE_STAT3").caption = '[icon="icon_statistic_pierce"]' + Math.round(selection[0].actions.attack.pierce*100) + '%';
else
getGUIObjectByName("SN_STATUS_PANE_STAT3").caption = "";
if (selection[0].actions.attack && selection[0].actions.attack.crush && selection[0].actions.attack.crush > 0)
getGUIObjectByName("SN_STATUS_PANE_STAT4").caption = '[icon="icon_statistic_crush"]' + Math.round(selection[0].actions.attack.crush*100) + '%';
else
getGUIObjectByName("SN_STATUS_PANE_STAT4").caption = "";
if (selection[0].actions.attack && selection[0].actions.attack.range && selection[0].actions.attack.range > 0)
getGUIObjectByName("SN_STATUS_PANE_STAT5").caption = '[icon="icon_statistic_range"]' + selection[0].actions.attack.range;
else
getGUIObjectByName("SN_STATUS_PANE_STAT5").caption = "";
if (selection[0].actions.attack && selection[0].actions.attack.accuracy && selection[0].actions.attack.accuracy > 0)
getGUIObjectByName("SN_STATUS_PANE_STAT6").caption = '[icon="icon_statistic_accuracy"]' + Math.round(selection[0].actions.attack.accuracy*100) + '%';
else
getGUIObjectByName("SN_STATUS_PANE_STAT6").caption = "";
}
// Update Armour & Other stats
if( shouldUpdateStat( "traits.armour" ) )
{
if (selection[0].traits.armour && selection[0].traits.armour.value && selection[0].traits.armour.value > 0)
getGUIObjectByName("SN_STATUS_PANE_STAT7").caption = '[icon="icon_statistic_armour"]' + selection[0].traits.armour.value;
else getGUIObjectByName("SN_STATUS_PANE_STAT7").caption = "";
if (selection[0].traits.armour && selection[0].traits.armour.hack && selection[0].traits.armour.hack > 0)
getGUIObjectByName("SN_STATUS_PANE_STAT8").caption = '[icon="icon_statistic_hack"]' + Math.round(selection[0].traits.armour.hack*100) + '%';
else getGUIObjectByName("SN_STATUS_PANE_STAT8").caption = "";
if (selection[0].traits.armour && selection[0].traits.armour.pierce && selection[0].traits.armour.pierce > 0)
getGUIObjectByName("SN_STATUS_PANE_STAT9").caption = '[icon="icon_statistic_pierce"]' + Math.round(selection[0].traits.armour.pierce*100) + '%';
else getGUIObjectByName("SN_STATUS_PANE_STAT9").caption = "";
if (selection[0].traits.armour && selection[0].traits.armour.crush && selection[0].traits.armour.crush > 0)
getGUIObjectByName("SN_STATUS_PANE_STAT10").caption = '[icon="icon_statistic_crush"]' + Math.round(selection[0].traits.armour.crush*100) + '%';
else getGUIObjectByName("SN_STATUS_PANE_STAT10").caption = "";
}
if( shouldUpdateStat( "actions.move" ) )
{
if (selection[0].actions.move && selection[0].actions.move.speed)
getGUIObjectByName("SN_STATUS_PANE_STAT11").caption = '[icon="icon_statistic_speed"]' + selection[0].actions.move.speed;
else getGUIObjectByName("SN_STATUS_PANE_STAT11").caption = "";
}
if( shouldUpdateStat( "traits.vision" ) )
{
if (selection[0].traits.vision && selection[0].traits.vision.los)
getGUIObjectByName("SN_STATUS_PANE_STAT12").caption = '[icon="icon_statistic_los"]' + selection[0].traits.vision.los;
else getGUIObjectByName("SN_STATUS_PANE_STAT12").caption = "";
}
// Reveal Status Orb
getGUIObjectByName("session_status_orb").hidden = false;
// Update Command Buttons.
UpdateCommandButtons();
resetUpdateVars();
}

View File

@ -1,78 +0,0 @@
function initJukebox()
{
// ============================================= GLOBALS =================================================
// Background of jukebox.
JUKEBOX_BKG = addArrayElement(Crd, Crd.last);
Crd[Crd.last-1].rleft = left_screen; Crd[Crd.last-1].rtop = top_screen;
Crd[Crd.last-1].rright = right_screen; Crd[Crd.last-1].rbottom = bottom_screen;
Crd[Crd.last-1].x = 80; // 120;
Crd[Crd.last-1].y = 180; // 150;
Crd[Crd.last-1].width = Crd[Crd.last-1].x*2-Crd[Crd.last-1].x;
Crd[Crd.last-1].height = Crd[Crd.last-1].y*2-Crd[Crd.last-1].y;
// Title background of jukebox.
JUKEBOX_TITLEBAR = addArrayElement(Crd, Crd.last);
Crd[Crd.last-1].rleft = mid_screen; Crd[Crd.last-1].rtop = top_screen;
Crd[Crd.last-1].rright = mid_screen; Crd[Crd.last-1].rbottom = top_screen;
Crd[Crd.last-1].width = 200;
Crd[Crd.last-1].height = 32;
Crd[Crd.last-1].x = -(Crd[Crd.last-1].width/2);
Crd[Crd.last-1].y = Crd[JUKEBOX_BKG].y-Crd[Crd.last-1].height;
// Title left of jukebox.
JUKEBOX_TITLEBAR_LEFT = addArrayElement(Crd, Crd.last);
Crd[Crd.last-1].rleft = mid_screen; Crd[Crd.last-1].rtop = top_screen;
Crd[Crd.last-1].rright = mid_screen; Crd[Crd.last-1].rbottom = top_screen;
Crd[Crd.last-1].width = 50;
Crd[Crd.last-1].height = Crd[JUKEBOX_TITLEBAR].height;
Crd[Crd.last-1].x = -Crd[JUKEBOX_TITLEBAR].width+Crd[Crd.last-1].width;
Crd[Crd.last-1].y = Crd[JUKEBOX_TITLEBAR].y;
// Title right of jukebox.
JUKEBOX_TITLEBAR_RIGHT = addArrayElement(Crd, Crd.last);
Crd[Crd.last-1].rleft = mid_screen; Crd[Crd.last-1].rtop = top_screen;
Crd[Crd.last-1].rright = mid_screen; Crd[Crd.last-1].rbottom = top_screen;
Crd[Crd.last-1].width = Crd[JUKEBOX_TITLEBAR_LEFT].width;
Crd[Crd.last-1].height = Crd[JUKEBOX_TITLEBAR_LEFT].height;
Crd[Crd.last-1].x = -Crd[JUKEBOX_TITLEBAR].x;
Crd[Crd.last-1].y = Crd[JUKEBOX_TITLEBAR_LEFT].y;
// List of tracks.
JUKEBOX_LIST_FILE = addArrayElement(Crd, Crd.last);
Crd[Crd.last-1].rleft = left_screen; Crd[Crd.last-1].rtop = top_screen;
Crd[Crd.last-1].rright = right_screen; Crd[Crd.last-1].rbottom = bottom_screen;
Crd[Crd.last-1].x = Crd[JUKEBOX_BKG].x+50;
Crd[Crd.last-1].y = Crd[JUKEBOX_BKG].y+50;
Crd[Crd.last-1].width = Crd[Crd.last-1].x*2-Crd[Crd.last-1].x;
Crd[Crd.last-1].height = Crd[Crd.last-1].y*2-Crd[Crd.last-1].y+10;
// Combobox to select category of tracks to list.
JUKEBOX_CATEGORY = addArrayElement(Crd, Crd.last);
Crd[Crd.last-1].rleft = right_screen; Crd[Crd.last-1].rtop = bottom_screen;
Crd[Crd.last-1].rright = right_screen; Crd[Crd.last-1].rbottom = bottom_screen;
Crd[Crd.last-1].width = 90;
Crd[Crd.last-1].height = 35;
Crd[Crd.last-1].x = Crd[JUKEBOX_LIST_FILE].x;
Crd[Crd.last-1].y = Crd[JUKEBOX_BKG].y+10;
// Jukebox exit button.
JUKEBOX_EXIT_BUTTON = addArrayElement(Crd, Crd.last);
Crd[Crd.last-1].rleft = right_screen; Crd[Crd.last-1].rtop = top_screen;
Crd[Crd.last-1].rright = right_screen; Crd[Crd.last-1].rbottom = top_screen;
Crd[Crd.last-1].width = 16;
Crd[Crd.last-1].height = 16;
Crd[Crd.last-1].x = Crd[JUKEBOX_BKG].x-Crd[Crd.last-1].width-10;
Crd[Crd.last-1].y = Crd[JUKEBOX_BKG].y-Crd[Crd.last-1].height-10;
}
// ====================================================================
function jukeboxDisplay()
{
// // Display heading.
// JukeBoxBkg = getGUIObjectByName("JUKEBOX_TITLEBAR");
// JukeBoxBkg.caption = "Jukebox";
}
// ====================================================================

View File

@ -1,448 +0,0 @@
function initManual()
{
// ============================================ CONSTANTS ================================================
MANUAL = new Object();
MANUAL.span = 5;
// ============================================= GLOBALS =================================================
// Background of online manual.
MANUAL_BKG = addArrayElement(Crd, Crd.last);
Crd[Crd.last-1].rleft = left_screen; Crd[Crd.last-1].rtop = top_screen;
Crd[Crd.last-1].rright = right_screen; Crd[Crd.last-1].rbottom = bottom_screen;
Crd[Crd.last-1].width = 50;
Crd[Crd.last-1].height = 50;
Crd[Crd.last-1].x = 50;
Crd[Crd.last-1].y = 50;
// Online manual portrait.
MANUAL_PORTRAIT = addArrayElement(Crd, Crd.last);
Crd[Crd.last-1].rleft = left_screen; Crd[Crd.last-1].rtop = top_screen;
Crd[Crd.last-1].rright = left_screen; Crd[Crd.last-1].rbottom = top_screen;
Crd[Crd.last-1].width = crd_portrait_lrg_width;
Crd[Crd.last-1].height = crd_portrait_lrg_height;
Crd[Crd.last-1].x = Crd[MANUAL_BKG].x+10;
Crd[Crd.last-1].y = Crd[MANUAL_BKG].y+30;
// Online manual rollover.
MANUAL_ROLLOVER = addArrayElement(Crd, Crd.last);
Crd[Crd.last-1].rleft = left_screen; Crd[Crd.last-1].rtop = top_screen;
Crd[Crd.last-1].rright = right_screen; Crd[Crd.last-1].rbottom = top_screen;
Crd[Crd.last-1].width = 60;
Crd[Crd.last-1].height = Crd[MANUAL_PORTRAIT].height;
Crd[Crd.last-1].x = Crd[MANUAL_PORTRAIT].x+Crd[MANUAL_PORTRAIT].width+MANUAL.span;
Crd[Crd.last-1].y = Crd[MANUAL_PORTRAIT].y;
// Online manual history.
MANUAL_HISTORY = addArrayElement(Crd, Crd.last);
Crd[Crd.last-1].rleft = left_screen; Crd[Crd.last-1].rtop = bottom_screen;
Crd[Crd.last-1].rright = right_screen; Crd[Crd.last-1].rbottom = bottom_screen;
Crd[Crd.last-1].width = Crd[MANUAL_ROLLOVER].width;
Crd[Crd.last-1].height = Crd[MANUAL_ROLLOVER].height;
Crd[Crd.last-1].x = Crd[MANUAL_PORTRAIT].x;
Crd[Crd.last-1].y = 60;
// Online manual text.
MANUAL_NAME = addArrayElement(Crd, Crd.last);
Crd[Crd.last-1].rleft = left_screen; Crd[Crd.last-1].rtop = top_screen;
Crd[Crd.last-1].rright = right_screen; Crd[Crd.last-1].rbottom = bottom_screen;
Crd[Crd.last-1].width = Crd[MANUAL_HISTORY].width;
Crd[Crd.last-1].height = Crd[MANUAL_HISTORY].y+Crd[MANUAL_HISTORY].height+MANUAL.span;
Crd[Crd.last-1].x = Crd[MANUAL_HISTORY].x;
Crd[Crd.last-1].y = Crd[MANUAL_ROLLOVER].y+Crd[MANUAL_ROLLOVER].height+MANUAL.span;
// Online manual exit button.
MANUAL_EXIT_BUTTON = addArrayElement(Crd, Crd.last);
Crd[Crd.last-1].rleft = right_screen; Crd[Crd.last-1].rtop = top_screen;
Crd[Crd.last-1].rright = right_screen; Crd[Crd.last-1].rbottom = top_screen;
Crd[Crd.last-1].width = 16;
Crd[Crd.last-1].height = 16;
Crd[Crd.last-1].x = Crd[Crd.last-1].width+MANUAL.span*2-1;
Crd[Crd.last-1].y = Crd[Crd.last-1].height+MANUAL.span*2-1;
}
// ====================================================================
function manualDisplay()
{
// Display heading.
ManualBkg = getGUIObjectByName("MANUAL_BKG");
ManualBkg.caption = "In-Game Help: ";
if (selection[0].traits.id.civ)
ManualBkg.caption += selection[0].traits.id.civ + ": ";
if (selection[0].traits.id.generic)
ManualBkg.caption += selection[0].traits.id.generic + ": ";
if (selection[0].traits.id.specific)
ManualBkg.caption += selection[0].traits.id.specific;
// Display portrait.
if (selection[0].traits.id.icon)
{
setPortrait("MANUAL_PORTRAIT", selection[0].traits.id.icon, selection[0].traits.id.civ_code, selection[0].traits.id.icon_cell);
}
// Display rollover text.
if (selection[0].traits.id.rollover)
{
ManualRollover = getGUIObjectByName("MANUAL_ROLLOVER");
ManualRollover.caption = selection[0].traits.id.rollover;
}
ManualText = getGUIObjectByName("MANUAL_NAME");
ManualText.caption = "";
// Display name(s).
if (selection[0].traits.id.generic)
ManualText.caption += selection[0].traits.id.generic;
if (selection[0].traits.id.generic && selection[0].traits.id.specific)
ManualText.caption += " - ";
if (selection[0].traits.id.specific)
ManualText.caption += selection[0].traits.id.specific;
if (selection[0].traits.id.specific && selection[0].traits.id.ranked)
ManualText.caption += " - ";
if (selection[0].traits.id.ranked)
ManualText.caption += selection[0].traits.id.ranked;
// Personal name.
if (selection[0].traits.id.personal && selection[0].traits.id.personal != "")
ManualText.caption += " - " + selection[0].traits.id.personal;
ManualText.caption += "\n";
// Display civilisation.
if (selection[0].traits.id.civ && selection[0].traits.id.civ_code)
ManualText.caption += "Civilisation: " + selection[0].traits.id.civ + " (" + selection[0].traits.id.civ_code + ")" + "\n";
if (!selection[0].traits.id.civ_code)
ManualText.caption += "Civilisation: " + selection[0].traits.id.civ + "\n";
// Display player info.
if (selection[0].player){
if (selection[0].player.name)
ManualText.caption += "Player Name: " + selection[0].player.name + "\n";
if (selection[0].player.id)
ManualText.caption += "Player ID: " + selection[0].player.id + "\n";
if (selection[0].player.colour)
ManualText.caption += "Player Colour: " + selection[0].player.colour + "\n";
if (selection[0].player.controlled)
ManualText.caption += "Player Controlled: " + selection[0].player.controlled + "\n";
// if (players[])
// ManualText.caption += "Players[]: " + players[] + "\n";
}
// Display hitpoints.
if (selection[0].traits.health.curr && selection[0].traits.health.max && selection[0].traits.health)
ManualText.caption += "Hitpoints: " + selection[0].traits.health.curr + "/" + selection[0].traits.health.max + "\n";
// Display rank.
if (selection[0].traits.up.rank)
ManualText.caption += "Rank: " + selection[0].traits.up.rank + "\n";
// Display experience.
if (selection[0].traits.up && selection[0].traits.up.curr && selection[0].traits.up.req)
ManualText.caption += "XP: " + selection[0].traits.up.curr + "/" + selection[0].traits.up.req + "\n";
// Display population.
if (selection[0].traits.population)
{
if (selection[0].traits.population.sub)
ManualText.caption += "Pop: -" + selection[0].traits.population.sub + "\n";
if (selection[0].traits.population.add)
ManualText.caption += "Housing: +" + selection[0].traits.population.add + "\n";
}
// Display garrison.
if (selection[0].traits.garrison)
{
if (selection[0].traits.garrison.curr && selection[0].traits.garrison.max)
ManualText.caption += "Garrison: " + selection[0].traits.garrison.curr + "/" + selection[0].traits.garrison.max + "\n";
}
// Display supply.
if (selection[0].traits.supply)
{
if (selection[0].traits.supply.curr && selection[0].traits.supply.max && selection[0].traits.supply.type)
{
// If Supply is infinite,
if (selection[0].traits.supply.curr == "0" && selection[0].traits.supply.max == "0")
// Use infinity symbol.
ManualText.caption += "Supply: " + selection[0].traits.supply.curr + "/" + selection[0].traits.supply.max + " " + selection[0].traits.supply.type + " (" + selection[0].traits.supply.subtype + ")\n";
else
// Use numbers.
ManualText.caption += "Supply: 8 " + selection[0].traits.supply.type + " (" + selection[0].traits.supply.subtype + ")\n";
}
}
if (selection[0].traits.loot)
{
// Display UP on death.
if (selection[0].traits.loot.up)
ManualText.caption += "UP: " + selection[0].traits.loot.up + "\n";
// Display loot.
if (selection[0].traits.loot.food || selection[0].traits.loot.wood || selection[0].traits.loot.stone || selection[0].traits.loot.ore)
{
ManualText.caption += "Loot: ";
if (selection[0].traits.loot.food)
ManualText.caption += selection[0].traits.loot.food + " Food ";
if (selection[0].traits.loot.wood)
ManualText.caption += selection[0].traits.loot.wood + " Wood ";
if (selection[0].traits.loot.stone)
ManualText.caption += selection[0].traits.loot.stone + " Stone ";
if (selection[0].traits.loot.ore)
ManualText.caption += selection[0].traits.loot.ore + " Ore ";
ManualText.caption += "\n";
}
}
// Display minimap.
if (selection[0].traits.minimap)
{
if (selection[0].traits.minimap && selection[0].traits.minimap.type)
ManualText.caption += "Map Type: " + selection[0].traits.minimap.type + "\n";
if (selection[0].traits.minimap && selection[0].traits.minimap.red && selection[0].traits.minimap.green && selection[0].traits.minimap.blue)
ManualText.caption += "Map Colour: " + selection[0].traits.minimap.red + "-" + selection[0].traits.minimap.green + "-" + selection[0].traits.minimap.blue + "\n";
}
// Armour.
if (selection[0].traits.armour)
{
ManualText.caption += "Armour: ";
if (selection[0].traits.armour.value)
{
ManualText.caption += selection[0].traits.armour.value + " [";
if (selection[0].traits.armour.crush)
ManualText.caption += "Crush: " + Math.round(selection[0].traits.armour.crush*100) + "%, ";
if (selection[0].traits.armour.hack)
ManualText.caption += "Hack: " + Math.round(selection[0].traits.armour.hack*100) + "%, ";
if (selection[0].traits.armour.pierce)
ManualText.caption += "Pierce: " + Math.round(selection[0].traits.armour.pierce*100) + "%";
ManualText.caption += "]\n";
}
}
// Attack.
if (selection[0].actions.attack)
{
ManualText.caption += "Attack: ";
if (selection[0].actions.attack.damage)
{
ManualText.caption += selection[0].actions.attack.damage + " [";
if (selection[0].actions.attack.crush)
ManualText.caption += "Crush: " + Math.round(selection[0].actions.attack.crush*100) + "%, ";
if (selection[0].actions.attack.hack)
ManualText.caption += "Hack: " + Math.round(selection[0].actions.attack.hack*100) + "%, ";
if (selection[0].actions.attack.pierce)
ManualText.caption += "Pierce: " + Math.round(selection[0].actions.attack.pierce*100) + "%";
ManualText.caption += "]\n";
}
if (selection[0].actions.attack.range)
ManualText.caption += "Attack Range: " + selection[0].actions.attack.range + "\n";
if (selection[0].actions.attack.accuracy)
ManualText.caption += "Attack Accuracy: " + selection[0].actions.attack.accuracy*100 + "%\n";
}
// Speed.
if (selection[0].actions.move)
{
if (selection[0].actions.move.speed)
ManualText.caption += "Speed: " + selection[0].actions.move.speed + "\n";
// Turn Radius.
if (selection[0].actions.move.turningradius)
ManualText.caption += "TurnRadius: " + selection[0].actions.move.turningradius + "\n";
}
// Vision.
if (selection[0].traits.vision)
{
if (selection[0].traits.vision.los)
ManualText.caption += "LOS: " + selection[0].traits.vision.los + "\n";
}
// Classes.
if (selection[0].traits.id.class1)
ManualText.caption += "Class1: " + selection[0].traits.id.class1 + "\n";
if (selection[0].traits.id.class2)
ManualText.caption += "Class2: " + selection[0].traits.id.class2 + "\n";
if (selection[0].traits.id.class3)
ManualText.caption += "Class3: " + selection[0].traits.id.class3 + "\n";
// Name directory.
if (selection[0].traits.id.personal1 && selection[0].traits.id.personal2)
ManualText.caption += "Name File: " + selection[0].traits.id.personal1 + " & " + selection[0].traits.id.personal2 + "\n";
// Internal flag.
if (selection[0].traits.id.internal_only)
ManualText.caption += "Internal: " + selection[0].traits.id.internal_only + "\n";
// Icon.
if (selection[0].traits.id.icon)
ManualText.caption += "Icon: " + selection[0].traits.id.icon + "\n";
if (selection[0].traits.id.icon_cell)
ManualText.caption += "Icon_Cell: " + selection[0].traits.id.icon_cell + "\n";
// Version.
if (selection[0].traits.id.version)
ManualText.caption += "Version: " + selection[0].traits.id.version + "\n";
// Lists.
if (selection[0].actions.create && selection[0].actions.create.list)
{
if (selection[0].actions.create.list.unit)
ManualText.caption += "Trains: " + selection[0].actions.create.list.unit + "\n";
if (selection[0].actions.create.list.structciv || selection[0].actions.create.list.structmil)
{
ManualText.caption += "Builds: ";
if (selection[0].actions.create.list.structciv)
ManualText.caption += selection[0].actions.create.list.structciv + " ";
if (selection[0].actions.create.list.structmil)
ManualText.caption += selection[0].actions.create.list.structmil + " ";
ManualText.caption += "\n";
}
if (selection[0].actions.create.list.tech)
ManualText.caption += "Research: " + selection[0].actions.create.list.research + "\n";
}
// Display types.
if (selection[0].traits.id.type)
{
ManualTypeString = "";
if (selection[0].traits.id.type.gaia)
{
ManualTypeString += "gaia ";
if (selection[0].traits.id.type.gaia.group.aqua)
ManualTypeString += "gaia.group.aqua ";
if (selection[0].traits.id.type.gaia.group.fauna)
ManualTypeString += "gaia.group.fauna ";
if (selection[0].traits.id.type.gaia.group.flora)
ManualTypeString += "gaia.group.flora ";
if (selection[0].traits.id.type.gaia.group.geo)
ManualTypeString += "gaia.group.geo ";
if (selection[0].traits.id.type.gaia.group.resource)
ManualTypeString += "gaia.group.resource ";
}
if (selection[0].traits.id.type.unit)
{
ManualTypeString += "unit ";
if (selection[0].traits.id.type.unit.group.citizensoldier)
ManualTypeString += "unit.group.citizensoldier ";
if (selection[0].traits.id.type.unit.group.hero)
ManualTypeString += "unit.group.hero ";
if (selection[0].traits.id.type.unit.group.military)
ManualTypeString += "unit.group.military ";
if (selection[0].traits.id.type.unit.group.ship)
ManualTypeString += "unit.group.ship ";
if (selection[0].traits.id.type.unit.group.siege)
ManualTypeString += "unit.group.siege ";
if (selection[0].traits.id.type.unit.group.superunit)
ManualTypeString += "unit.group.superunit ";
if (selection[0].traits.id.type.unit.group.support)
ManualTypeString += "unit.group.support ";
if (selection[0].traits.id.type.unit.group.trade)
ManualTypeString += "unit.group.trade ";
if (selection[0].traits.id.type.unit.group.warship)
ManualTypeString += "unit.group.warship ";
if (selection[0].traits.id.type.unit.group.worker)
ManualTypeString += "unit.group.worker ";
if (selection[0].traits.id.type.unit.material.mechanical)
ManualTypeString += "unit.material.mechanical ";
if (selection[0].traits.id.type.unit.material.organic)
ManualTypeString += "unit.material.organic ";
if (selection[0].traits.id.type.unit.attack.melee)
ManualTypeString += "unit.attack.melee ";
if (selection[0].traits.id.type.unit.attack.ranged)
ManualTypeString += "unit.attack.ranged ";
if (selection[0].traits.id.type.unit.foot)
{
ManualTypeString += "unit.foot ";
if (selection[0].traits.id.type.unit.foot.bow)
ManualTypeString += "unit.foot.bow ";
if (selection[0].traits.id.type.unit.foot.javelin)
ManualTypeString += "unit.foot.javelin ";
if (selection[0].traits.id.type.unit.foot.sling)
ManualTypeString += "unit.foot.sling ";
if (selection[0].traits.id.type.unit.foot.spear)
ManualTypeString += "unit.foot.spear ";
if (selection[0].traits.id.type.unit.foot.sword)
ManualTypeString += "unit.foot.sword ";
}
if (selection[0].traits.id.type.unit.mounted)
{
ManualTypeString += "unit.mounted ";
if (selection[0].traits.id.type.unit.mounted.bow)
ManualTypeString += "unit.mounted.bow ";
if (selection[0].traits.id.type.unit.mounted.javelin)
ManualTypeString += "unit.mounted.javelin ";
if (selection[0].traits.id.type.unit.mounted.spear)
ManualTypeString += "unit.mounted.spear ";
if (selection[0].traits.id.type.unit.mounted.sword)
ManualTypeString += "unit.mounted.sword ";
if (selection[0].traits.id.type.unit.weapon.bow)
ManualTypeString += "unit.weapon.bow ";
if (selection[0].traits.id.type.unit.weapon.javelin)
ManualTypeString += "unit.weapon.javelin ";
if (selection[0].traits.id.type.unit.weapon.sling)
ManualTypeString += "unit.weapon.sling ";
if (selection[0].traits.id.type.unit.weapon.spear)
ManualTypeString += "unit.weapon.spear ";
if (selection[0].traits.id.type.unit.weapon.sword)
ManualTypeString += "unit.weapon.sword ";
}
}
if (selection[0].traits.id.type.structure)
{
ManualTypeString += "structure ";
if (selection[0].traits.id.type.structure.group.defensive)
ManualTypeString += "structure.group.defensive ";
if (selection[0].traits.id.type.structure.group.housing)
ManualTypeString += "structure.group.housing ";
if (selection[0].traits.id.type.structure.group.offensive)
ManualTypeString += "structure.group.offensive ";
if (selection[0].traits.id.type.structure.group.supply)
ManualTypeString += "structure.group.supply ";
if (selection[0].traits.id.type.structure.group.support)
ManualTypeString += "structure.group.support ";
if (selection[0].traits.id.type.structure.group.tower)
ManualTypeString += "structure.group.tower ";
if (selection[0].traits.id.type.structure.group.train)
ManualTypeString += "structure.group.train ";
if (selection[0].traits.id.type.structure.group.wall)
ManualTypeString += "structure.group.wall ";
if (selection[0].traits.id.type.structure.phase.cp)
ManualTypeString += "structure.phase.cp ";
if (selection[0].traits.id.type.structure.phase.tp)
ManualTypeString += "structure.phase.tp ";
if (selection[0].traits.id.type.structure.phase.vp)
ManualTypeString += "structure.phase.vp ";
if (selection[0].traits.id.type.structure.material.stone)
ManualTypeString += "structure.material.stone ";
if (selection[0].traits.id.type.structure.material.wood)
ManualTypeString += "structure.material.wood ";
}
if (ManualTypeString != "")
ManualText.caption = ManualText.caption + "Type(s): " + ManualTypeString + "\n";
}
// Display history text.
if (selection[0].traits.id.history)
{
ManualHistory = getGUIObjectByName("MANUAL_HISTORY");
ManualHistory.caption = "History: " + selection[0].traits.id.history;
}
}

View File

@ -1,47 +0,0 @@
function initSubWindows()
{
SN_INGAME_MENU_BG = addArrayElement(Crd, Crd.last);
Crd[Crd.last-1].rleft = mid_screen; Crd[Crd.last-1].rtop = mid_screen;
Crd[Crd.last-1].rright = mid_screen; Crd[Crd.last-1].rbottom = mid_screen;
Crd[Crd.last-1].x = -100;
Crd[Crd.last-1].y = -150;
Crd[Crd.last-1].width = (Crd[Crd.last-1].x * -1) * 2;
Crd[Crd.last-1].height = (Crd[Crd.last-1].y * -1) * 2;
SN_INGAME_MENU_BTN = new Object();
SN_INGAME_MENU_BTN.span = 5;
SN_INGAME_MENU_BTN_RETURN = addArrayElement(Crd, Crd.last);
Crd[Crd.last-1].rleft = mid_screen; Crd[Crd.last-1].rtop = mid_screen;
Crd[Crd.last-1].rright = mid_screen; Crd[Crd.last-1].rbottom = mid_screen;
Crd[Crd.last-1].width = Crd[SN_INGAME_MENU_BG].width;
Crd[Crd.last-1].height = 34;
Crd[Crd.last-1].x = Crd[SN_INGAME_MENU_BG].x;
Crd[Crd.last-1].y = Crd[SN_INGAME_MENU_BG].y+Crd[SN_INGAME_MENU_BG].height-Crd[Crd.last-1].height;
SN_INGAME_MENU_BTN_EXIT = addArrayElement(Crd, Crd.last);
Crd[Crd.last-1].rleft = mid_screen; Crd[Crd.last-1].rtop = mid_screen;
Crd[Crd.last-1].rright = mid_screen; Crd[Crd.last-1].rbottom = mid_screen;
Crd[Crd.last-1].width = Crd[SN_INGAME_MENU_BTN_RETURN].width;
Crd[Crd.last-1].height = Crd[SN_INGAME_MENU_BTN_RETURN].height;
Crd[Crd.last-1].x = Crd[SN_INGAME_MENU_BTN_RETURN].x;
Crd[Crd.last-1].y = Crd[SN_INGAME_MENU_BTN_RETURN].y-Crd[SN_INGAME_MENU_BTN_RETURN].height-SN_INGAME_MENU_BTN.span;
SN_INGAME_MENU_BTN_RESIGN = addArrayElement(Crd, Crd.last);
Crd[Crd.last-1].rleft = mid_screen; Crd[Crd.last-1].rtop = mid_screen;
Crd[Crd.last-1].rright = mid_screen; Crd[Crd.last-1].rbottom = mid_screen;
Crd[Crd.last-1].width = Crd[SN_INGAME_MENU_BTN_RETURN].width;
Crd[Crd.last-1].height = Crd[SN_INGAME_MENU_BTN_RETURN].height;
Crd[Crd.last-1].x = Crd[SN_INGAME_MENU_BTN_RETURN].x;
Crd[Crd.last-1].y = Crd[SN_INGAME_MENU_BTN_EXIT].y-Crd[SN_INGAME_MENU_BTN_EXIT].height-SN_INGAME_MENU_BTN.span;
SN_INGAME_MENU_BTN_JUKEBOX = addArrayElement(Crd, Crd.last);
Crd[Crd.last-1].rleft = mid_screen; Crd[Crd.last-1].rtop = mid_screen;
Crd[Crd.last-1].rright = mid_screen; Crd[Crd.last-1].rbottom = mid_screen;
Crd[Crd.last-1].width = Crd[SN_INGAME_MENU_BTN_RETURN].width;
Crd[Crd.last-1].height = Crd[SN_INGAME_MENU_BTN_RETURN].height;
Crd[Crd.last-1].x = Crd[SN_INGAME_MENU_BTN_RETURN].x;
Crd[Crd.last-1].y = Crd[SN_INGAME_MENU_BTN_RESIGN].y-Crd[SN_INGAME_MENU_BTN_RESIGN].height-SN_INGAME_MENU_BTN.span;
}
// ====================================================================

View File

@ -1,65 +0,0 @@
function initTeamTray()
{
SN_TEAM_TRAY = new Array();
SN_TEAM_TRAY.last = 0;
SN_TEAM_TRAY.max = 9;
for (SN_TEAM_TRAY.curr = 1; SN_TEAM_TRAY.curr <= SN_TEAM_TRAY.max; SN_TEAM_TRAY.curr++)
{
SN_TEAM_TRAY[SN_TEAM_TRAY.curr] = addArrayElement(Crd, Crd.last);
Crd[Crd.last-1].rleft = right_screen; Crd[Crd.last-1].rtop = bottom_screen;
Crd[Crd.last-1].rright = right_screen; Crd[Crd.last-1].rbottom = bottom_screen;
Crd[Crd.last-1].width = crd_portrait_sml_width;
Crd[Crd.last-1].height = crd_portrait_sml_height;
Crd[Crd.last-1].x = -(Crd[Crd.last-1].width/2);
if (SN_TEAM_TRAY.curr == 1)
Crd[Crd.last-1].y = Crd[SN_MINIMAP].height+(Crd[Crd.last-1].height/2);
else
Crd[Crd.last-1].y = Crd[Crd.last-2].y+Crd[Crd.last-2].width;
}
SN_TEAM_TRAY.last = SN_TEAM_TRAY.curr;
}
// ====================================================================
function SelectGroup(groupNumber)
{
// Set the current selection to the specified group (team) number, 1-9.
// If the group is already selected, centre on the group.
console.write( groupNumber );
if (groups[groupNumber].length > 0)
{
// If group already selected,
if (selection.equals( groups[groupNumber] ) )
{
// Find the average position of the group
position_avg = new Vector3D();
for( t = 0; t < selection.length; t++ )
position_avg = position_avg.add( selection[t].position );
position_avg = position_avg.divide( selection.length );
setCameraTarget( position_avg ); // Centre on it.
}
else
selection = groups[groupNumber]; // If not, select it.
}
}
// ====================================================================
function UpdateTeamTray()
{
// Enable a Team Tray icon if its group has been created.
for (SN_TEAM_TRAY.curr = 1; SN_TEAM_TRAY.curr < SN_TEAM_TRAY.last; SN_TEAM_TRAY.curr++)
{
if (groups[SN_TEAM_TRAY.curr].length > 0)
getGUIObjectByName("SN_TEAM_TRAY_" + SN_TEAM_TRAY.curr).hidden = false;
else
getGUIObjectByName("SN_TEAM_TRAY_" + SN_TEAM_TRAY.curr).hidden = true;
}
}
// ====================================================================

View File

@ -1,61 +0,0 @@
function getRandom(randomMin, randomMax)
{
// Returns a random whole number in a min..max range.
// NOTE: There should probably be an engine function for this,
// since we'd need to keep track of random seeds for replays.
randomNum = randomMin + (randomMax-randomMin)*Math.random(); // num is random, from A to B
return Math.round(randomNum);
}
// ====================================================================
function parseDelimiterString (parseString, Delimiter)
{
// Seeks through the delimiters in a string and populates the elements of an array with fields found between them.
// Declare local variables.
parseLoop = 0;
parseElement = 0;
seekDelimiter = 0;
parseArray = new Array();
// While we're still within the bounds of the string,
while (parseLoop <= parseString.length)
{
// Seek until we find a delimiter.
seekDelimiter = parseLoop;
while (parseString[seekDelimiter] != Delimiter && seekDelimiter <= parseString.length)
seekDelimiter++;
// If we found a delimiter within the string,
if (seekDelimiter != parseString.length)
{
// Store sub-string between start point and delimiter in array element.
parseArray[parseElement] = parseString.substring(parseLoop, seekDelimiter);
parseElement++;
}
// Move to after delimiter position for next seek.
parseLoop = seekDelimiter+1;
}
// Store length of array.
parseArray.length = parseElement;
return parseArray;
}
// ====================================================================
function addArrayElement(Array)
{
// Adds an element to an array, updates its given index, and returns the index of the element.
Array[Array.last] = new Object();
Array.last++;
return (Array.last - 1);
}
// ====================================================================

View File

@ -1,29 +0,0 @@
/* Global functions for GUI animation (sliding in/out, fading etc.) */
function GUISlideIn(GUIObject, SlideSpeed)
{
// Just me testing some stuff :)
var SlideObject = getGUIObjectByName(GUIObject);
var SizeVar = SlideObject.size;
//var Sizes = SizeVar.split(" ");
//var x_s = Sizes[0];
//var y_s = Sizes[1];
//var x_e = Sizes[2];
//var y_e = Sizes[3];
//var height = x_e - x_s;
//var Time = new Date();
//var StartTime = Time.getTime();
var i = 0;
while(i <= 2) {
i++;
SlideObject.size = new GUISize(x_s, 0 + i, x_e, 0 + i + height);
}
}

View File

@ -1,277 +0,0 @@
function initCoord()
{
// Initialise coordinate set for this page.
Crd = new Array();
Crd.last = 0;
// Screen percentages.
top_screen = 0;
left_screen = 0;
mid_screen = 50;
bottom_screen = 100;
right_screen = 100;
}
// ====================================================================
function AddSizeCoord(objectName, left1, top1, right1, bottom1, rleft1, rtop1, rright1, rbottom1, left2, top2, right2, bottom2, rleft2, rtop2, rright2, rbottom2)
{
// Used to store the two GUI style sizes for an object on creation (specified as coordinates).
// Used later by FlipGUI() to switch the objects to a new set of positions.
SizeCoord[SizeCoord.last] = new Object();
SizeCoord[SizeCoord.last].name = objectName;
SizeCoord[SizeCoord.last].size1 = new GUISize(left1, top1, right1, bottom1, rleft1, rtop1, rright1, rbottom1);
SizeCoord[SizeCoord.last].size2 = new GUISize(left2, top2, right2, bottom2, rleft2, rtop2, rright2, rbottom2);
SizeCoord.last++; // Increment counter for next entry.
}
// ====================================================================
function AddSizeString(objectName, size1, size2)
{
// Used to store the two GUI style sizes for an object on creation (specified as strings).
// Used later by FlipGUI() to switch the objects to a new set of positions.
SizeCoord[SizeCoord.last] = new Object();
SizeCoord[SizeCoord.last].name = objectName;
SizeCoord[SizeCoord.last].size1 = size1;
SizeCoord[SizeCoord.last].size2 = size2;
SizeCoord.last++; // Increment counter for next entry.
}
// ====================================================================
function setSize(objectName, sizeString)
{
// Use this function as a shortcut to change the size of a GUI control, specifying a size string.
getGUIObjectByName(objectName).size = sizeString;
}
// ====================================================================
function setSizeCoord(objectName, left, top, right, bottom, rleft, rtop, rright, rbottom)
{
// Use this function as a shortcut to change the size of a GUI control, specifying individual coordinates.
getGUIObjectByName(objectName).size = new GUISize(left, top, right, bottom, rleft, rtop, rright, rbottom);
}
// ====================================================================
function addSizeArray(objectArray, objectElement, objectX, objectY, objectWidth, objectHeight)
{
// Adds a x/y/width/height element to a given coordinate array.
objectArray[objectElement] = new Object();
objectArray[objectElement].width = objectWidth;
objectArray[objectElement].height = objectHeight;
objectArray[objectElement].x = objectX;
objectArray[objectElement].y = objectY;
return objectElement;
}
// ====================================================================
function addSizeArrayWH(objectArray, objectElement, objectWidth, objectHeight)
{
// Creates and adds a width/height element to a given coordinate array.
objectArray[objectElement] = new Object();
objectArray[objectElement].width = objectWidth;
objectArray[objectElement].height = objectHeight;
return objectElement;
}
// ====================================================================
function addSizeArrayXY(objectArray, objectElement, objectX, objectY)
{
// Adds a x/y element to a given coordinate array and increments.
objectArray[objectElement].x = objectX;
objectArray[objectElement].y = objectY;
objectElement++;
return objectElement;
}
// ====================================================================
function calcSizeArray(objectName, objectArrayElement, rleft, rtop, rright, rbottom)
{
// Use this function as a shortcut to change the size of a GUI control, via an array containing x, y, width, height and 4 relative sizes.
// Alternatively, specify 4 relative sizes to override and use these ones instead.
setSizeContainer = new Object();
// Override with relative parameter if given.
if (rleft && rtop && rright && rbottom)
{
objectArrayElement.rleft = rleft;
objectArrayElement.rtop = rtop;
objectArrayElement.rright = rright;
objectArrayElement.rbottom = rbottom;
}
setSizeContainer.rleft = objectArrayElement.rleft;
setSizeContainer.rtop = objectArrayElement.rtop;
setSizeContainer.rright = objectArrayElement.rright;
setSizeContainer.rbottom = objectArrayElement.rbottom;
// Define size dimensions.
switch (setSizeContainer.rleft)
{
case left_screen:
setSizeContainer.x1 = objectArrayElement.x;
break;
case right_screen:
setSizeContainer.x1 = -objectArrayElement.x-objectArrayElement.width;
break;
case mid_screen:
setSizeContainer.x1 = objectArrayElement.x;
break;
}
switch (setSizeContainer.rtop)
{
case top_screen:
setSizeContainer.y1 = objectArrayElement.y;
break;
case bottom_screen:
setSizeContainer.y1 = -objectArrayElement.y-objectArrayElement.height;
break;
case mid_screen:
setSizeContainer.y1 = objectArrayElement.y;
break;
}
switch (setSizeContainer.rright)
{
case left_screen:
setSizeContainer.x2 = objectArrayElement.x+objectArrayElement.width;
break;
case right_screen:
if (setSizeContainer.rleft == right_screen)
setSizeContainer.x2 = -objectArrayElement.x;
else
setSizeContainer.x2 = -objectArrayElement.width;
break;
case mid_screen:
setSizeContainer.x2 = objectArrayElement.x+objectArrayElement.width;
break;
}
switch (setSizeContainer.rbottom)
{
case top_screen:
setSizeContainer.y2 = objectArrayElement.y+objectArrayElement.height;
break;
case bottom_screen:
if (setSizeContainer.rtop == bottom_screen)
setSizeContainer.y2 = -objectArrayElement.y;
else
setSizeContainer.y2 = -objectArrayElement.height;
break;
case mid_screen:
setSizeContainer.y2 = objectArrayElement.y+objectArrayElement.height;
break;
}
return new GUISize(setSizeContainer.x1, setSizeContainer.y1, setSizeContainer.x2, setSizeContainer.y2, setSizeContainer.rleft, setSizeContainer.rtop, setSizeContainer.rright, setSizeContainer.rbottom);
}
// ====================================================================
function setSizeArray(objectName, objectArrayElement, rleft, rtop, rright, rbottom)
{
// Set appropriate size for dimensions.
getGUIObjectByName(objectName).size = calcSizeArray(objectName, objectArrayElement, rleft, rtop, rright, rbottom);
}
// ====================================================================
function addSizeCoordArray(objectName, objectArrayElement, objectArrayElement_Flp)
{
// Used to store the two GUI style sizes for an object on creation (specified as coordinates).
// Used later by FlipGUI() to switch the objects to a new set of positions.
// This uses the revised coordinate system, so it handles the flipping internally.
// If an optional secondary coordinate object is specified by parameter, it will
// use the values in this object for the flipped version, rather than automatically
// generating a top-down flip.
SizeCoord[SizeCoord.last] = new Object();
SizeCoord[SizeCoord.last].name = objectName;
// Determine relatives for the second size.
addSizeContainer = new Object();
if (objectArrayElement_Flp) // Specify new flipped coordinates from object.
{
addSizeContainer.rleft = objectArrayElement_Flp.rleft;
addSizeContainer.rtop = objectArrayElement_Flp.rtop;
addSizeContainer.rright = objectArrayElement_Flp.rright;
addSizeContainer.rbottom = objectArrayElement_Flp.rbottom;
addSizeContainer.width = objectArrayElement_Flp.width;
addSizeContainer.height = objectArrayElement_Flp.height;
addSizeContainer.x = objectArrayElement_Flp.x;
addSizeContainer.y = objectArrayElement_Flp.y;
}
else // Generate flipped version automatically.
{
addSizeContainer.rleft = objectArrayElement.rleft;
addSizeContainer.rtop = 100-objectArrayElement.rtop;
addSizeContainer.rright = objectArrayElement.rright;
addSizeContainer.rbottom = 100-objectArrayElement.rbottom;
if (addSizeContainer.rtop <= 0) addSizeContainer.rtop = 0;
if (addSizeContainer.rbottom <= 0) addSizeContainer.rbottom = 0;
if (addSizeContainer.rtop >= 100) addSizeContainer.rtop = 100;
if (addSizeContainer.rbottom >= 100) addSizeContainer.rbottom = 100;
addSizeContainer.x = objectArrayElement.x;
addSizeContainer.y = objectArrayElement.y;
addSizeContainer.width = objectArrayElement.width;
addSizeContainer.height = objectArrayElement.height;
if (addSizeContainer.rtop == 100 && objectArrayElement.y < 0) addSizeContainer.y = objectArrayElement.y*-1;
if (addSizeContainer.rbottom == 100 && objectArrayElement.y < 0) addSizeContainer.y = objectArrayElement.y*-1;
}
// Assign the two sizes to array for retrieval when needed.
SizeCoord[SizeCoord.last].size1 = calcSizeArray(objectName, objectArrayElement);
SizeCoord[SizeCoord.last].size2 = calcSizeArray(objectName, addSizeContainer);
SizeCoord.last++; // Increment counter for next entry.
}
// ====================================================================
function setCoordInputUpDown(setCoordObjectUp, setCoordObjectDn, parentInput, rleft, rtop, rright, rbottom)
{
// Set the coordinates for the up/down button for an input box.
setCoordObjectUp.rleft = rleft;
setCoordObjectUp.rtop = rtop;
setCoordObjectUp.rright = rright;
setCoordObjectUp.rbottom = rbottom;
setCoordObjectDn.rleft = rleft;
setCoordObjectDn.rtop = rtop;
setCoordObjectDn.rright = rright;
setCoordObjectDn.rbottom = rbottom;
setCoordObjectUp.width = (Crd[parentInput].width/5)+3;
setCoordObjectUp.height = (Crd[parentInput].height/2)+3;
setCoordObjectUp.x = Crd[parentInput].x+Crd[parentInput].width-setCoordObjectUp.width;
setCoordObjectUp.y = Crd[parentInput].y;
setCoordObjectDn.width = setCoordObjectUp.width;
setCoordObjectDn.height = setCoordObjectUp.height;
setCoordObjectDn.x = setCoordObjectUp.x;
setCoordObjectDn.y = Crd[parentInput].y+Crd[parentInput].height-setCoordObjectDn.height+2;
}
// ====================================================================

View File

@ -1,7 +0,0 @@
function UpdateFPSCounter(mouse)
{
g_mouse_x = mouse.x;
g_mouse_y = mouse.y;
getGUIObjectByName('FPS_Counter').caption = "FPS: " + getFPS() + " " + g_mouse_x + " " + g_mouse_y;
}

View File

@ -1,11 +0,0 @@
function GetAttrib(getAttribName)
{
// Simple helper function that elegantly checks if an entity attribute exists.
// Returns blank if it doesn't, or it's value if it does.
if (getAttribName)
return getAttribName;
else
return "";
}

View File

@ -1,114 +0,0 @@
/*
***************************************
functions_global.js
Functions to manipulate objects with
a 'list' property. It is important to
do this and not manually to ensure that
the selection is updated properly.
***************************************
*/
// Remove the item at the given index (pos) from the given list object (objectName).
function removeItem (objectName, pos)
{
var list = getGUIObjectByName (objectName).list;
var selected = getGUIObjectByName (objectName).selected;
list.splice(pos, 1);
getGUIObjectByName (objectName).list = list;
// It's important that we update the selection *after*
// we've committed the changes to the list.
// Update the selected so the same element remains selected.
if (selected == pos)
{
getGUIObjectByName (objectName).selected = -1;
}
else
if (selected > pos)
{
getGUIObjectByName (objectName).selected = selected - 1;
}
}
// ====================================================================
// Add the item at the given index (pos) to the given list object (objectName) with the given value (value).
function addItem (objectName, pos, value)
{
var list = getGUIObjectByName (objectName).list;
var selected = getGUIObjectByName (objectName).selected;
list.splice (pos, 0, value);
getGUIObjectByName (objectName).list = list;
// It's important that we update the selection *after*
// we've committed the changes to the list.
// Update the selected so the same element remains selected.
if (selected >= pos)
{
getGUIObjectByName (objectName).selected = selected + 1;
}
}
// ====================================================================
// Adds an element to the end of the list
function pushItem (objectName, value)
{
var list = getGUIObjectByName (objectName).list;
list.push (value);
getGUIObjectByName (objectName).list = list;
// No need to update selection
}
// ====================================================================
// Removes the last element
function popItem (objectName)
{
var selected = getGUIObjectByName (objectName).selected;
removeItem(objectName, getNumItems(objectName)-1);
If (selected == getNumItems(objectName)-1)
{
getGUIObjectByName(objectName).selected = -1;
}
}
// ====================================================================
// Retrieves the number of elements in the list
function getNumItems (objectName)
{
var list = getGUIObjectByName(objectName).list;
return list.length;
}
// ====================================================================
// Retrieves the value of the item at 'pos'
function getItemValue (objectName, pos)
{
var list = getGUIObjectByName(objectName).list;
return list[pos];
}
// ====================================================================
// Retrieves the value of the currently selected item
function getCurrItemValue (objectName)
{
if (getGUIObjectByName(objectName).selected == -1)
return "";
var list = getGUIObjectByName(objectName).list;
return list[getGUIObjectByName(objectName).selected];
}
// ====================================================================

View File

@ -1,109 +0,0 @@
// Audio functions (eg "pick a random sound from a list", "build a playlist") will go here.
// In the meantime, a quick run-down of the basic commands:
// Save the specified audio file to handle "s".
// s = new Sound( "audio/music/menu_track.ogg" );
// Play the sound stored at handle "s" one time (it'll be automatically freed when the playback ends):
// s.play();
// Play the sound stored at handle "s" continuously:
// s.loop();
// Close "s" and free it from memory (use in conjunction with loop()):
// s.free();
// Adjust the gain (volume) of a sound (floating point range between 0 (silent) and 1 (max volume)).
// s.SetGain(value);
// ====================================================================
function newRandomSound(soundType, soundSubType, soundPrePath)
{
// Return a random audio file by category, to be assigned to a handle.
switch (soundType)
{
case "music":
randomSoundPath = "audio/music/"
break;
case "voice":
randomSoundPath = soundPrePath + "/";
break;
default:
break;
}
// Get names of sounds (attack, command, select, hit, pain).
// or
// Get names of "peace", "menu" (theme) and "battle" tracks.
soundArray = buildFileList(randomSoundPath, "*" + soundSubType + "*", false);
if (soundArray.length == 0)
{
console.write("Failed to find sounds matching '*"+soundSubType+"*'");
return;
}
// Get a random number within the sound's range.
randomSound = getRandom(0, soundArray.length-1);
// Set name of track.
randomFileName = soundArray[randomSound];
// Build path to random audio file.
randomSoundPath = randomFileName;
console.write("Playing " + randomSoundPath + " ...");
return new Sound(randomSoundPath);
}
// ====================================================================
function FadeOut (soundHandle, Rate)
{
// Adjust the gain of a sound until it is zero.
for (fadeLoop = 1; fadeLoop > 0; fadeLoop = fadeLoop - Rate)
{
soundHandle.setGain(fadeLoop);
}
return true;
}
// ====================================================================
function FadeIn (soundHandle, Gain, Rate)
{
// Adjust the gain of a sound from zero up to the given value.
for (fadeLoop = 0; fadeLoop < Gain; fadeLoop = fadeLoop + Rate)
{
soundHandle.setGain(fadeLoop);
}
return true;
}
// ====================================================================
function CrossFade (outHandle, inHandle, Rate)
{
// Accepts two sound handles. Fades out the first and fades in the second at the specified rate.
// Note that it plays the in and frees the out while it's at it.
if (outHandle)
FadeOut(outHandle, Rate);
if (inHandle)
{
inHandle.play();
FadeIn(inHandle, 1, Rate);
}
if (outHandle)
outHandle.free();
return true;
}
// ====================================================================

View File

@ -1,86 +0,0 @@
function guiHide (objectName)
{
// Hide our GUI object
var guiObject = getGUIObjectByName (objectName);
guiObject.hidden = true;
}
// ====================================================================
function guiUnHide (objectName)
{
// Unhide our GUI object
var guiObject = getGUIObjectByName (objectName);
guiObject.hidden = false;
}
// ====================================================================
function guiToggle (objectName)
{
// Get our GUI object
var guiObject = getGUIObjectByName (objectName);
// Toggle it
guiObject.hidden = !guiObject.hidden;
}
// ====================================================================
function guiRenameAndReveal (objectName, objectCaption)
{
// Get our GUI object
var guiObject = getGUIObjectByName (objectName);
// Rename it
guiObject.caption = objectCaption;
// Toggle it
guiObject.hidden = false;
}
// ====================================================================
function guiModifyCaption (objectName, objectModifier, objectPlaces)
{
// Adds a modifier to a GUI object's caption (eg increase a number by 1).
// Obviously don't use this unless you're sure the caption contains a number.
// objectPlaces specifies the number of decimal places to use for a floating point number.
// If not specified, it defaults to zero (whole number).
// Get our GUI object
var guiObject = getGUIObjectByName (objectName);
if (!objectPlaces)
objectPlaces = 0;
objectPlaces = Math.pow (10, objectPlaces);
guiObject.caption = (Math.round (objectPlaces * guiObject.caption)
+ Math.round (objectPlaces * objectModifier) ) / objectPlaces;
}
// ====================================================================
function guiSetCaption (objectName, objectCaption)
{
// Sets an object's caption to the specified value.
// Get our GUI object
var guiObject = getGUIObjectByName (objectName);
guiObject.caption = objectCaption;
}
// ====================================================================
function guiSwitch (closeWindowName, openWindowName)
{
// Helper function that closes a given window (usually the current parent) and opens another one.
guiHide (closeWindowName);
guiUnHide (openWindowName);
}
// ====================================================================

View File

@ -1,40 +0,0 @@
function updateOrbital()
{
if( !getGUIObjectByName( 'arena' ).hidden )
{
g_ballx += g_balldx;
g_bally += g_balldy;
if (g_ballx > 600) {
g_balldx *= -0.9;
g_ballx = 600-(g_ballx-600);
}
else if (g_ballx < 0) {
g_balldx *= -0.9;
g_ballx = -g_ballx;
}
if (g_bally > 400) {
g_balldy *= -0.9;
g_bally = 400-(g_bally-400);
}
else if (g_bally < 0) {
g_balldy *= -0.9;
g_bally = -g_bally;
}
// Gravitate towards the mouse
var vect_x = g_ballx-g_mousex;
var vect_y = g_bally-g_mousey;
var dsquared = vect_x*vect_x + vect_y*vect_y;
if (dsquared < 1000) dsquared = 1000;
var force = 10000.0 / dsquared;
var mag = Math.sqrt(dsquared);
vect_x /= mag; vect_y /= mag;
g_balldx -= force * vect_x;
g_balldy -= force * vect_y;
var ball = getGUIObjectByName('ball');
var r=5;
ball.size = new GUISize(g_ballx-r, g_bally-r, g_ballx+r, g_bally+r);
}
}

View File

@ -1,65 +0,0 @@
<?xml version="1.0" encoding="iso-8859-1" standalone="no" ?>
<!DOCTYPE objects SYSTEM "../gui.dtd">
<!--
==========================================
- TEST STUFF, MISCELLANEOUS, ARCHIVE -
==========================================
-->
<objects>
<object type="text" name="wfg_logo" sprite="wfg_logo_128" size="20 20 148 148" z="100" hidden="true" />
<!--
==========================================
- ORBITAL BALL ARENA OBJECTS -
==========================================
These were the first things ever in the 0 A.D. GUI, and they are kept more or less for nostalgia reasons ;)
-->
<object type="text" name="arena" sprite="sprite1" size="0 0 600 500" z="100" hidden="true" textcolor="127 0 0">
<!-- stress-test the text renderer -->
Lorem ipsum dolor sit amet, consectetuer adipiscing elit. Integer nisl libero, ornare sit amet, feugiat sit amet, pretium vitae, tellus. Etiam tempor est vel neque rutrum congue. Quisque sed elit. Suspendisse vel tellus consectetuer lacus blandit varius. Etiam pretium malesuada turpis. Pellentesque urna justo, facilisis sodales, ultrices eget, pretium vestibulum, nibh. Mauris vulputate. Aliquam luctus feugiat felis. In venenatis, nulla eu suscipit auctor, turpis purus tincidunt arcu, non mattis pede urna nec est. Quisque sodales dolor sit amet odio. Suspendisse rutrum tellus ut sem. Vestibulum consequat est.
Sed nec quam sit amet mi blandit ornare. Phasellus condimentum varius urna. Suspendisse velit leo, feugiat sit amet, mattis quis, adipiscing placerat, enim. Vivamus dapibus. Fusce porta felis ac diam. Vestibulum mollis augue non quam. Vestibulum id sapien. Donec ornare felis non eros. Curabitur eget dui. Suspendisse potenti. Phasellus ultrices, sem ac consequat aliquet, felis tellus mollis dui, vitae imperdiet mi arcu eu augue. Duis libero neque, tristique eu, pellentesque et, facilisis sit amet, est. Vestibulum vehicula aliquam enim. Maecenas hendrerit nunc in orci sagittis ullamcorper. Donec cursus, sapien eget luctus tincidunt, mi ante accumsan leo, non fermentum diam ipsum ac tellus. Pellentesque ipsum sapien, mollis a, viverra eget, malesuada id, est. Sed nec tellus nec velit posuere euismod. Aenean turpis. Donec eu nibh. Fusce in libero.
Nunc bibendum metus a tellus. Nulla lorem metus, convallis id, lobortis eu, elementum ut, tellus. Suspendisse et risus sit amet arcu volutpat volutpat. Maecenas vel tortor id lectus suscipit suscipit. Maecenas condimentum ipsum eu augue. Nunc nisl. Etiam libero augue, gravida ac, imperdiet vel, sollicitudin ac, dui. Sed ullamcorper faucibus libero. Etiam egestas tellus vel justo. Etiam venenatis metus in pede. Pellentesque quam tellus, elementum eu, elementum ut, auctor a, velit. Suspendisse potenti. Quisque fermentum justo ut pede. Donec adipiscing, dolor ut consequat eleifend, neque nunc iaculis arcu, et nonummy elit tortor sed enim. Cras ultricies nunc ac massa. Ut turpis massa, sodales et, tincidunt vel, elementum eu, dolor.
<action on="Load"><![CDATA[
g_ballx = 300;
g_bally = 200;
g_balldx = 0;
g_balldy = 0;
g_mousex = 0;
g_mousey = 0;
setInterval( updateOrbital, 100 );
]]></action>
<action on="MouseOver"><![CDATA[
g_mousex = mouse.x;
g_mousey = mouse.y;
]]></action>
</object>
<object type="button" name="ball" sprite="sprite1" size="0 0 1 1" z="120" hotkey="orbital.cheat" hidden="true">
<action on="Press"><![CDATA[
writeConsole(mouse);
g_balldx = 0;
g_balldy = 0;
]]></action>
</object>
<object type="button" name="arena_button" sprite="sprite1" size="710 32 726 48" z="200" hotkey="orbital.toggle" font="prospero14" text_align="center" text_valign="center" hidden="true">v
<action on="Press"><![CDATA[
var arena = getGUIObjectByName('arena');
arena.hidden = !arena.hidden;
this.caption = arena.hidden ? 'v' : '^';
]]></action>
</object>
<!--
==========================================
- / ORBITAL BALL ARENA OBJECTS -
==========================================
-->
</objects>

View File

@ -1,272 +0,0 @@
<?xml version="1.0" encoding="iso-8859-1" standalone="no" ?>
<!DOCTYPE setup SYSTEM "..\gui.dtd">
<setup>
<!--
==========================================
- SETUP - SCROLLBARS
==========================================
-->
<scrollbar name="sb"
width="18"
minimum_bar_size="5"
sprite_button_top="sprite2"
sprite_button_top_over="null"
sprite_button_bottom="sprite2"
sprite_button_bottom_over="null"
sprite_back_vertical="grey"
sprite_bar_vertical="sprite2"
sprite_bar_vertical_over="null"
sprite_bar_vertical_pressed="null"
sprite_button_bottom_pressed="sprite2_pressed"
sprite_button_top_pressed="sprite2_pressed"
/>
<scrollbar name="sb2"
width="37"
minimum_bar_size="5"
sprite_button_top="scroll"
sprite_button_top_over="null"
sprite_button_bottom="scroll"
sprite_button_bottom_over="null"
sprite_back_vertical="null"
sprite_bar_vertical="scroll_bar"
sprite_bar_vertical_over="null"
sprite_bar_vertical_pressed="null"
sprite_button_bottom_pressed="scroll"
sprite_button_top_pressed="scroll"
/>
<scrollbar name="0ad_scrollbar"
width="12"
minimum_bar_size="4"
alwaysshown="false"
sprite_button_top="sprite2"
sprite_button_top_over="scroll"
sprite_button_bottom="sprite2"
sprite_button_bottom_over="scroll"
sprite_back_vertical="grey"
sprite_bar_vertical="sprite2"
sprite_bar_vertical_over="scroll"
sprite_bar_vertical_pressed="sprite2_pressed"
sprite_button_bottom_pressed="sprite2_pressed"
sprite_button_top_pressed="sprite2_pressed"
/>
<scrollbar name="manual_scrollbar"
width="12"
minimum_bar_size="4"
alwaysshown="false"
sprite_button_top="sprite2"
sprite_button_top_over="scroll"
sprite_button_bottom="sprite2"
sprite_button_bottom_over="scroll"
sprite_back_vertical="grey"
sprite_bar_vertical="sprite2"
sprite_bar_vertical_over="scroll"
sprite_bar_vertical_pressed="sprite2_pressed"
sprite_button_bottom_pressed="sprite2_pressed"
sprite_button_top_pressed="sprite2_pressed"
/>
<scrollbar name="atlas_scrollbar"
width="12"
minimum_bar_size="4"
alwaysshown="true"
sprite_button_top="atlas_global_button_up"
sprite_button_top_over="atlas_global_button_up_lit"
sprite_button_top_pressed="atlas_global_button_up_lit"
sprite_button_bottom="atlas_global_button_dn"
sprite_button_bottom_over="atlas_global_button_dn_lit"
sprite_button_bottom_pressed="atlas_global_button_dn_lit"
sprite_back_vertical="atlas_button"
sprite_bar_vertical="atlas_button"
sprite_bar_vertical_over="atlas_button_lit"
sprite_bar_vertical_pressed="atlas_button_lit"
/>
<!--
==========================================
- SETUP - ICONS
==========================================
-->
<!--
==========================================
- SETUP - ICONS - GENERIC
==========================================
-->
<icon name="0ad_icon"
sprite="0ad_icon"
size="16 16"
/>
<icon name="bullet_icon"
sprite="bullet_icon"
size="8 8"
/>
<icon name="infinity_icon"
sprite="infinity_icon"
size="16 16"
/>
<!--
==========================================
- SETUP - ICONS - RESOURCE
==========================================
-->
<icon name="icon_resource_food"
sprite="ui_icon_sheet_statistic"
cell_id="16"
size="20 20"
/>
<icon name="icon_resource_wood"
sprite="ui_icon_sheet_statistic"
cell_id="17"
size="20 20"
/>
<icon name="icon_resource_stone"
sprite="ui_icon_sheet_statistic"
cell_id="18"
size="20 20"
/>
<icon name="icon_resource_ore"
sprite="ui_icon_sheet_statistic"
cell_id="19"
size="20 20"
/>
<icon name="icon_resource_population"
sprite="ui_icon_sheet_statistic"
cell_id="20"
size="20 20"
/>
<!--
==========================================
- SETUP - ICONS - STATISTIC
==========================================
-->
<icon name="icon_statistic_garrison"
sprite="ui_icon_sheet_statistic"
cell_id="12"
size="20 20"
/>
<icon name="icon_statistic_rank1"
sprite="ui_icon_sheet_statistic"
cell_id="9"
size="20 20"
/>
<icon name="icon_statistic_rank2"
sprite="ui_icon_sheet_statistic"
cell_id="10"
size="20 20"
/>
<icon name="icon_statistic_rank3"
sprite="ui_icon_sheet_statistic"
cell_id="11"
size="20 20"
/>
<icon name="icon_statistic_hp"
sprite="ui_icon_sheet_statistic"
cell_id="13"
size="20 20"
/>
<icon name="icon_statistic_accuracy"
sprite="ui_icon_sheet_statistic"
cell_id="0"
size="20 20"
/>
<icon name="icon_statistic_armour"
sprite="ui_icon_sheet_statistic"
cell_id="2"
size="20 20"
/>
<icon name="icon_statistic_attack"
sprite="ui_icon_sheet_statistic"
cell_id="1"
size="20 20"
/>
<icon name="icon_statistic_crush"
sprite="ui_icon_sheet_statistic"
cell_id="8"
size="20 20"
/>
<icon name="icon_statistic_hack"
sprite="ui_icon_sheet_statistic"
cell_id="6"
size="20 20"
/>
<icon name="icon_statistic_los"
sprite="ui_icon_sheet_statistic"
cell_id="3"
size="20 20"
/>
<icon name="icon_statistic_pierce"
sprite="ui_icon_sheet_statistic"
cell_id="7"
size="20 20"
/>
<icon name="icon_statistic_range"
sprite="ui_icon_sheet_statistic"
cell_id="5"
size="20 20"
/>
<icon name="icon_statistic_speed"
sprite="ui_icon_sheet_statistic"
cell_id="4"
size="20 20"
/>
<!--
==========================================
- SETUP - TOOLTIPS
==========================================
-->
<tooltip name="pregame_mainmenu_tooltip"
use_object="pregame_mainmenu_tooltip"
delay="0"
hide_object="true"
/>
<tooltip name="atlas_tooltip"
use_object="ATLAS_TOOLTIP"
delay="0"
hide_object="true"
/>
<tooltip name="session_tooltip"
anchor="top"
buffer_zone="4"
delay="500"
font="tahoma12"
maxwidth="300"
offset="16 32"
sprite="session_tooltip_background"
textcolor="0 0 0"
/>
</setup>

File diff suppressed because it is too large Load Diff

View File

@ -1,657 +0,0 @@
<?xml version="1.0" encoding="iso-8859-1" standalone="no"?>
<!DOCTYPE styles SYSTEM "..\gui.dtd">
<styles>
<!--
==========================================
- DEFAULT STYLE: The style with the name 'default' is special, it will
- be called by every object before any other style is loaded.
==========================================
-->
<style name="default"
absolute="false"
enabled="true"
ghost="false"
hidden="false"
size="0 0 100% 100%"
z="0"
font="verdana12"
buffer_zone="5"
multiline="false"
/>
<!--
==========================================
- STYLE - GLOBAL - WHEAT SKIN - PANES
==========================================
-->
<style name="0ad_window"
sprite="0ad_window"
/>
<style name="0ad_window_titlebar"
size="50%-150 0%-25 50%+150 0%-9"
font="prospero18"
sprite="0ad_window_title"
text_align="center"
text_valign="center"
/>
<!--
==========================================
- STYLE - GLOBAL - WHEAT SKIN - CONTROLS
==========================================
-->
<style name="0ad_window_button"
sprite="message_box_button_normal"
sprite_over="message_box_button_over"
text_align="center"
text_valign="center"
/>
<style name="0ad_window_checkbox"
size="100%+9 0%-25 100%+25 0%-9"
sprite="exit_sprite"
sprite_over="exit_sprite_over"
tooltip="Close this window and return to the previous screen."
tooltip_style="pregame_mainmenu_tooltip"
/>
<style name="0ad_window_list"
buffer_zone="5"
font="verdana12"
scrollbar="true"
scrollbar_style="0ad_scrollbar"
sprite="atlas_indent"
sprite_selectarea="grey"
sprite_over="atlas_emboss"
textcolor="0 0 0"
textcolor_selected="255 255 255"
text_align="left"
text_valign="center"
/>
<style name="0ad_window_dropdown"
buffer_zone="5"
dropdown_buffer="6"
dropdown_size="130"
font="verdana12"
scrollbar="true"
scrollbar_style="0ad_scrollbar"
sprite="message_box_button_normal"
sprite_list="message_box_button_normal"
sprite_over="message_box_button_over"
sprite_selectarea="grey"
sprite2="message_box_button_normal"
sprite2_pressed="message_box_button_over"
textcolor="0 0 0"
textcolor_selected="255 255 255"
text_align="left"
text_valign="center"
/>
<!--
==========================================
- STYLE - GLOBAL - WHEAT SKIN - TEXT
==========================================
-->
<!--
=============================================================
- STYLE - GLOBAL - WHEAT SKIN - TEXT - LARGE HEADING
- Standard text. Largest heading. (eg "Player Slots" in host screen.)
=============================================================
-->
<style name="wheatTextHeadMaxBlack"
ghost="true"
font="giovanni22bold"
text_align="center"
textcolor="0 0 0"
/>
<!--
=============================================================
- STYLE - GLOBAL - WHEAT SKIN - TEXT - HEADING
- Standard text. Heading. (eg "Player Name").
=============================================================
-->
<style name="wheatTextHeadBlack"
ghost="true"
font="tahoma16"
textcolor="0 0 0"
/>
<style name="wheatTextHeadWhite"
ghost="true"
font="tahoma16"
textcolor="255 255 255"
/>
<style name="wheatTextHeadBlackRt"
ghost="true"
font="tahoma16"
text_align="right"
textcolor="0 0 0"
/>
<!--
=============================================================
- STYLE - GLOBAL - WHEAT SKIN - TEXT - SUBHEADING
- Standard text. Subheading.
=============================================================
-->
<style name="wheatTextHeadSubBlack"
ghost="true"
font="tahoma14"
textcolor="0 0 0"
/>
<!--
=============================================================
- STYLE - GLOBAL - WHEAT SKIN - TEXT - LABEL
- Standard text. Plain medium text (eg window text). Default.
=============================================================
-->
<style name="wheatTextLabelBlack"
ghost="true"
font="verdana12"
textcolor="0 0 0"
/>
<!--
=============================================================
- STYLE - GLOBAL - WHEAT SKIN - TEXT - SUB LABEL
- Standard text. Plain smaller label.
=============================================================
-->
<style name="wheatTextSubLabelBlack"
ghost="true"
font="verdana11"
textcolor="0 0 0"
/>
<!--
=============================================================
- STYLE - GLOBAL - WHEAT SKIN - TEXT - FOOTNOTE MAX
- Standard text. Large footnote.
=============================================================
-->
<style name="wheatTextFootMaxBlack"
ghost="true"
font="verdana10"
textcolor="0 0 0"
/>
<!--
=============================================================
- STYLE - GLOBAL - WHEAT SKIN - TEXT - FOOTNOTE
- Standard text. Normal footnote.
=============================================================
-->
<style name="wheatTextFootBlack"
ghost="true"
font="verdana9"
textcolor="0 0 0"
/>
<!--
=============================================================
- STYLE - GLOBAL - WHEAT SKIN - TEXT - SUBFOOTNOTE
- Standard text. Small subfootnote.
=============================================================
-->
<style name="wheatTextFootSubBlack"
ghost="true"
font="verdana8"
textcolor="0 0 0"
/>
<!--
=============================================================
- STYLE - GLOBAL - WHEAT SKIN - TEXT - FANCY - TITLEBAR
- Large and ornate. eg Window titlebar.
=============================================================
-->
<style name="fancyTextTitleGold"
ghost="true"
font="prospero18"
textcolor="237 227 167"
/>
<style name="fancyTextTitleWhite"
ghost="true"
font="prospero18"
textcolor="255 255 255"
/>
<!--
=============================================================
- STYLE - GLOBAL - WHEAT SKIN - TEXT - FANCY - HEADING
- Medium and ornate. eg Version number.
=============================================================
-->
<style name="fancyTextHeadGold"
ghost="true"
font="prospero16"
textcolor="237 227 167"
/>
<style name="fancyTextHeadWhite"
ghost="true"
font="prospero16"
textcolor="255 255 255"
/>
<!--
==========================================
- STYLE - GLOBAL - WHEAT SKIN - BORDERS
==========================================
-->
<style name="border_box_black"
sprite="only_black_border"
sprite_selectarea="grey"
textcolor="0 0 0"
textcolor_selected="255 255 255"
/>
<style name="border_box_black_verdana9"
font="verdana9"
sprite="only_black_border"
sprite_selectarea="grey"
textcolor="0 0 0"
textcolor_selected="255 255 255"
/>
<style name="divider_black"
sprite="only_black_border"
sprite_selectarea="grey"
textcolor="0 0 0"
textcolor_selected="255 255 255"
/>
<!--
==========================================
- STYLE - PREGAME - MAIN MENU
==========================================
-->
<style name="pregame_mainmenu_button"
tooltip_style="pregame_mainmenu_tooltip"
/>
<style name="pregame_mainmenu_checkbox"
sprite="exit_sprite"
sprite_over="exit_sprite_over"
tooltip="Close this window and return to the previous screen."
tooltip_style="pregame_mainmenu_tooltip"
/>
<!--
==========================================
- STYLE - PREGAME - SESSION
==========================================
-->
<style name="resource_counter"
text_valign="bottom"
text_align="right"
font="prospero16"
textcolor="255 255 255"
tooltip_style="session_tooltip"
ghost="false"
/>
<style name="control_group"
size="0 0 100% 100%"
/>
<style name="session_object"
tooltip_style="session_tooltip"
tooltip="(TBA)"
/>
<style name="session_button_object"
text_align="center"
text_valign="center"
sprite="message_box_button_normal"
sprite_over="message_box_button_over"
tooltip_style="session_tooltip"
tooltip="(TBA)"
/>
<style name="session_ghost_object"
tooltip_style="session_tooltip"
tooltip="(TBA)"
ghost="true"
/>
<style name="session_ghost_miniheading_object"
font="verdana8"
textcolor="200 200 200"
tooltip_style="session_tooltip"
tooltip="(TBA)"
ghost="true"
/>
<style name="session_ghost_subheading_object"
font="verdana10"
textcolor="200 200 200"
tooltip_style="session_tooltip"
tooltip="(TBA)"
ghost="true"
/>
<style name="session_ghost_subheading_center_object"
font="verdana10"
textcolor="200 200 200"
text_align="center"
tooltip_style="session_tooltip"
tooltip="(TBA)"
ghost="true"
/>
<style name="session_ghost_subheading_left_object"
font="verdana10"
textcolor="200 200 200"
text_align="left"
tooltip_style="session_tooltip"
tooltip="(TBA)"
ghost="true"
/>
<style name="session_ghost_midheading_object"
font="verdana11"
textcolor="255 255 255"
text_align="center"
text_valign="bottom"
tooltip_style="session_tooltip"
tooltip="(TBA)"
ghost="true"
/>
<style name="session_ghost_midheading_center_bottom_object"
font="verdana11"
textcolor="255 255 255"
text_align="center"
text_valign="bottom"
tooltip_style="session_tooltip"
tooltip="(TBA)"
ghost="true"
/>
<style name="session_ghost_heading_object"
font="verdana12"
textcolor="200 200 200"
tooltip_style="session_tooltip"
tooltip="(TBA)"
ghost="true"
/>
<style name="session_ghost_heading_left_object"
font="verdana12"
textcolor="200 200 200"
text_align="left"
tooltip_style="session_tooltip"
tooltip="(TBA)"
ghost="true"
/>
<style name="session_ghost_text_object"
font="verdana10"
textcolor="255 255 255"
tooltip_style="session_tooltip"
tooltip="(TBA)"
ghost="true"
/>
<style name="session_ghost_text_left_object"
font="verdana10"
textcolor="255 255 255"
text_align="left"
tooltip_style="session_tooltip"
tooltip="(TBA)"
ghost="true"
/>
<style name="session_ghost_text_left_centre_object"
font="verdana10"
textcolor="255 255 255"
text_align="left"
text_valign="center"
tooltip_style="session_tooltip"
tooltip="(TBA)"
ghost="true"
/>
<style name="session_minimap"
tooltip_style="session_tooltip"
tooltip=""
/>
<!-- Empty entity portrait. -->
<style name="portrait"
sprite="ui_portrait_default_square"
sprite_over="ui_portrait_default_square_lit"
sprite_disabled="ui_portrait_default_square_grey"
text_align="right"
textcolor="255 255 255"
tooltip_style="session_tooltip"
tooltip="(TBA)"
/>
<style name="portrait_progress"
sprite_background=""
sprite_bar="translucent_background"
text_align="center"
text_valign="center"
textcolor="255 255 255"
tooltip_style="session_tooltip"
tooltip="(TBA)"
/>
<style name="action"
sprite="ui_portrait_default_circle"
sprite_over="ui_portrait_default_circle_lit"
sprite_disabled="ui_portrait_default_circle_grey"
text_align="right"
textcolor="255 255 255"
tooltip_style="session_tooltip"
tooltip="(TBA)"
/>
<style name="action_left"
sprite="ui_portrait_default_circle"
sprite_over="ui_portrait_default_circle_lit"
sprite_disabled="ui_portrait_default_circle_grey"
text_align="left"
textcolor="255 255 255"
tooltip_style="session_tooltip"
tooltip="(TBA)"
/>
<!-- Entity progress bar. -->
<style name="group_portrait_bar"
sprite_background=""
sprite_bar="green_bar"
ghost="true"
tooltip_style="session_tooltip"
tooltip="(TBA)"
/>
<style name="up_bar"
sprite_background=""
sprite_bar="yellow_bar"
ghost="true"
tooltip_style="session_tooltip"
tooltip="(TBA)"
/>
<style name="blue_bar"
sprite_background=""
sprite_bar="blue_bar"
ghost="true"
tooltip_style="session_tooltip"
tooltip="(TBA)"
/>
<style name="blue_bar_outlined"
sprite_background="only_black_border"
sprite_bar="blue_bar_outlined"
ghost="true"
tooltip_style="session_tooltip"
tooltip="(TBA)"
/>
<!--
==========================================
- STYLE - BACKUP
- These are not in use, and are kept mainly
- for reference.
==========================================
-->
<style name="button"
sprite="sprite1"
sprite_pressed="sprite1_pressed"
sprite_disabled="sprite1_disabled"
sprite_over="sprite1_over"
sprite2="sprite1_ch"
sprite2_pressed="sprite2_pressed"
sprite2_disabled="sprite2_disabled"
/>
<!-- Atlas Editor -->
<style name="atlas_object"
tooltip_style="atlas_tooltip"
tooltip=""
textcolor="0 0 0"
font="tahoma10"
text_align="left"
text_valign="top"
/>
<style name="atlas_menu_button"
sprite="atlas_menubar_bkg"
sprite_over="atlas_emboss"
tooltip_style="atlas_tooltip"
tooltip="[font=tahoma10b]Menu Button[font=tahoma10]\nClick to open this menu."
textcolor="0 0 0"
font="tahoma10"
text_align="left"
text_valign="center"
/>
<style name="atlas_heading"
tooltip_style="atlas_tooltip"
tooltip=""
textcolor="0 0 0"
font="tahoma14"
text_align="center"
text_valign="center"
/>
<style name="atlas_sub_heading"
tooltip_style="atlas_tooltip"
tooltip=""
textcolor="0 0 0"
font="tahoma12"
text_align="center"
text_valign="center"
/>
<style name="atlas_label_text"
tooltip_style="atlas_tooltip"
tooltip=""
textcolor="0 0 0"
font="tahoma10"
text_align="center"
text_valign="center"
/>
<style name="atlas_input"
tooltip_style="atlas_tooltip"
tooltip=""
textcolor="0 0 0"
textcolor_selected="255 255 255"
font="tahoma10"
buffer_zone="3"
sprite="atlas_input_box"
sprite_selectarea="grey"
/>
<style name="atlas_button"
sprite="atlas_emboss"
sprite_over="atlas_indent"
sprite_pressed="atlas_indent"
tooltip_style="atlas_tooltip"
tooltip="[font=tahoma10b]Button[font=tahoma10]\nClick to do something."
textcolor="0 0 0"
font="tahoma10"
text_align="center"
text_valign="center"
/>
<style name="atlas_indent"
sprite="atlas_indent"
sprite_over="atlas_indent"
sprite_pressed="atlas_indent"
tooltip_style="atlas_tooltip"
tooltip=""
textcolor="0 0 0"
font="tahoma10"
text_align="center"
text_valign="center"
/>
<style name="atlas_tab"
sprite="atlas_global_tab"
sprite_over="atlas_global_tab_lit"
sprite_pressed="atlas_global_tab_lit"
tooltip_style="atlas_tooltip"
tooltip="[font=tahoma10b]Tab[font=tahoma10]\nClick to choose this category."
textcolor="0 0 0"
font="tahoma10"
text_align="center"
text_valign="center"
/>
<style name="atlas_icon"
sprite="atlas_sheet_icon_emboss"
sprite_over="atlas_sheet_icon_indent"
sprite_pressed="atlas_sheet_icon_indent"
tooltip_style="atlas_tooltip"
tooltip="[font=tahoma10b]Icon[font=tahoma10]\nClick to perform this function."
textcolor="0 0 0"
font="tahoma10"
text_align="center"
text_valign="center"
/>
<style name="atlas_icon_border"
sprite="atlas_sheet_icon"
sprite_over="atlas_sheet_icon_border"
sprite_pressed="atlas_sheet_icon_border"
tooltip_style="atlas_tooltip"
tooltip="[font=tahoma10b]Icon[font=tahoma10]\nClick to perform this function."
textcolor="0 0 0"
font="tahoma10"
text_align="center"
text_valign="center"
/>
</styles>

View File

@ -1,209 +0,0 @@
"It is easier to train one dog than it is to train a hundred sheep."
"Just because someone is foreign that doesn't give them the right not to speak English!"
"I'd make a wonderful new man if I wasn't such a lying cheating bastard..."
"When people start referring to you as sheep, you have to start worrying about their intentions."
"Sheep don't write essays saying why they shouldn't be herded into buildings and turned into lamb chops, do they."
"Wise man say, when setting out on the path of revenge, always dig two graves... You may be lucky and get one of your enemies' mates too."
"No matter how advanced a civilisation is, they will never invent something that means they don't have to chase baddies through corridors."
"Laziness is a good quality, laziness is the mother of genius, invention and ingenuity."
"There is an esoteric aspect here that our gardener hasn't quite sussed".
"Context is for the weak"
"Not enough people in the world believe in fairys."
"Can I torture them 'till they bleed?"
"I like shiny things, even if they don't physically shine. It takes a shiny thing collector to understand that concept."
"Wise man once say, when branching out from building hotels to building cruise liners, it is a good idea to seek advice from sailors."
"See, once more, Asphalt saves the day."
"The best measurement unit of bandwidth? ... Dollars I suspect."
"Mind you, I have taken so many opposing stances to stupid ideas, I can't actually remember what I really do believe any more."
"Of course it's tacky! Do you know how much extra you have to pay for something that will appeal to the modern Internet user?"
"If you nag me on this, I just minimise the little window and you go into the flashing psycho bar. No real skin off my nose!"
"The north has a lot to answer for in terms of music. It's all so grey and lacking in contrast. Dreay musicians with no character in their voices singing at the same monotonous dirge tone as their boringly played instruments. It's about as interesting as listening to a power supply."
"I like to think of myself as one of the New Age lords of Karma. I figure all the old ones have died so someone needs to keep up the traditions."
"It's a real shame that old people smell so much and break so easily. They would probably be great fun to hang around with otherwise."
"Do really cool websites have "fucking A" records?"
"I don't think they would know investigative journalism if it came with a huge sign and verbal announcements."
"You can garauntee that if I have pictures of naked women on my screen then I am working."
"I am going to convert all my Canadian Dollars to Turkish Lira. I can be an international money trader and make millions!"
"I like Canada, it's a shame about Canadians. They are just like Germans only they speak worse English."
"I don't play any game I can't cheat at, and if I can cheat there's no point in playing."
"Rabbits are not sentient... Rabbits are pies waiting to happen."
"I am more than happy to accept that people know more than me, most people know more than me, my main skill is just in knowing who they are."
"Why do people want to talk to me about security? They never actually want to listen to what I have to say."
"The Yahoo Auction site is sweet. It's like what nursery school kids would build if they were asked to create an auction site out of old washing up bottles and cereal boxes."
"Choosing friends is easy... Be a child again. Ask yourself if this person rang your doorbell and said 'Are you coming out to play?', would you go, or would you make an excuse? If you wouldn't want to play with them as a kid then what hope do you have as a grown up!"
"I have knives and guns, you have a teabag ... Let's be sensible!"
"You simply can't increase safety by protecting people more. People use the added protection as performance enhancing devices and the risks always remain constant. Put simply, airbags are the best go-faster stripes you could add to your car."
"The English like dates because dates show that we planted our flag first. If the fuzzy-wuzzies have neither flags nor calendars, then we can always show we planted our flag first, and therefore their land is actually ours!"
Michael's 10 second Steeley Eyed Dealer of Death Course: "Aquire target, take 2 shots, evaluate damage, reaquire target or if it's twitching aquire a new one, take 2 shots and repeat all of that until you, or all of the bad guys are dead."
"The English are not lazy as such, it's just that we just spend all our time learning good manners and other clever stuff rather than filling our heads with such nonesenses as foreign language, vocabulary and the mastery of gutteral contortions!"
"Tea is why the British Empire worked; which scarily is actually true! Before anyone knew what germs were, the British habit of making tea meant that the British pioneers didn't get killed in places like India and Africa, simply because they boiled the water they drank. Also tea is a natural antiseptic, and killed a lot of other weird tropical diseases so the British stayed alive whilst the other Europeans all died... Quite ironic really. It also allowed the slum based workers in the industrial revolution to survive in their terrible circumstances for the same reasons, meaning we developed a better home industrial base than any other country. Gin and Tonic helped too, but the reader is free to work that one out for themselves".
"I think Kids have a wonderful outlook on life and some brilliant ideas. It's when Kids start trying to act like grownups that the shit sets in and they start becoming deranged."
"You know they say that the world is starting to get fucked up because its best rapper is white and it's best golfer is black. How come they haven't noticed that the best tennis players players seem to be black now too...?"
"No wonder Blaire likes the US, it's just another little Britain being nurtured overseas... We never really left there did we? I think really it was a British long term plan to make them British without them realising it, then we could just join up with them a few hundred years later and so far, it's working beautifully."
"And no, I don't agree the lyrics were brilliant. They showed a complete lack of understanding about the word 'ironic' which was somewhat... Ironic. Somewhat akin to somebody writing a song about failed love and writing about a broken kidney." -- On Alanis Morissette's "Jagged Little Pill".
"If you are in a bad mood, for example, then going onto your system and putting everyone else in a foul mood should cheer you up no end. Rather like yoga but without all the stretching." -- Confessions.
"I just realised I was wiping my nose with a kangaroo's bollocks."
"I appear to be fundamentally and somewhat perversely drawn to meals you can eat with a spoon... I figure at the least this will help me in my old age."
"If I could eat my own cheesey goodness, why would I be chatting you up, dearest?"
"Every unsafe old version was a safe new version once."
"I don't read newspapers. I do read the Daily Mail sometimes, but only because they are easy to steal from Little Chefs."
"A glue gun it the answer! Well ... A Glue Gun is the answer to everything."
"If they stopped taking monogamy for granted in Soap Operas, they'd actually have to think up some real plot-lines."
"And not many people have had a Pterodactyl on a stick eaten by a Giant Tiger."
"I fear that was stretching the practical limits of comic-timing to extremes."
"If there is a God then I think it is his biggest joke ever making male and female humans look so similar that one could assume they are nearly the same."
"Never shag someone you wouldn't spend 4 weeks alone in the jungle with."
"I won't try and understand, my brain is small and mushy."
"My cats and I need to have words about how they treat my pornography."
"The US know that North Korea have nuclear weapons, and wants to go to war against them. The US know that Iraq wants to make nuclear weapons, and wants to go to war against them and the US knows that Israel has nuclear weapons and nobody says a thing."
"I guess you could say that some of Bush's speeches sound a bit similar to some of Churchills... The difference is that Churchill wrote his own Speeches whereas Bush probably can't even write his own name."
"If, after so many years, we can't even get anything approaching fair voting in the Eurovision Song Contest... What hope is there for a United European Parliament?"
"I pointed out to him that most of my skills were about 6,000 years to 200 years old anyway, so it didn't really matter; I have seen very little of modern security technology that would be unfamiliar in concept to an iron age hill fort designer."
"Someone accused me of being a tree hugger a few days ago, I pointed out that the last time I even got close to hugging a tree was whilst I was chainsawing down two of them that were in the way of me taking a good photograph."
"Should we visit him in prison and bake him a cake with somebody else's files in it?" -- (On Cliff Stanford being questioned by the police over allegations of reading other people's email)
"Incest may come with really good sex, but some of the other issues can be problematic."
"Being in a night-club also makes people think that they have the "right" to try and make me dance, which is fine, as long as they accept that I have the right to make their joints go in ways that they weren't meant to go thus causing them short term excrutiating pain. Unfortunately, they seem to not accept this balance of rights so it often causes problems."
"The one thing Americans should never, ever do is try and pass an opinion on Northern Ireland, not if they want to keep friends in either country anyway."
"On the subject of Irony and Americans: Unless it is them quoting somebody else or it comes with a canned laughter track; how on earth are we meant to spot it? It's like expecting quantum theory to come from the paws of squirrels."
"Drugs aside, there are two nearly sure-fire ways to get a woman into bed... A home cooked meal, preferably with an obscure home baked bread on the menu or alternatively, just buy her some wind-chimes."
"I am a crap photographer. I just happen to be in the right place occasionally when a good photograph appears."
"As far as their beligerancy towards humanity goes, goats and donkeys must be the most deadly animals on earth."
"There's nothing much new in the world... There just aren't many people with a decent knowledge of history."
"For the modern geek, Mac is the new black."
"It worries me that most of the quotes I collect are mine... One day I may have to start agreeing with people that I am egotistical and arrogant. Or maybe... I am just lazy?"
And quotes from other people, to prove I am not completely egotistical.
"Heaven has no rage like love to hatred turned. And hell no fury like a woman scorned." (William Congreve)
"To summon the demons of darkness, there is a price."
"If Barbie is so popular, why do you have to buy her friends?"
"Games are critical to a warlike society." Film: New Eden
"You must be careful what you pretend to be because, in the end, you are what you pretend to be" Film: Mother Night. (Kurt Vonnegut)
"Beware, toes you are stepping on today may be connected to the arse you are kissing tomorrow" Film: Body Count.
"Poor Crusty, he's like a black velvet sheet come to life" - Lisa Simpson
"But you got fired, and you still hang around like a big loser so why can't he?" - some witchy woman in Buffy the Vampire Slayer, the series.
"Aren't we forgetting the true meaning of this day? The birth of Santa." - Bart - Simpsons.
"What is your fascination with my forbidden closet of mystery?" - Chief Wigham - Simpsons.
"If you love something set it free if it comes back, it was and always will be yours. If it never returns, it was never yours to begin with"
"Then Fred said "let's have a cup of tea" and I said "Right oh!"".
"Officially, I am here quite unofficially". - Troughton, The two doctors.
"You can't keep blaming yourself. Just blame yourself once and then move on!" Homer Simpson.
"The first time you buy a shed is undoubtedly a weird experience but after the next time it'll be a lot easier." - Some email that Amy got.
"Spock knew nothing of children except that he had been one, had managed to get over it, and saw no need to dwell upon things that could not be helped."
"If you don't want children get a cat, they can be just as much trouble but at least you get the pleasure of outliving them." - Tim the Goth.
"My kids use the Internet far too much anyway. The only useful it has ever taught them is how to use the mouse with their left hands." - Radio 4.
"I am a psychopath so I guess the difference is I have to think about not hurting people, as opposed to just knowing what is bad. Personally, I can't see that as a bad thing because all I see with you normal people is y'all hurting one another all the time because you don't think." -- A sane loonie.
"Oh, no, my dear; I'm really a very good man, but I'm a very bad Wizard, I must admit." - Oz, The Wizard of Oz.
"Do I look like someone who cares what God thinks?" Pinhead - Hellraiser.
"That ideas should freely spread from one to another over the globe for the moral and mutual instruction of man, and improvement of his condition, seems to have been pecuiliarly and benevolently designed by nature, when she made them, like fire, expansible over all space, without lessening their density at any point, and like the air in which we breathe, move and have our physical being, incapable of confinement or exclusive appropriation. Inventions then cannot, in nature, be a subject of property." - Thomas Jefferson
"It's better to have people think you a fool, than to open your mouth, and remove all doubt." - Samuel Clemens / Mark Twain
"The nice thing about standards is that you have so many to choose from. Furthermore, if you do not like any of them, you can just wait for next year's model." - Andrew Tanenbaum
"Mr Secretary, you are paying me a lot of money to do what I do. Go home and let me earn it." - Michael Ironside, Seaquest 2032.
"I've really got to learn to do the damage and get out of town. It's the stay and gloat that gets me every time." - Ethan Hawke(?), Buffy.
"Everybody who I know is right always agrees with me." - Unknown.
"I see no more than you, but I have trained myself to notice what I see" - Sherlock Holmes.
"Sometimes when live in cage too long, whole world seems like very big place." - Mr Miyage, Karate Kid 4.
"He's a Lawyer, a sense of humour would only get in the way." -- Mr Roarke, Fantasy Island.
"In real life... there is no backspace key" -- Ayla
"Computer games don't affect kids; I mean if Pac-Man affected us as kids, we'd all be running around in darkened rooms, munching magic pills and listening to repetitive electronic music." -- Kristian Wilson, Nintendo, Inc, 1989
"Besides being an infallible cure for enemy constipation, the canister fire does much to alter the geography of the place." -- From the Commander of B Squadron, 1st Armoured Regiment, Royal Australian Armoured Corps, re the use of the 20 pounder gun of the long gone, but, never to be forgotten Centurian Tank, on active service in the Republic of South Viet Nam 1970.
"Certainly there is no hunting like the hunting of man and those who have hunted armed men long enough and liked it, never really care for anything else thereafter." -- Ernest Hemingway, April 1936 issue of Esquire. It was the first line of an article titled "On The Blue Water: A Gulf Stream Letter."
"The secret of success is sincerity. Once you can fake that, you've got it made." -- Jean Gieraudoux
"A single death is a tragedy, a million deaths is a statistic." -- Joseph Stalin.
"The plate in front of us is placed over an extra-wide letter box. So that even the largest cheques can get through. LAW OFFICE, it says." -- Peter Hoeg: Miss Smilla's Feeling for Snow.
"When you can't change the direction of the wind; adjust your sails" -- Max Depree.
Daniel: "Can you break a log like that?" Miyage: "Don't know, never been attacked by tree." -- Karate Kid II.
"I like babies and old people... What you see is what you get." -- Elly in Neighbours.
"Ritzys: London, Paris, New York, Accrington" -- Sign outside a Night Club in Accrington somewhere around 1985.
"This ain't a bridge... It's termites holding hands." -- Removal Van Driver in Chevy Chase's Funny Farm.
"But if you trusted me, you never would have known I was lying to you!" -- Susan in Diagnosis Murder.
"Imagination is more important than knowledge. Knowledge is limited. Imagination encircles the world." -- Albert Einstein.
"I hate everybody equally! I'm an equal opportunity hater." -- Jerry ex-sas.
"Don't try to teach a pig to sing; it will waste your time and will only annoy the pig." -- old Yiddish saying.
"A fool cannot be protected from his folly. If you attempt to do so, you will not only arouse his animosity but also you will be attempting to deprive him of whatever benefit he is capable of deriving from experience. Never attempt to teach a pig to sing; it wastes your time and annoys the pig." -- Lazarus Long - Time Enough for Love (though the pig quote is more than likely borrowed from an old Yiddish saying above).
"But the polysemic champion must be 'set'. Superficially it looks like a wholly unassuming monosyllable, the verbal equivalent of the single-celled organism. Yet it has 58 uses as a noun, 126 as a verb, and 10 as a participal adjective. Its meanings are so various and scattered that it takes the OED 60,000 words - the length of a short novel - to discuss them all. A foreigner could be excused for thinking that to know 'set' is to know English." -- Bill Bryson, Mother Tongue.
"Hah! I remember when the police officers used to tell me, 'Slow down'. Now, it's the fucking doctors!" -- Ralph.
"I've got nothing against poofters... but I was bought up to believe that dicky up the chuffter is abnormal, and vile" -- Oz, Auf Wiedersehen Pet.
"[Apartheid] began before I was born and will probably be resolved long after I die. In the meantime I want to run." -- Zola Budd.
"Never wear your best pants when you go to fight for freedom." -- Fortune cookie - http://home.nc.rr.com/rellis/fortunes/best_pants.htm
"You are going to ruin my reputation long before you get to ruin me." -- Unknown.
"In the end, it all comes down to dancing in silly hats." -- Terry Wogan, Eurovision 2002.
"If God didn't mean for us to eat this animal, why did he make it out of turkey?" -- Clueless.
"Yea, it was cute! Like a puppy with a glock." -- Sofie.
"Girls are like internet domain names, the ones I like are already taken."
"Your Hobbies and Interests cannot exceed 255 characters." -- msn.com
"You can always rely on the Americans to do the right thing... After they've tried everything else" -- Winston Churchill
"That money talks, I'll not deny. I heard it once. It said, 'Goodbye.'" -- Richard Armour
".. No one who has something original or important to say will willingly run the risk of being misunderstood; people who write obscurely are either unskilled in writing or up to mischief." -- Peter Medawar
"More information about asparagus can be found at http://www.asparagus.org/" -- From http://www.studentbmj.com/back_issues/0800/education/277.html
"Against the assault of laughter nothing can stand." -- Mark Twain
""There's nothing wrong with having nothing in common, otherwise there'd be no point in having two of us" -- Ben in My Family.
"Hey Mr Burns, can I go with you to get the treasure? I won't eat much and I don't know the difference between right and wrong." -- Bart Simpson.
"When one burns one's bridges, what a very nice fire it makes." -- Dylan Thomas.
"Charlotte Church: Voice of an Angel, brain of a Goldfish." -- RI:SE Newsreader.
"In Italy for thirty years under the Borgias they had warfare, terror, murder, bloodshed; they produced Michelangelo, Leonardo da Vinci and the Renaissance. In Switzerland they had brotherly love, five hundred years of democracy and peace, and what did they produce? The cuckoo clock!" -- Orson Welles in The Third Man (1949).
"I believe what I said yesterday I don't know what I said but I know what I think and I assume its what I said."
"I am shocked - sort of"
"You know I'm not a lawyer - I don't do that"
"If I know the answer I'll tell you the answer and if I don't I'll just respond cleverly"
"Boys are stupid. Throw rocks at them."
"You're acting like you think the world doesn't need a 170 MPH SUV. Are you some sort of tree-hugging commie?" -- Steve Gombosi.
"O what a tangled web we weave When first we practise to deceive! But when we've practised quite a while How vastly we improve our style!" -- A Word Of Encouragement by J. R. Pope
"They are basically witless midgets who spend most of their time trying to kill themselves" -- Dylan Moran on children.
"I just don't trust something that bleeds for five days and doesn't die." -- Mr Garrison, Southpark.
"Lisa: Let's put it on the Internet! Bart: No. We have to reach people who's opinions actually matter." -- Simpsons.
"A little knowledge is a dangerous thing. A little knowledge of Psychology is downright lethal." -- Amy in Judging Amy.
"I think I have monogamy, I must have caught it from you people!" -- Samantha in Sex and the City.
"Still, if you will not fight for the right when you can easily win without bloodshed, if you will not fight when your victory will be sure and not so costly, you may come to the moment when you will have to fight with all the odds against you and only a precarious chance for survival. There may be a worse case. You may have to fight when there is no chance of victory, because it is better to perish than to live as slaves." -- Sir Winston Churchill.
"Don't forget what happened to the man who got everything he ever wanted... He lived happily ever after." -- Charlie, in his Chocolate Factory.
"I should have known, no human being is that humane." -- Ripley, Alien 4.
"If you hang out with me for long enough, you will find out I am not a man with whom to fuck" -- A rather incongruous quote from a bad pirate guy on Alien 4.
"Vampires are bloodsuckers to whom the concept of honour is meaningless" -- Vampire Hunter D.
"Lorry is the mental equivalent of a Dark Alley" -- Alan Cox.
"Carpe diem, quam minimum credula postero" ("Seize the day, put no trust in the morrow") -- Horace.
"The sociopath, lacking the restraints that hold a normal character together can become anything. Ammorality frees her to be universally perfect. A charming chameleon with a scorpion's tail."
"A sociopath with no restraints can become anything... Ammorality frees her to be universally perfect, a charming chameleon with a scorpion's tail..." -- Color of Night
"I don't want to spoil Lawrie's fun or reputation here, but I feel duty bound to point out that you're writing to someone about an article they wrote that may be true or may be ironic, and in either case you can't be sure whether their reply is true or ironic. There are few Englishmen who, faced with questions from an earnest, truth-seeking American, would be able to resist exploiting their gullability and winding them up something rotten." -- Richard Bartle on "Confessions of an Arch-Wizard".
"I was a Wiccan for a few months, but then I realised it was like being a Brownie and I gave up." -- Gemma.
"... He speaks English like he hates it." -- some film called "Never So Few".
"You know what four dollars buys today? It doesn't even buy three dollars." -- Tony's dad in Saturday Night Fever.
"(It's so easy interrogating a German because they are so scared.) You send in a naked woman and a bottle of whisky and they'll tell you anything" -- John Le Carre's daughter quoting him.
Zorro: "Do you know how to use that thing?" (pointing at a sword) Alejandro: "Yes, the pointy end goes into the other man." -- Mask of Zorro.
[On the subject of Britain outsourcing call-centre jobs to other countries] "... When you call British Rail now to find the next train to London you get put through to Bangladesh and when you call Number 10 [Downing Street] you get through to The Whitehouse." -- Tony Benn.
"So, do you cook a lot of kosher food at home?" -- Ainsley Harriet to a conformant Jew.
"You're off the edge of the map mate; here there be monsters." -- Pirates of the Caribbean.
"You know, London! Cup o' tea, bad food, worse weather, Mary fucking Poppins... London!" -- Snatch
"For I am a bear of very little brain, and long words bother me." -- Pooh.
"God created a bard, and from the waste left over, three critics." -- Unknown.
"To wives and sweet hearts - And may the two never meet." -- Old Sailors' Toast.
"This made the tea undrinkable... Even for Americans" -- From Mary Poppins on the subject of the Boston Tea Party.
"Sanity is not statistical." -- Orwell's 1984.
"Printing is ruining bookselling. The end of the world is upon us." -- Victor Hugo, Hunchback of Notre-Dame.
"Largely because Murdoch told him to. That's democray, one man one vote." -- Ian Pissflaps on "Have I got news for you" on the subject of Blair changing his mind on the EU constitution.
"Flight controller zero looking very carefully at the situation. Obviously a major malfunction" -- NASA's live commentry on the Challenger Shuttle blowing up.
"I am not even allowed a key; you swallow the thing one time and all of a sudden you are the weird key swallower who can't be trusted." -- Lab Technician in Legally Blonde 2.
"The only thing necessary for the triumph of evil is for good men to do nothing." -- Sir Edmund Burke
"If someone tries to kill you you try to kill 'em right back!" -- Firefly.
"Those that knew him best deplored him most" -- Epitath.
"There are a thousand hacking at the branches of evil to one who is striking at the root." -- Henry Thoreau
"The wicked are always suprised to find that the good can be clever." -- Marquis de Vauvenargues.
"Most of the evils of life arise from man's being unable to sit still in a room." -- Blaise Pascal.
"If you forget yourself you become the universe" --Hkuin Ortegama.
"You must learn some of my philosophy. Think only of the past as its remembrance gives you pleasure." -- Lizzie in Pride and Prejudice.
"Every accused is presumed innocent unless proved guilty, and a hundred guilty persons may go free, so that not a single innocent person be declared guilty." -- Not quite a formal quote, but Thomas Jefferson is meant to have summed up this definition of the British Justice system with "better one hundred guilty men go free than one innocent man be condemned."
"The young man knows the rules, but the old man knows the exceptions." -- Oliver Wendell Holmes (I think).
"The two most powerful warriors are patience and time." -- Tolstoy.
"A woman without a man is like a fish without a bicycle." -- Gloria Steinem.
"Thanksgiving: The only time the British were glad to have Indian neighbours." -- Anon.
"Nobody can ever make you feel inferior without your consent." -- Eleanor Roosevelt
".. And relations between America and England are better than ever... You're like Mini Me to our Doctor Evil, helping out in our Zany Schemes in taking over the world." -- Marge Simpson's Christmas message to England (2004).
"Wow! I've never been called an adult before... I've been tried as one but..." -- Otto from the Simpsons.
"It's a global village, but most of the people in that village are idiots". -- Somebody on telly babbling about the Internet.
"Rome.com wasn't built in a day..." -- Karl to Lou on Neighbours (probably nicked though)
"Love is a funny thing to describe. It's so easy to feel and yet so slippery to talk about. It's like a bar of soap in the bathtub - you have it in your hand until you hold on too tight." - MJJ
"... The first Church of the Obese Polygamist - Now known as the Church of England" -- Jonathan Meades
"I wouldn't piss in his mouth if his teeth were on fire." -- Anon.
"You sleep safe in your beds because rough men stand ready in the night to visit violence on those who do you harm" -- George Orwell
"... The weight of the new radios also led to Land Rovers breaking axles during trials." -- http://tinyurl.com/4srnb
"As below, so above; and as above so below. With this knowledge alone you may work miracles." -- Emerald Tablet of Hermes (2) From Fulcanelli trans.
"I came to apologize, and make out with tongues." -- Bobby to Connie, King of the Hill.
"If you are an alien, how come you sound like you are from the North?" "Lots of planets have a North!" -- (well, the new "Dr Who" had to have *one* good quote ...)
"The problem with defending the purity of the English language is that English is about as pure as a cribhouse whore. We don't just borrow words; on occasion, English has pursued other languages down alleyways to beat them unconscious and rifle their pockets for new vocabulary." -- James D Nicoll