Trying to clean up music in the scripts. It is still broken.

This was SVN commit r10249.
This commit is contained in:
WhiteTreePaladin 2011-09-11 03:30:41 +00:00
parent 7d95a68a20
commit be69735582
10 changed files with 468 additions and 372 deletions

View File

@ -4,21 +4,7 @@
*/
/*
* These constants are used in session and summary
*/
var g_MusicGain = 0.3;
const RELATIVE_MUSIC_PATH = "audio/music/";
var g_PeaceTracks = [];
var g_BattleTracks = [];
const MAIN_MENU = "main_menu";
const DEFEAT_CUE = "gen_loss_cue";
const DEFEAT_MUSIC = "gen_loss_track";
const VICTORY_MUSIC = "win_1";
//const AMBIENT_SOUND = "audio/ambient/dayscape/day_temperate_gen_03.ogg";
const BUTTON_SOUND = "audio/interface/ui/ui_button_longclick.ogg";
// ====================================================================
@ -127,195 +113,45 @@ function crossFade (outHandle, inHandle, fadeDuration)
// ====================================================================
//const AMBIENT_SOUND = "audio/ambient/dayscape/day_temperate_gen_03.ogg";
/*
* At some point, this ought to be extended to do dynamic music selection and
* crossfading - it at least needs to pick the music track based on the player's
* civ and peace/battle
*/
//const AMBIENT_TEMPERATE = "temperate";
//var currentAmbient;
/*
* These functions are used in session and summary
*
*/
function storeTracks(civMusic)
{
for each (var music in civMusic)
{
if ("peace" == music["Type"])
{
g_PeaceTracks.push(music["File"]);
}
else if ("battle" == music["Type"])
{
g_BattleTracks.push(music["File"]);
}
}
}
function getRandomPeaceTrack()
{
return RELATIVE_MUSIC_PATH + g_PeaceTracks[getRandom(0, g_PeaceTracks.length-1)];
}
function getRandomBattleTrack()
{
return RELATIVE_MUSIC_PATH + g_BattleTracks[getRandom(0, g_BattleTracks.length-1)];
}
function playMainMenuMusic()
{
if (global.curr_music)
switchMusic(MAIN_MENU, 0.0, true);
else
playMusic(MAIN_MENU, 0.0, true);
}
function stopMainMenuMusic()
{
if (global.main_menu_music)
global.main_menu_music.fade(-1, 0.0, 5.0);
}
function playButtonSound()
{
var buttonSound = new Sound(BUTTON_SOUND);
buttonSound.play();
}
function playDefeatMusic()
{
switchMusic(DEFEAT_CUE, 0.0, false);
switchMusic(DEFEAT_MUSIC, 10.0, true);
}
function playVictoryMusic()
{
switchMusic(VICTORY_MUSIC, 0.0, true);
}
function startSessionSounds(civMusic)
{
storeTracks(civMusic);
playRandomAmbientSound();
playRandomCivMusic();
}
function startMusic()
{
playRandomCivMusic();
}
function playRandomCivMusic()
{
global.curr_music = new Sound(getRandomPeaceTrack());
if (global.curr_music)
{
global.curr_music.loop();
global.curr_music.fade(0.0, g_MusicGain, 10.0);
}
}
function playRandomAmbientSound()
{
// Seem to need the underscore at the end of "temperate" to avoid crash
// (Might be caused by trying to randomly load day_temperate.xml)
// global.curr_ambient = newRandomSound("ambient", "temperate_", "dayscape");
// if (global.curr_ambient)
// {
// global.curr_ambient.loop();
// global.curr_ambient.setGain(0.8);
// }
// Just play this track for now. We don't randomly change to new tracks.
// Some of the existing ones are too annoying if played constantly.
global.curr_ambient = new Sound("audio/ambient/dayscape/day_temperate_gen_03.ogg");
if (global.curr_ambient)
{
global.curr_ambient.loop();
global.curr_ambient.setGain(0.8);
}
}
function playMusic(track, fadeInPeriod, isLooping)
{
global.curr_music = new Sound(RELATIVE_MUSIC_PATH + track + ".ogg");
if (global.curr_music)
{
if (isLooping)
global.curr_music.loop();
else
global.curr_music.play();
if (fadeInPeriod)
global.curr_music.fade(0.0, g_MusicGain, fadeInPeriod);
}
}
function switchMusic(track, fadeInPeriod, isLooping)
{
if (global.curr_music)
global.curr_music.fade(-1, 0.0, 5.0);
playMusic(track, fadeInPeriod, isLooping);
}
function stopSound()
{
stopMusic();
stopAmbient();
}
function stopMusic()
{
if (global.curr_music)
{
global.curr_music.fade(-1, 0.0, 5.0);
global.curr_music = null;
}
}
function stopAmbientSounds()
{
if (global.curr_ambient)
{
global.curr_ambient.fade(-1, 0.0, 5.0);
global.curr_ambient = null;
}
}
function isMusicPlaying()
{
if (global.curr_music)
return true;
return false;
}
//function isEndingMusicPlaying()
//function playRandomAmbient(type)
//{
// if (global.curr_music)
// switch (type)
// {
// if (global.curr_music[DEFEAT_CUE] ||
// global.curr_music[DEFEAT_MUSIC] ||
// global.curr_music[VICTORY_MUSIC])
// {
// return true;
// }
// }
// case AMBIENT_TEMPERATE:
// // Seem to need the underscore at the end of "temperate" to avoid crash
// // (Might be caused by trying to randomly load day_temperate.xml)
// currentAmbient = newRandomSound("ambient", "temperate_", "dayscape");
// if (currentAmbient)
// {
// currentAmbient.loop();
// currentAmbient.setGain(0.8);
// }
// break;
//
// return false;
// default:
// console.write("Unrecognized ambient type: " + type);
// break;
// }
//}
//
//
//function isMusicPlaying()
//function stopAmbient()
//{
// if (global.curr_music)
// return global.curr_music.isPlaying();
//
// return false;
// if (currentAmbient)
// {
// currentAmbient.fade(-1, 0.0, 5.0);
// currentAmbient = null;
// }
//}
//const BUTTON_SOUND = "audio/interface/ui/ui_button_longclick.ogg";
//function playButtonSound()
//{
// var buttonSound = new Sound(BUTTON_SOUND);
// buttonSound.play();
//}

View File

@ -0,0 +1,185 @@
function initMusic()
{
// Probably will need to put this in a place where it won't get
// reinitialized after every match. Otherwise, it will not remember
// the current track
// Might need to use pregame for that sort of setup and move all the
// menu stuff to a main_menu page
global.music = new Music();
}
function Music()
{
this.RELATIVE_MUSIC_PATH = "audio/music/";
this.MUSIC_PEACE = "peace";
this.MUSIC_BATTLE = "battle";
this.tracks = {
MAIN_MENU_TRACK : "main_menu",
VICTORY_TRACK : "win_1",
DEFEAT_TRACK : "gen_loss_track",
DEFEAT_CUE_TRACK : "gen_loss_cue"
};
this.states = {
OFF : 0,
MENU : 1,
PEACE : 2,
BATTLE : 3,
VICTORY :4,
DEFEAT : 5,
DEFEAT_CUE : 6
};
this.musicGain = 0.3;
this.peaceTracks = [];
this.battleTracks = [];
this.currentState = 0;
this.oldState = 0;
this.currentMusic = null;
}
// Needs to be called in onTick() to work
Music.prototype.update = function()
{
if (this.currentState != this.oldState)
{
this.oldState = this.currentState;
switch (this.currentState)
{
case this.states.OFF:
if (this.currentMusic)
{
this.currentMusic.fade(-1, 0.0, 5.0);
this.currentMusic = null;
}
break;
case this.states.MENU:
this.switchMusic(this.tracks.MAIN_MENU_TRACK, 0.0, true);
break;
case this.states.PEACE:
this.switchMusic(this.getRandomPeaceTrack(), 0.0, true);
break;
case this.states.BATTLE:
this.switchMusic(this.getRandomBattleTrack(), 0.0, true);
break;
case this.states.VICTORY:
this.switchMusic(this.tracks.VICTORY_TRACK, 0.0, true);
break;
case this.states.DEFEAT:
this.switchMusic(this.tracks.DEFEAT_TRACK, 0.0, true);
break;
case this.states.DEFEAT_CUE:
this.switchMusic(this.tracks.DEFEAT_CUE_TRACK, 0.0, false);
break;
default:
console.write("Unknown music state: " + this.currentState);
break;
}
}
else if (!this.isMusicPlaying())
{
console.write("not playing " + this.currentState);
if (this.currentState == this.states.DEFEAT_CUE)
this.setState(this.states.DEFEAT);
}
};
Music.prototype.setState = function(state)
{
this.currentState = state;
};
Music.prototype.storeTracks = function(civMusic)
{
for each (var music in civMusic)
{
var type = music["Type"];
switch (type)
{
case this.MUSIC_PEACE:
this.peaceTracks.push(music["File"]);
break;
case this.MUSIC_BATTLE:
this.battleTracks.push(music["File"]);
break;
default:
console.write("Unrecognized music type: " + type);
break;
}
}
};
Music.prototype.getRandomPeaceTrack = function()
{
return this.peaceTracks[getRandom(0, this.peaceTracks.length-1)];
};
Music.prototype.getRandomBattleTrack = function()
{
return this.battleTracks[getRandom(0, this.battleTracks.length-1)];
};
Music.prototype.switchMusic = function(track, fadeInPeriod, isLooping)
{
if (this.currentMusic)
{
this.currentMusic.fade(-1, 0.0, 5.0);
this.currentMusic = null;
}
console.write(this.RELATIVE_MUSIC_PATH + track + ".ogg");
this.currentMusic = new Sound(this.RELATIVE_MUSIC_PATH + track + ".ogg");
console.write(this.currentMusic);
if (this.currentMusic)
{
if (isLooping)
this.currentMusic.loop();
else
this.currentMusic.play();
if (fadeInPeriod)
this.currentMusic.fade(0.0, this.musicGain, fadeInPeriod);
}
};
Music.prototype.isMusicPlaying = function()
{
if (this.currentMusic)
return true;
return false;
};
Music.prototype.startMusic = function()
{
this.setState(this.states.PEACE);
};
Music.prototype.stopMusic = function()
{
this.setState(this.states.OFF);
};

View File

@ -91,8 +91,9 @@ function displayProgress()
function reallyStartGame()
{
// Stop the music
if (global.curr_music)
global.curr_music.fade(-1, 0.0, 5.0); // fade to 0 over 5 seconds
// if (global.curr_music)
// global.curr_music.fade(-1, 0.0, 5.0); // fade to 0 over 5 seconds
// This is a reserved function name that is executed by the engine when it is ready
// to start the game (i.e. loading progress has reached 100%).

View File

@ -5,7 +5,6 @@
<include>common/sprite1.xml</include>
<include>common/icon_sprites.xml</include>
<include>common/init.xml</include>
<include>common/common_sprites.xml</include>
<include>common/common_styles.xml</include>

View File

@ -4,7 +4,10 @@ const MARGIN = 4; // menu border size
function init()
{
playMainMenuMusic();
initMusic();
// Play main menu music
global.music.setState(global.music.states.MENU);
userReportEnabledText = getGUIObjectByName("userReportEnabledText").caption;
@ -82,6 +85,9 @@ function formatUserReportStatus(status)
function onTick()
{
// Play tracks based on current music state
global.music.update();
// Animate backgrounds
scrollBackgrounds();
@ -109,6 +115,14 @@ function onTick()
* MENU FUNCTIONS
*/
// Temporarily adding this here
//const BUTTON_SOUND = "audio/interface/ui/ui_button_longclick.ogg";
//function playButtonSound()
//{
// var buttonSound = new Sound(BUTTON_SOUND);
// buttonSound.play();
//}
// Slide menu
function updateMenuPosition()
{
@ -158,7 +172,7 @@ function openMenu(newSubmenu, position, buttonHeight, numButtons)
// Closes the menu and resets position
function closeMenu()
{
playButtonSound();
// playButtonSound();
// remove old submenu type
getGUIObjectByName(currentSubmenuType).hidden = true;

View File

@ -5,6 +5,9 @@
<script file="gui/pregame/mainmenu.js"/>
<script file="gui/common/functions_utility_error.js"/>
<script file="gui/common/music.js"/>
<!--
==========================================
- MAIN MENU - "COMMANDER'S TENT" BACKDROP

View File

@ -45,6 +45,7 @@ function initMenuPosition()
menu.size = INITIAL_MENU_POSITION;
}
// =============================================================================
// Overall Menu
// =============================================================================
@ -71,14 +72,14 @@ function updateMenuPosition()
// Opens the menu by revealing the screen which contains the menu
function openMenu()
{
playButtonSound();
// playButtonSound();
isMenuOpen = true;
}
// Closes the menu and resets position
function closeMenu()
{
playButtonSound();
// playButtonSound();
isMenuOpen = false;
}
@ -231,4 +232,13 @@ function closeOpenDialogs()
closeMenu();
closeChat();
closeSettings(false);
}
}
// Temporarily adding this here
//function playButtonSound()
//{
// const BUTTON_SOUND = "audio/interface/ui/ui_button_longclick.ogg";
// var buttonSound = new Sound(BUTTON_SOUND);
// buttonSound.play();
//}

View File

@ -83,7 +83,11 @@ function init(initData, hotloadData)
}
else
{
startSessionSounds(g_CivData[g_Players[Engine.GetPlayerID()].civ].Music); // Starting for the first time:
// Starting for the first time:
var civMusic = g_CivData[g_Players[Engine.GetPlayerID()].civ].Music;
global.music.storeTracks(civMusic);
global.music.setState(global.music.states.PEACE);
playRandomAmbient("temperate");
}
onSimulationUpdate();
@ -96,6 +100,7 @@ function init(initData, hotloadData)
setTimeout(function() { reportPerformance(60); }, 60000);
}
function reportPerformance(time)
{
var settings = Engine.GetMapSettings();
@ -128,25 +133,26 @@ function leaveGame()
{
gameResult = "You have abandoned the game.";
// Tell other players that we have given up and
// been defeated
// Tell other players that we have given up and been defeated
Engine.PostNetworkCommand({
"type": "defeat-player",
"playerId": Engine.GetPlayerID()
});
console.write("here");
global.music.setState(global.music.states.DEFEAT);
console.write(global.music.currentState);
playDefeatMusic();
}
stopAmbientSounds();
stopAmbient();
endGame();
Engine.SwitchGuiPage("page_summary.xml",
{ "gameResult" : gameResult,
"timeElapsed" : extendedSimState.timeElapsed,
"playerStates": extendedSimState.players
});
Engine.SwitchGuiPage("page_summary.xml", {
"gameResult" : gameResult,
"timeElapsed" : extendedSimState.timeElapsed,
"playerStates": extendedSimState.players
});
}
// Return some data that we'll use when hotloading this file after changes
@ -181,7 +187,10 @@ function onTick()
// Run timers
updateTimers();
// Animate menu
// Play tracks based on current music state
global.music.update();
// Animate menu
updateMenuPosition();
// When training is blocked, flash population (alternates colour every 500msec)
@ -204,7 +213,7 @@ function checkPlayerState()
if (playerState.state == "defeated")
{
g_GameEnded = true;
playDefeatMusic();
global.music.setState(global.music.states.DEFEAT_CUE);
closeMenu();
closeOpenDialogs();
@ -216,7 +225,7 @@ function checkPlayerState()
else if (playerState.state == "won")
{
g_GameEnded = true;
playVictoryMusic();
global.music.setState(global.music.states.VICTORY);
closeMenu();
closeOpenDialogs();
@ -325,3 +334,43 @@ function updatePlayerDisplay(simState)
g_IsTrainingQueueBlocked = playerState.trainingQueueBlocked;
}
// Temporarily adding this here
const AMBIENT_TEMPERATE = "temperate";
var currentAmbient;
function playRandomAmbient(type)
{
switch (type)
{
case AMBIENT_TEMPERATE:
// Seem to need the underscore at the end of "temperate" to avoid crash
// (Might be caused by trying to randomly load day_temperate.xml)
// currentAmbient = newRandomSound("ambient", "temperate_", "dayscape");
const AMBIENT = "audio/ambient/dayscape/day_temperate_gen_03.ogg";
currentAmbient = new Sound(AMBIENT);
if (currentAmbient)
{
currentAmbient.loop();
currentAmbient.setGain(0.8);
}
break;
default:
console.write("Unrecognized ambient type: " + type);
break;
}
}
// Temporarily adding this here
function stopAmbient()
{
if (currentAmbient)
{
currentAmbient.fade(-1, 0.0, 5.0);
currentAmbient = null;
}
}

View File

@ -208,4 +208,4 @@ function init(data)
}
selectPanel(0);
}
}

View File

@ -10,176 +10,175 @@
<script file="gui/common/functions_civinfo.js"/>
<script file="gui/summary/summary.js"/>
<object type="image"
style="StoneWindow"
size="0 0 100% 100%"
>
<object style="TitleText" type="text" size="50%-128 4 50%+128 36">
Summary
</object>
<object type="image"
style="StoneWindow"
size="0 0 100% 100%"
>
<object style="TitleText" type="text" size="50%-128 4 50%+128 36">
Summary
</object>
<object type="image" sprite="ForegroundBody" size="20 20 100%-20 64">
<object name="summaryText"
type="text"
size="50 0 100%-50 100%-3"
font="serif-bold-18"
textcolor="255 255 255"
text_align="left"
text_valign="center"
/>
<object type="image" sprite="ForegroundBody" size="20 20 100%-20 64">
<object name="summaryText"
type="text"
size="50 0 100%-50 100%-3"
font="serif-bold-18"
textcolor="255 255 255"
text_align="left"
text_valign="center"
/>
<object name="timeElapsed"
type="text"
size="100%-200 10 100%-10 100%"
font="serif-16"
textcolor="255 255 255"
text_align="center"
/>
</object>
<object name="timeElapsed"
type="text"
size="100%-200 10 100%-10 100%"
font="serif-16"
textcolor="255 255 255"
text_align="center"
/>
</object>
<object name="tabDividerLeft" type="image" sprite="TabSpacer" size="172 120 174 122"/>
<object name="tabDividerRight" type="image" sprite="TabSpacer" size="328 120 330 122"/>
<object name="tabDividerLeft" type="image" sprite="TabSpacer" size="172 120 174 122"/>
<object name="tabDividerRight" type="image" sprite="TabSpacer" size="328 120 330 122"/>
<object name="unitsBuildingsPanelButton" type="button" sprite="ForegroundTab" size="20 95 170 120">
<action on="Press">selectPanel(0);</action>
<object type="text" style="TitleText" ghost="true">Units/buildings</object>
</object>
<object name="unitsBuildingsPanelButton" type="button" sprite="ForegroundTab" size="20 95 170 120">
<action on="Press">selectPanel(0);</action>
<object type="text" style="TitleText" ghost="true">Units/buildings</object>
</object>
<object name="conquestPanelButton" type="button" sprite="BackgroundTab" size="176 95 326 120">
<action on="Press">selectPanel(1);</action>
<object type="text" style="TitleText" ghost="true">Conquest</object>
</object>
<object name="conquestPanelButton" type="button" sprite="BackgroundTab" size="176 95 326 120">
<action on="Press">selectPanel(1);</action>
<object type="text" style="TitleText" ghost="true">Conquest</object>
</object>
<object name="resourcesPanelButton" type="button" sprite="BackgroundTab" size="332 95 480 120">
<action on="Press">selectPanel(2);</action>
<object type="text" style="TitleText" ghost="true">Resources</object>
</object>
<object name="resourcesPanelButton" type="button" sprite="BackgroundTab" size="332 95 480 120">
<action on="Press">selectPanel(2);</action>
<object type="text" style="TitleText" ghost="true">Resources</object>
</object>
<object name="unitsBuildingsPanel" type="image" sprite="ForegroundBody" size="20 120 100%-20 100%-58">
<object name="unitsBuildingsPanel" type="image" sprite="ForegroundBody" size="20 120 100%-20 100%-58">
<object size="0 0 100% 100%-50">
<object name="playerName0Heading" type="text" style="LeftTabLabelText">
Player name
</object>
<object name="unitsTrainedHeading" type="text" style="CenteredTabLabelText">
Units&#10;trained
</object>
<object name="unitsLostHeading" type="text" style="CenteredTabLabelText">
Units&#10;lost
</object>
<object name="enemyUnitsKilledHeading" type="text" style="CenteredTabLabelText">
Enemy units&#10;killed
</object>
<object name="buildingsConstructedHeading" type="text" style="CenteredTabLabelText">
Buildings&#10;constructed
</object>
<object name="buildingsLostHeading" type="text" style="CenteredTabLabelText">
Buildings&#10;lost
</object>
<object name="enemyBuildingsDestroyedHeading" type="text" style="CenteredTabLabelText">
Enemy&#10;buildings&#10;destroyed
</object>
<object size="0 0 100% 100%-50">
<object name="playerName0Heading" type="text" style="LeftTabLabelText">
Player name
</object>
<object name="unitsTrainedHeading" type="text" style="CenteredTabLabelText">
Units&#10;trained
</object>
<object name="unitsLostHeading" type="text" style="CenteredTabLabelText">
Units&#10;lost
</object>
<object name="enemyUnitsKilledHeading" type="text" style="CenteredTabLabelText">
Enemy units&#10;killed
</object>
<object name="buildingsConstructedHeading" type="text" style="CenteredTabLabelText">
Buildings&#10;constructed
</object>
<object name="buildingsLostHeading" type="text" style="CenteredTabLabelText">
Buildings&#10;lost
</object>
<object name="enemyBuildingsDestroyedHeading" type="text" style="CenteredTabLabelText">
Enemy&#10;buildings&#10;destroyed
</object>
</object>
</object>
<object size="0 65 100% 100%-50">
<repeat count="8">
<object type="image" name="playerBox0[n]" size="10 0 10 30" hidden="true">
<object name="playerColourBox0[n]" type="image" size="10 4 30 24" />
<object name="playerName0[n]" type="text" style="LeftLabelText" size="40 2 208 100%" />
<object name="civIcon0[n]" type="image" size="208 0 240 32"/>
<object name="unitsTrained[n]" type="text" style="CenteredLabelText"/>
<object name="unitsLost[n]" type="text" style="CenteredLabelText"/>
<object name="enemyUnitsKilled[n]" type="text" style="CenteredLabelText"/>
<object name="buildingsConstructed[n]" type="text" style="CenteredLabelText"/>
<object name="buildingsLost[n]" type="text" style="CenteredLabelText"/>
<object name="enemyBuildingsDestroyed[n]" type="text" style="CenteredLabelText"/>
</object>
</repeat>
</object>
<object size="0 65 100% 100%-50">
<repeat count="8">
<object type="image" name="playerBox0[n]" size="10 0 10 30" hidden="true">
<object name="playerColourBox0[n]" type="image" size="10 4 30 24" />
<object name="playerName0[n]" type="text" style="LeftLabelText" size="40 2 208 100%" />
<object name="civIcon0[n]" type="image" size="208 0 240 32"/>
<object name="unitsTrained[n]" type="text" style="CenteredLabelText"/>
<object name="unitsLost[n]" type="text" style="CenteredLabelText"/>
<object name="enemyUnitsKilled[n]" type="text" style="CenteredLabelText"/>
<object name="buildingsConstructed[n]" type="text" style="CenteredLabelText"/>
<object name="buildingsLost[n]" type="text" style="CenteredLabelText"/>
<object name="enemyBuildingsDestroyed[n]" type="text" style="CenteredLabelText"/>
</object>
</repeat>
</object>
</object>
<object name="conquestPanel" type="image" sprite="ForegroundBody" size="20 120 100%-20 100%-58" hidden="true">
</object>
<object name="conquestPanel" type="image" sprite="ForegroundBody" size="20 120 100%-20 100%-58" hidden="true">
<object size="0 0 100% 100%-50">
<object name="playerName1Heading" type="text" style="LeftTabLabelText">
Player name
</object>
<object name="civCentresBuiltHeading" type="text" style="CenteredTabLabelText">
Civ centres&#10;built
</object>
<object name="enemyCivCentresDestroyedHeading" type="text" style="CenteredTabLabelText">
Enemy&#10;civ centres&#10;destroyed
</object>
<object name="mapExplorationHeading" type="text" style="CenteredTabLabelText">
Map&#10;exploration
</object>
</object>
<object size="0 0 100% 100%-50">
<object name="playerName1Heading" type="text" style="LeftTabLabelText">
Player name
</object>
<object name="civCentresBuiltHeading" type="text" style="CenteredTabLabelText">
Civ centres&#10;built
</object>
<object name="enemyCivCentresDestroyedHeading" type="text" style="CenteredTabLabelText">
Enemy&#10;civ centres&#10;destroyed
</object>
<object name="mapExplorationHeading" type="text" style="CenteredTabLabelText">
Map&#10;exploration
</object>
</object>
<object size="0 65 100% 100%-50">
<repeat count="8">
<object type="image" name="playerBox1[n]" size="10 0 10 30" hidden="true">
<object name="playerColourBox1[n]" type="image" size="10 4 30 24" />
<object name="playerName1[n]" type="text" style="LeftLabelText" size="40 2 208 100%" />
<object name="civIcon1[n]" type="image" size="208 0 240 32"/>
<object name="civCentresBuilt[n]" type="text" style="CenteredLabelText"/>
<object name="enemyCivCentresDestroyed[n]" type="text" style="CenteredLabelText"/>
<object name="mapExploration[n]" type="text" style="CenteredLabelText"/>
</object>
</repeat>
</object>
<object size="0 65 100% 100%-50">
<repeat count="8">
<object type="image" name="playerBox1[n]" size="10 0 10 30" hidden="true">
<object name="playerColourBox1[n]" type="image" size="10 4 30 24" />
<object name="playerName1[n]" type="text" style="LeftLabelText" size="40 2 208 100%" />
<object name="civIcon1[n]" type="image" size="208 0 240 32"/>
<object name="civCentresBuilt[n]" type="text" style="CenteredLabelText"/>
<object name="enemyCivCentresDestroyed[n]" type="text" style="CenteredLabelText"/>
<object name="mapExploration[n]" type="text" style="CenteredLabelText"/>
</object>
</repeat>
</object>
</object>
<object name="resourcesPanel" type="image" sprite="ForegroundBody" size="20 120 100%-20 100%-58" hidden="true">
</object>
<object name="resourcesPanel" type="image" sprite="ForegroundBody" size="20 120 100%-20 100%-58" hidden="true">
<object size="0 0 100% 100%-50">
<object name="playerName2Heading" type="text" style="LeftTabLabelText">
Player name
</object>
<object name="foodGatheredHeading" type="text" style="CenteredTabLabelText">
Food&#10;gathered
</object>
<object name="vegetarianRatioHeading" type="text" style="CenteredTabLabelText">
Vegetarian&#10;ratio
</object>
<object name="woodGatheredHeading" type="text" style="CenteredTabLabelText">
Wood&#10;gathered
</object>
<object name="metalGatheredHeading" type="text" style="CenteredTabLabelText">
Metal&#10;gathered
</object>
<object name="stoneGatheredHeading" type="text" style="CenteredTabLabelText">
Stone&#10;gathered
</object>
<object name="treasuresCollectedHeading" type="text" style="CenteredTabLabelText">
Treasures&#10;collected
</object>
</object>
<object size="0 0 100% 100%-50">
<object name="playerName2Heading" type="text" style="LeftTabLabelText">
Player name
</object>
<object name="foodGatheredHeading" type="text" style="CenteredTabLabelText">
Food&#10;gathered
</object>
<object name="vegetarianRatioHeading" type="text" style="CenteredTabLabelText">
Vegetarian&#10;ratio
</object>
<object name="woodGatheredHeading" type="text" style="CenteredTabLabelText">
Wood&#10;gathered
</object>
<object name="metalGatheredHeading" type="text" style="CenteredTabLabelText">
Metal&#10;gathered
</object>
<object name="stoneGatheredHeading" type="text" style="CenteredTabLabelText">
Stone&#10;gathered
</object>
<object name="treasuresCollectedHeading" type="text" style="CenteredTabLabelText">
Treasures&#10;collected
</object>
</object>
<object size="0 65 100% 100%-50">
<repeat count="8">
<object type="image" name="playerBox2[n]" size="10 0 10 30" hidden="true">
<object name="playerColourBox2[n]" type="image" size="10 4 30 24" />
<object name="playerName2[n]" type="text" style="LeftLabelText" size="40 2 208 100%" />
<object name="civIcon2[n]" type="image" size="208 0 240 32"/>
<object name="foodGathered[n]" type="text" style="CenteredLabelText"/>
<object name="vegetarianRatio[n]" type="text" style="CenteredLabelText"/>
<object name="woodGathered[n]" type="text" style="CenteredLabelText"/>
<object name="metalGathered[n]" type="text" style="CenteredLabelText"/>
<object name="stoneGathered[n]" type="text" style="CenteredLabelText" />
<object name="treasuresCollected[n]" type="text" style="CenteredLabelText"/>
</object>
</repeat>
</object>
<object size="0 65 100% 100%-50">
<repeat count="8">
<object type="image" name="playerBox2[n]" size="10 0 10 30" hidden="true">
<object name="playerColourBox2[n]" type="image" size="10 4 30 24" />
<object name="playerName2[n]" type="text" style="LeftLabelText" size="40 2 208 100%" />
<object name="civIcon2[n]" type="image" size="208 0 240 32"/>
<object name="foodGathered[n]" type="text" style="CenteredLabelText"/>
<object name="vegetarianRatio[n]" type="text" style="CenteredLabelText"/>
<object name="woodGathered[n]" type="text" style="CenteredLabelText"/>
<object name="metalGathered[n]" type="text" style="CenteredLabelText"/>
<object name="stoneGathered[n]" type="text" style="CenteredLabelText" />
<object name="treasuresCollected[n]" type="text" style="CenteredLabelText"/>
</object>
</repeat>
</object>
</object>
</object>
<object type="button" style="StoneButton" size="100%-164 100%-52 100%-24 100%-24">
Continue
<action on="Press">
Engine.SwitchGuiPage("page_pregame.xml");
<!-- Engine.PushGuiPage("page_gamesetup.xml", { type: "offline" });-->
</action>
</object>
</object>
<object type="button" style="StoneButton" size="100%-164 100%-52 100%-24 100%-24">
Continue
<action on="Press">
Engine.SwitchGuiPage("page_pregame.xml");
</action>
</object>
</object>
</objects>