1
0
forked from 0ad/0ad

# Loading screen now uses dynamic textures for random backgrounds.

Thanks, Philip. (y)

This was SVN commit r3891.
This commit is contained in:
Acumen 2006-05-25 03:05:06 +00:00
parent 9ecd5e8a25
commit e02d42b746
2 changed files with 11 additions and 73 deletions

View File

@ -67,30 +67,17 @@ function startLoadingScreen()
setCursor("cursor-wait");
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)
var 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;
}
// Choose random concept art for loading screen background (should depend on the selected civ later when this is specified).
var sprite = "";
var loadingBkgArray = buildFileList("art/textures/ui/loading/", "*.dds", false);
if (loadingBkgArray.length == 0)
console.write ("ERROR: Failed to find any matching textures for the loading screen background.");
else
{
// Get a random index from the list of loading screen backgrounds.
sprite = "stretched:" + loadingBkgArray[getRandom (0, loadingBkgArray.length-1)];
sprite = sprite.replace ("art/textures/ui/", "");
}
getGUIObjectByName ("ldConcept").sprite = sprite;
// janwas: main loop now sets progress / description, but that won't

View File

@ -4,19 +4,6 @@
<sprites>
<!-- Notes:
* Can we make size = 0 0 100% 100% by default? It's seems to be the most common value ("stretched sprite").
While we're here:
* Ask him to remove the "error drawing sprite of 1x0 size" error, since this can happen legitimately sometimes
(divider of 1 pixel width, progressbar at value 0)
* Also ask about clear() function for lists.
* Ask about interpretation of special characters (weird question mark).
* Text formatting for lists (eg centering).
* DDS transparency (ie main menu buttons).
* Ask him about the checkbox and whether it's available for use (show first example in Options).
* Bug: If you nest an icon into a caption [icon=""], it's no longer possible to vertically center that control's text.
-->
<!--
==========================================
GENERIC - BACKCOLOR SPRITES
@ -616,42 +603,6 @@
==========================================
-->
<sprite name="load_concept_ce">
<image texture="loading/ui_concept_female_ce.dds"
size="0 0 100% 100%"
/>
</sprite>
<sprite name="load_concept_he">
<image texture="loading/ui_concept_female_he.dds"
size="0 0 100% 100%"
/>
</sprite>
<sprite name="load_concept_pe">
<image texture="loading/ui_concept_female_pe.dds"
size="0 0 100% 100%"
/>
</sprite>
<sprite name="load_concept_ro">
<image texture="loading/ui_concept_female_ro.dds"
size="0 0 100% 100%"
/>
</sprite>
<sprite name="load_concept_ca">
<image texture="loading/ui_concept_female_ca.dds"
size="0 0 100% 100%"
/>
</sprite>
<sprite name="load_concept_ib">
<image texture="loading/ui_concept_female_ib.dds"
size="0 0 100% 100%"
/>
</sprite>
<!--
=================================================================================================================================================
START START START START START START START START START = SESSION GUI = START START START START START START START START START START