diff options
author | k-m_schindler <k-m_schindler@b956fd51-792f-4845-bead-9b4dfca2ff2c> | 2016-01-03 21:47:05 +0000 |
---|---|---|
committer | k-m_schindler <k-m_schindler@b956fd51-792f-4845-bead-9b4dfca2ff2c> | 2016-01-03 21:47:05 +0000 |
commit | 7e017d47108ec25fcf3c9bd86cccc79c27cd75f7 (patch) | |
tree | b97b750dc3926bd35dbc419687d43235e0a654af /src | |
parent | a79752b93f89470e0c1a494d448056c8517ce56d (diff) | |
download | usdx-7e017d47108ec25fcf3c9bd86cccc79c27cd75f7.tar.gz usdx-7e017d47108ec25fcf3c9bd86cccc79c27cd75f7.tar.xz usdx-7e017d47108ec25fcf3c9bd86cccc79c27cd75f7.zip |
change and prepare game options
git-svn-id: svn://svn.code.sf.net/p/ultrastardx/svn/trunk@3188 b956fd51-792f-4845-bead-9b4dfca2ff2c
Diffstat (limited to 'src')
-rw-r--r-- | src/screens/UScreenOptionsGame.pas | 72 |
1 files changed, 64 insertions, 8 deletions
diff --git a/src/screens/UScreenOptionsGame.pas b/src/screens/UScreenOptionsGame.pas index 39de61e4..16d72a79 100644 --- a/src/screens/UScreenOptionsGame.pas +++ b/src/screens/UScreenOptionsGame.pas @@ -45,7 +45,13 @@ uses type TScreenOptionsGame = class(TMenu) + private + procedure ReloadScreens; + public + ActualLanguage: integer; + ActualSongMenu: integer; + old_Tabs, old_Sorting: integer; constructor Create; override; function ParseInput(PressedKey: cardinal; CharCode: UCS4Char; PressedDown: boolean): boolean; override; @@ -56,9 +62,10 @@ type implementation uses + SysUtils, UGraphic, - UUnicodeUtils, - SysUtils; + UScreenSong, + UUnicodeUtils; function TScreenOptionsGame.ParseInput(PressedKey: cardinal; CharCode: UCS4Char; PressedDown: boolean): boolean; begin @@ -73,12 +80,13 @@ begin Exit; end; end; - + // check special keys case PressedKey of SDLK_ESCAPE, SDLK_BACKSPACE : begin + ReloadScreens; AudioPlayback.PlaySound(SoundLib.Back); RefreshSongs; FadeTo(@ScreenOptions); @@ -87,6 +95,7 @@ begin begin if SelInteraction = 6 then begin + ReloadScreens; AudioPlayback.PlaySound(SoundLib.Back); RefreshSongs; FadeTo(@ScreenOptions); @@ -137,7 +146,11 @@ begin Theme.OptionsGame.SelectLanguage.showArrows := true; Theme.OptionsGame.SelectLanguage.oneItemOnly := true; AddSelectSlide(Theme.OptionsGame.SelectLanguage, Ini.Language, ILanguageTranslated); - +{ + Theme.OptionsGame.SelectSongMenu.showArrows := true; + Theme.OptionsGame.SelectSongMenu.oneItemOnly := true; + AddSelectSlide(Theme.OptionsGame.SelectSongMenu, Ini.SongMenu, ISongMenuTranslated); +} Theme.OptionsGame.SelectTabs.showArrows := true; Theme.OptionsGame.SelectTabs.oneItemOnly := true; AddSelectSlide(Theme.OptionsGame.SelectTabs, Ini.Tabs, ITabsTranslated); @@ -145,16 +158,19 @@ begin Theme.OptionsGame.SelectSorting.showArrows := true; Theme.OptionsGame.SelectSorting.oneItemOnly := true; AddSelectSlide(Theme.OptionsGame.SelectSorting, Ini.Sorting, ISortingTranslated); - +{ + Theme.OptionsGame.SelectShowScores.showArrows := true; + Theme.OptionsGame.SelectShowScores.oneItemOnly := true; + AddSelectSlide(Theme.OptionsGame.SelectShowScores, Ini.ShowScores, IShowScoresTranslated); +} Theme.OptionsGame.SelectDebug.showArrows := true; Theme.OptionsGame.SelectDebug.oneItemOnly := true; AddSelectSlide(Theme.OptionsGame.SelectDebug, Ini.Debug, IDebugTranslated); - - AddButton(Theme.OptionsGame.ButtonExit); if (Length(Button[0].Text) = 0) then AddButtonText(20, 5, Theme.Options.Description[7]); +// AddButtonText(20, 5, Theme.Options.Description[10]); end; @@ -169,7 +185,47 @@ procedure TScreenOptionsGame.OnShow; begin inherited; -// Interaction := 0; + ActualLanguage := Ini.Language; +// for later addition ActualSongMenu := Ini.SongMenu; + + Interaction := 0; +end; + +procedure TScreenOptionsGame.ReloadScreens; +begin +{ for later adding + if(ActualSongMenu <> Ini.SongMenu) then + begin + Theme.ThemeSongLoad; + + ScreenSong.Free; + ScreenSong := TScreenSong.Create; + end; +} + // Reload all screens, after language change + if (ActualLanguage <> Ini.Language) then + begin +{ + //Language.ChangeLanguage(ILanguage[Ini.Language]); + Ini.Save; + + Language.Free; + Language := TLanguage.Create; + + Ini.Free; + Ini := TIni.Create; + //Ini.Load; + + Theme.Free; + Theme := TTheme.Create; + + Menu.Free; + Menu := TMenu.Create; + + UGraphic.UnLoadScreens(); + UGraphic.LoadScreens(true); +} + end; end; end. |