# Loading screen now uses dynamic textures for random backgrounds.
Thanks, Philip. (y) This was SVN commit r3891.
This commit is contained in:
parent
9ecd5e8a25
commit
e02d42b746
@ -67,30 +67,17 @@ function startLoadingScreen()
|
|||||||
setCursor("cursor-wait");
|
setCursor("cursor-wait");
|
||||||
console.write ("Loading " + g_GameAttributes.mapFile + " (" + g_GameAttributes.numPlayers + " players) ...");
|
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)
|
// Choose random concept art for loading screen background (should depend on the selected civ later when this is specified).
|
||||||
var randVar = getRandom(1, 6);
|
var sprite = "";
|
||||||
|
var loadingBkgArray = buildFileList("art/textures/ui/loading/", "*.dds", false);
|
||||||
switch (randVar) {
|
if (loadingBkgArray.length == 0)
|
||||||
case 1:
|
console.write ("ERROR: Failed to find any matching textures for the loading screen background.");
|
||||||
sprite = "load_concept_he";
|
else
|
||||||
break;
|
{
|
||||||
case 2:
|
// Get a random index from the list of loading screen backgrounds.
|
||||||
sprite = "load_concept_ce";
|
sprite = "stretched:" + loadingBkgArray[getRandom (0, loadingBkgArray.length-1)];
|
||||||
break;
|
sprite = sprite.replace ("art/textures/ui/", "");
|
||||||
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 ("ldConcept").sprite = sprite;
|
getGUIObjectByName ("ldConcept").sprite = sprite;
|
||||||
|
|
||||||
// janwas: main loop now sets progress / description, but that won't
|
// janwas: main loop now sets progress / description, but that won't
|
||||||
|
@ -4,19 +4,6 @@
|
|||||||
|
|
||||||
<sprites>
|
<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
|
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
|
START START START START START START START START START = SESSION GUI = START START START START START START START START START START
|
||||||
|
Loading…
Reference in New Issue
Block a user