aboutsummaryrefslogtreecommitdiffstats
path: root/Game/Code/Screens
diff options
context:
space:
mode:
authorjaybinks <jaybinks@b956fd51-792f-4845-bead-9b4dfca2ff2c>2007-11-02 11:14:33 +0000
committerjaybinks <jaybinks@b956fd51-792f-4845-bead-9b4dfca2ff2c>2007-11-02 11:14:33 +0000
commit35b7a40253bd38d1e1df8469d4151e99f9978850 (patch)
treee98373f983ad3cc52d9c00b1a493103b42d17f8e /Game/Code/Screens
parentfd6d416f75bc316dca4356b5b8e5c7e317d1f156 (diff)
downloadusdx-35b7a40253bd38d1e1df8469d4151e99f9978850.tar.gz
usdx-35b7a40253bd38d1e1df8469d4151e99f9978850.tar.xz
usdx-35b7a40253bd38d1e1df8469d4151e99f9978850.zip
Runtime theme changing - jira#USDX-156
git-svn-id: svn://svn.code.sf.net/p/ultrastardx/svn/trunk@552 b956fd51-792f-4845-bead-9b4dfca2ff2c
Diffstat (limited to '')
-rw-r--r--Game/Code/Screens/UScreenOptionsThemes.pas51
1 files changed, 48 insertions, 3 deletions
diff --git a/Game/Code/Screens/UScreenOptionsThemes.pas b/Game/Code/Screens/UScreenOptionsThemes.pas
index 750e8859..5b7e4d43 100644
--- a/Game/Code/Screens/UScreenOptionsThemes.pas
+++ b/Game/Code/Screens/UScreenOptionsThemes.pas
@@ -37,13 +37,28 @@ begin
SDLK_BACKSPACE :
begin
Ini.Save;
+
+ // Reload all screens, after Theme changed
+ // Todo : JB - Check if theme was actually changed
+ UGraphic.UnLoadScreens();
+ UGraphic.LoadScreens();
+
AudioPlayback.PlayBack;
FadeTo(@ScreenOptions);
end;
SDLK_RETURN:
begin
- if SelInteraction = 3 then begin
+ if SelInteraction = 3 then
+ begin
Ini.Save;
+
+ // Reload all screens, after Theme changed
+ // Todo : JB - Check if theme was actually changed
+ UGraphic.UnLoadScreens();
+ UGraphic.LoadScreens();
+
+ UGraphic.LoadScreens();
+
AudioPlayback.PlayBack;
FadeTo(@ScreenOptions);
end;
@@ -54,14 +69,16 @@ begin
InteractPrev;
SDLK_RIGHT:
begin
- if (SelInteraction >= 0) and (SelInteraction <= 2) then begin
+ if (SelInteraction >= 0) and (SelInteraction <= 2) then
+ begin
AudioPlayback.PlayOption;
InteractInc;
end;
end;
SDLK_LEFT:
begin
- if (SelInteraction >= 0) and (SelInteraction <= 2) then begin
+ if (SelInteraction >= 0) and (SelInteraction <= 2) then
+ begin
AudioPlayback.PlayOption;
InteractDec;
end;
@@ -78,6 +95,20 @@ begin
begin
Skin.OnThemeChange;
UpdateSelectSlideOptions (Theme.OptionsThemes.SelectSkin, SkinSelect, ISkin, Ini.SkinNo);
+
+ Theme.LoadTheme('Themes\' + ITheme[Ini.Theme] + '.ini', Ini.Color);
+
+ ScreenOptionsThemes := TScreenOptionsThemes.create();
+ ScreenOptionsThemes.onshow;
+ Display.ActualScreen := @ScreenOptionsThemes;
+ ScreenOptionsThemes.Draw;
+
+
+ Display.Draw;
+ SwapBuffers;
+
+ freeandnil( self );
+
end;
end;
@@ -89,6 +120,20 @@ begin
begin
Skin.OnThemeChange;
UpdateSelectSlideOptions (Theme.OptionsThemes.SelectSkin, SkinSelect, ISkin, Ini.SkinNo);
+
+ Theme.LoadTheme('Themes\' + ITheme[Ini.Theme] + '.ini', Ini.Color);
+
+ ScreenOptionsThemes := TScreenOptionsThemes.create();
+ ScreenOptionsThemes.onshow;
+ Display.ActualScreen := @ScreenOptionsThemes;
+ ScreenOptionsThemes.Draw;
+
+
+ Display.Draw;
+ SwapBuffers;
+
+ freeandnil( self );
+
end;
end;