diff options
author | whiteshark0 <whiteshark0@b956fd51-792f-4845-bead-9b4dfca2ff2c> | 2010-04-15 17:57:15 +0000 |
---|---|---|
committer | whiteshark0 <whiteshark0@b956fd51-792f-4845-bead-9b4dfca2ff2c> | 2010-04-15 17:57:15 +0000 |
commit | 962f21e84feb128c650c0478a6f7af337dacaee6 (patch) | |
tree | 3400c21a7d5c4a8533905db658838eba3694b1e7 /src/screens | |
parent | 769eec744bdddb57279168deef4989eda85f9908 (diff) | |
download | usdx-962f21e84feb128c650c0478a6f7af337dacaee6.tar.gz usdx-962f21e84feb128c650c0478a6f7af337dacaee6.tar.xz usdx-962f21e84feb128c650c0478a6f7af337dacaee6.zip |
- 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
Diffstat (limited to 'src/screens')
-rw-r--r-- | src/screens/UScreenOptionsThemes.pas | 20 |
1 files changed, 19 insertions, 1 deletions
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; |