aboutsummaryrefslogtreecommitdiffstats
path: root/Game/Code
diff options
context:
space:
mode:
authorjaybinks <jaybinks@b956fd51-792f-4845-bead-9b4dfca2ff2c>2007-11-19 10:50:17 +0000
committerjaybinks <jaybinks@b956fd51-792f-4845-bead-9b4dfca2ff2c>2007-11-19 10:50:17 +0000
commita9a56693248a56dff57b0202d5a2ba6b933e435a (patch)
tree91049d3d863a8b7941608a5bd0ae66c99ccf0f91 /Game/Code
parenta8c9941f9f0f0b1560a1aefbdfd8a36ff184fa9e (diff)
downloadusdx-a9a56693248a56dff57b0202d5a2ba6b933e435a.tar.gz
usdx-a9a56693248a56dff57b0202d5a2ba6b933e435a.tar.xz
usdx-a9a56693248a56dff57b0202d5a2ba6b933e435a.zip
backported change from change#610
Modifed Theme selection screen, so ALL theme options are runtime changable. ( Without restart ) git-svn-id: svn://svn.code.sf.net/p/ultrastardx/svn/branches/1.0.1@612 b956fd51-792f-4845-bead-9b4dfca2ff2c
Diffstat (limited to '')
-rw-r--r--Game/Code/Screens/UScreenOptionsThemes.pas51
1 files changed, 24 insertions, 27 deletions
diff --git a/Game/Code/Screens/UScreenOptionsThemes.pas b/Game/Code/Screens/UScreenOptionsThemes.pas
index e5f928c1..17b98c98 100644
--- a/Game/Code/Screens/UScreenOptionsThemes.pas
+++ b/Game/Code/Screens/UScreenOptionsThemes.pas
@@ -7,6 +7,8 @@ uses
type
TScreenOptionsThemes = class(TMenu)
+ private
+ procedure ReloadTheme;
public
SkinSelect: Integer;
constructor Create; override;
@@ -90,21 +92,9 @@ 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;
+
+ ReloadTheme();
end;
procedure TScreenOptionsThemes.InteractDec;
@@ -115,20 +105,9 @@ 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;
+
+ ReloadTheme();
end;
constructor TScreenOptionsThemes.Create;
@@ -156,4 +135,22 @@ begin
Interaction := 0;
end;
+procedure TScreenOptionsThemes.ReloadTheme;
+begin
+ Theme.LoadTheme('Themes\' + ITheme[Ini.Theme] + '.ini', Ini.Color);
+
+ ScreenOptionsThemes := TScreenOptionsThemes.create();
+ ScreenOptionsThemes.onshow;
+ Display.ActualScreen := @ScreenOptionsThemes;
+
+ ScreenOptionsThemes.Interaction := self.Interaction;
+ ScreenOptionsThemes.Draw;
+
+
+ Display.Draw;
+ SwapBuffers;
+
+ freeandnil( self );
+end;
+
end.