aboutsummaryrefslogtreecommitdiffstats
diff options
context:
space:
mode:
-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.