From 962f21e84feb128c650c0478a6f7af337dacaee6 Mon Sep 17 00:00:00 2001 From: whiteshark0 Date: Thu, 15 Apr 2010 17:57:15 +0000 Subject: - port theme detection code from UIni to UThemes - load new value DefaultSkin from themefiles - load value Color (skins default color) from skinfiles - use default skin and color on first start - use default skin and color on theme/skin change git-svn-id: svn://svn.code.sf.net/p/ultrastardx/svn/trunk@2241 b956fd51-792f-4845-bead-9b4dfca2ff2c --- src/screens/UScreenOptionsThemes.pas | 20 +++++++++++++++++++- 1 file changed, 19 insertions(+), 1 deletion(-) (limited to 'src/screens') diff --git a/src/screens/UScreenOptionsThemes.pas b/src/screens/UScreenOptionsThemes.pas index 3da859fd..591b0fb2 100644 --- a/src/screens/UScreenOptionsThemes.pas +++ b/src/screens/UScreenOptionsThemes.pas @@ -137,6 +137,15 @@ begin begin Skin.OnThemeChange; UpdateSelectSlideOptions(Theme.OptionsThemes.SelectSkin, SkinSelect, ISkin, Ini.SkinNo); + + // set skin to themes default skin + Ini.SkinNo := Theme.Themes[Ini.Theme].DefaultSkin; + end; + + { set skins default color } + if (SelInteraction = 0) or (SelInteraction = 1) then + begin + Ini.Color := Skin.GetDefaultColor(Ini.SkinNo); end; ReloadTheme(); @@ -151,6 +160,15 @@ begin begin Skin.OnThemeChange; UpdateSelectSlideOptions (Theme.OptionsThemes.SelectSkin, SkinSelect, ISkin, Ini.SkinNo); + + // set skin to themes default skin + Ini.SkinNo := Theme.Themes[Ini.Theme].DefaultSkin; + end; + + { set skins default color } + if (SelInteraction = 0) or (SelInteraction = 1) then + begin + Ini.Color := Skin.GetDefaultColor(Ini.SkinNo); end; ReloadTheme(); @@ -188,7 +206,7 @@ end; procedure TScreenOptionsThemes.ReloadTheme; begin - Theme.LoadTheme(ThemePath.Append(ITheme[Ini.Theme] + '.ini'), Ini.Color); + Theme.LoadTheme(Ini.Theme, Ini.Color); ScreenOptionsThemes := TScreenOptionsThemes.create(); ScreenOptionsThemes.onshow; -- cgit v1.2.3