aboutsummaryrefslogtreecommitdiffstats
path: root/Game/Code
diff options
context:
space:
mode:
authorjaybinks <jaybinks@b956fd51-792f-4845-bead-9b4dfca2ff2c>2007-11-19 14:00:19 +0000
committerjaybinks <jaybinks@b956fd51-792f-4845-bead-9b4dfca2ff2c>2007-11-19 14:00:19 +0000
commit3ad4b50ac2f3d0b9f9848072eca213de02f9e198 (patch)
tree853591709e3923743cbd41b6bb872e3e3a109d2b /Game/Code
parentf6a35ec9b91fb58830d9bd048dd455a05cf2a7da (diff)
downloadusdx-3ad4b50ac2f3d0b9f9848072eca213de02f9e198.tar.gz
usdx-3ad4b50ac2f3d0b9f9848072eca213de02f9e198.tar.xz
usdx-3ad4b50ac2f3d0b9f9848072eca213de02f9e198.zip
fixed theme reloading, at runtime for vistar and other Themes
that may not include some textures. git-svn-id: svn://svn.code.sf.net/p/ultrastardx/svn/branches/1.0.1@614 b956fd51-792f-4845-bead-9b4dfca2ff2c
Diffstat (limited to 'Game/Code')
-rw-r--r--Game/Code/Classes/UThemes.pas97
1 files changed, 96 insertions, 1 deletions
diff --git a/Game/Code/Classes/UThemes.pas b/Game/Code/Classes/UThemes.pas
index b55a84dc..bea20ce4 100644
--- a/Game/Code/Classes/UThemes.pas
+++ b/Game/Code/Classes/UThemes.pas
@@ -705,6 +705,7 @@ type
{$ENDIF}
LastThemeBasic: TThemeBasic;
+ procedure create_theme_objects();
public
Loading: TThemeLoading;
@@ -803,6 +804,7 @@ end;
constructor TTheme.Create(FileName: string; Color: integer);
begin
+(*
Loading := TThemeLoading.Create;
Main := TThemeMain.Create;
Name := TThemeName.Create;
@@ -835,6 +837,7 @@ begin
//Stats Screens:
StatMain := TThemeStatMain.Create;
StatDetail := TThemeStatDetail.Create;
+*)
LoadTheme(FileName, Color);
@@ -900,6 +903,8 @@ var
I: integer;
Path: string;
begin
+ create_theme_objects();
+
Result := false;
if FileExists(FileName) then begin
Result := true;
@@ -910,7 +915,8 @@ begin
ThemeIni := TMemIniFile.Create(FileName);
{$ENDIF}
- if ThemeIni.ReadString('Theme', 'Name', '') <> '' then begin
+ if ThemeIni.ReadString('Theme', 'Name', '') <> '' then
+ begin
{Skin.SkinName := ThemeIni.ReadString('Theme', 'Name', 'Singstar');
Skin.SkinPath := 'Skins\' + Skin.SkinName + '\';
@@ -2313,5 +2319,94 @@ begin
DecimalSeparator := ',';
end;
+procedure TTheme.create_theme_objects();
+begin
+ freeandnil( Loading );
+ Loading := TThemeLoading.Create;
+
+ freeandnil( Main );
+ Main := TThemeMain.Create;
+
+ freeandnil( Name );
+ Name := TThemeName.Create;
+
+ freeandnil( Level );
+ Level := TThemeLevel.Create;
+
+ freeandnil( Song );
+ Song := TThemeSong.Create;
+
+ freeandnil( Sing );
+ Sing := TThemeSing.Create;
+
+ freeandnil( Score );
+ Score := TThemeScore.Create;
+
+ freeandnil( Top5 );
+ Top5 := TThemeTop5.Create;
+
+ freeandnil( Options );
+ Options := TThemeOptions.Create;
+
+ freeandnil( OptionsGame );
+ OptionsGame := TThemeOptionsGame.Create;
+
+ freeandnil( OptionsGraphics );
+ OptionsGraphics := TThemeOptionsGraphics.Create;
+
+ freeandnil( OptionsSound );
+ OptionsSound := TThemeOptionsSound.Create;
+
+ freeandnil( OptionsLyrics );
+ OptionsLyrics := TThemeOptionsLyrics.Create;
+
+ freeandnil( OptionsThemes );
+ OptionsThemes := TThemeOptionsThemes.Create;
+
+ freeandnil( OptionsRecord );
+ OptionsRecord := TThemeOptionsRecord.Create;
+
+ freeandnil( OptionsAdvanced );
+ OptionsAdvanced := TThemeOptionsAdvanced.Create;
+
+
+ freeandnil( ErrorPopup );
+ ErrorPopup := TThemeError.Create;
+
+ freeandnil( CheckPopup );
+ CheckPopup := TThemeCheck.Create;
+
+
+ freeandnil( SongMenu );
+ SongMenu := TThemeSongMenu.Create;
+
+ freeandnil( SongJumpto );
+ SongJumpto := TThemeSongJumpto.Create;
+
+ //Party Screens
+ freeandnil( PartyNewRound );
+ PartyNewRound := TThemePartyNewRound.Create;
+
+ freeandnil( PartyWin );
+ PartyWin := TThemePartyWin.Create;
+
+ freeandnil( PartyScore );
+ PartyScore := TThemePartyScore.Create;
+
+ freeandnil( PartyOptions );
+ PartyOptions := TThemePartyOptions.Create;
+
+ freeandnil( PartyPlayer );
+ PartyPlayer := TThemePartyPlayer.Create;
+
+
+ //Stats Screens:
+ freeandnil( StatMain );
+ StatMain := TThemeStatMain.Create;
+
+ freeandnil( StatDetail );
+ StatDetail := TThemeStatDetail.Create;
+
+ end;
end.