From 873f177f08dc7c4fe2d7e50bbe7709df98e238d3 Mon Sep 17 00:00:00 2001 From: k-m_schindler Date: Wed, 27 Aug 2008 14:58:32 +0000 Subject: rename Screen part2 git-svn-id: svn://svn.code.sf.net/p/ultrastardx/svn/trunk@1306 b956fd51-792f-4845-bead-9b4dfca2ff2c --- src/screens/UScreenOptionsAdvanced.pas | 113 +++++++++++++++++++++++++++++++++ 1 file changed, 113 insertions(+) create mode 100644 src/screens/UScreenOptionsAdvanced.pas (limited to 'src/screens/UScreenOptionsAdvanced.pas') diff --git a/src/screens/UScreenOptionsAdvanced.pas b/src/screens/UScreenOptionsAdvanced.pas new file mode 100644 index 00000000..be8895e1 --- /dev/null +++ b/src/screens/UScreenOptionsAdvanced.pas @@ -0,0 +1,113 @@ +unit UScreenOptionsAdvanced; + +interface + +{$I switches.inc} + +uses + UMenu, SDL, UDisplay, UMusic, UFiles, UIni, UThemes; + +type + TScreenOptionsAdvanced = class(TMenu) + public + constructor Create; override; + function ParseInput(PressedKey: Cardinal; CharCode: WideChar; PressedDown: Boolean): Boolean; override; + procedure onShow; override; + end; + +implementation + +uses UGraphic, SysUtils; + +function TScreenOptionsAdvanced.ParseInput(PressedKey: Cardinal; CharCode: WideChar; PressedDown: Boolean): Boolean; +begin + Result := true; + If (PressedDown) Then + begin // Key Down + // check normal keys + case WideCharUpperCase(CharCode)[1] of + 'Q': + begin + Result := false; + Exit; + end; + end; + + // check special keys + case PressedKey of + SDLK_ESCAPE, + SDLK_BACKSPACE : + begin + // Escape -> save nothing - just leave this screen + + AudioPlayback.PlaySound(SoundLib.Back); + FadeTo(@ScreenOptions); + end; + SDLK_RETURN: + begin + //SelectLoadAnimation Hidden because it is useless atm + //if SelInteraction = 7 then begin + if SelInteraction = 6 then begin + Ini.Save; + AudioPlayback.PlaySound(SoundLib.Back); + FadeTo(@ScreenOptions); + end; + end; + SDLK_DOWN: + InteractNext; + SDLK_UP : + InteractPrev; + SDLK_RIGHT: + begin + //SelectLoadAnimation Hidden because it is useless atm + //if (SelInteraction >= 0) and (SelInteraction <= 6) then begin + if (SelInteraction >= 0) and (SelInteraction <= 5) then begin + AudioPlayback.PlaySound(SoundLib.Option); + InteractInc; + end; + end; + SDLK_LEFT: + begin + //SelectLoadAnimation Hidden because it is useless atm + //if (SelInteraction >= 0) and (SelInteraction <= 6) then begin + if (SelInteraction >= 0) and (SelInteraction <= 5) then begin + AudioPlayback.PlaySound(SoundLib.Option); + InteractDec; + end; + end; + end; + end; +end; + +constructor TScreenOptionsAdvanced.Create; +//var +// I: integer; // Auto Removed, Unused Variable +begin + inherited Create; + + LoadFromTheme(Theme.OptionsAdvanced); + + //SelectLoadAnimation Hidden because it is useless atm + //AddSelect(Theme.OptionsAdvanced.SelectLoadAnimation, Ini.LoadAnimation, ILoadAnimation); + AddSelectSlide(Theme.OptionsAdvanced.SelectScreenFade, Ini.ScreenFade, IScreenFade); + AddSelectSlide(Theme.OptionsAdvanced.SelectEffectSing, Ini.EffectSing, IEffectSing); + AddSelectSlide(Theme.OptionsAdvanced.SelectLineBonus, Ini.LineBonus, ILineBonus); + AddSelectSlide(Theme.OptionsAdvanced.SelectOnSongClick, Ini.OnSongClick, IOnSongClick); + AddSelectSlide(Theme.OptionsAdvanced.SelectAskbeforeDel, Ini.AskBeforeDel, IAskbeforeDel); + AddSelectSlide(Theme.OptionsAdvanced.SelectPartyPopup, Ini.PartyPopup, IPartyPopup); + + AddButton(Theme.OptionsAdvanced.ButtonExit); + if (Length(Button[0].Text)=0) then + AddButtonText(14, 20, Theme.Options.Description[7]); + + Interaction := 0; +end; + +procedure TScreenOptionsAdvanced.onShow; +begin + inherited; + + Interaction := 0; +end; + +end. -- cgit v1.2.3 From 1ef212ba89e50965b6b3b2d756be2c17e110b3ee Mon Sep 17 00:00:00 2001 From: tobigun Date: Sat, 6 Sep 2008 09:53:53 +0000 Subject: Delphi-mode set for FPC git-svn-id: svn://svn.code.sf.net/p/ultrastardx/svn/trunk@1348 b956fd51-792f-4845-bead-9b4dfca2ff2c --- src/screens/UScreenOptionsAdvanced.pas | 4 ++++ 1 file changed, 4 insertions(+) (limited to 'src/screens/UScreenOptionsAdvanced.pas') diff --git a/src/screens/UScreenOptionsAdvanced.pas b/src/screens/UScreenOptionsAdvanced.pas index be8895e1..9460653d 100644 --- a/src/screens/UScreenOptionsAdvanced.pas +++ b/src/screens/UScreenOptionsAdvanced.pas @@ -2,6 +2,10 @@ unit UScreenOptionsAdvanced; interface +{$IFDEF FPC} + {$MODE Delphi} +{$ENDIF} + {$I switches.inc} uses -- cgit v1.2.3 From f16756422a5dbb24ce1b751bb9e2bb1de4f19713 Mon Sep 17 00:00:00 2001 From: tobigun Date: Tue, 23 Sep 2008 21:17:50 +0000 Subject: added file headers git-svn-id: svn://svn.code.sf.net/p/ultrastardx/svn/trunk@1404 b956fd51-792f-4845-bead-9b4dfca2ff2c --- src/screens/UScreenOptionsAdvanced.pas | 25 +++++++++++++++++++++++++ 1 file changed, 25 insertions(+) (limited to 'src/screens/UScreenOptionsAdvanced.pas') diff --git a/src/screens/UScreenOptionsAdvanced.pas b/src/screens/UScreenOptionsAdvanced.pas index 9460653d..8960640d 100644 --- a/src/screens/UScreenOptionsAdvanced.pas +++ b/src/screens/UScreenOptionsAdvanced.pas @@ -1,3 +1,28 @@ +{* UltraStar Deluxe - Karaoke Game + * + * UltraStar Deluxe is the legal property of its developers, whose names + * are too numerous to list here. Please refer to the COPYRIGHT + * file distributed with this source distribution. + * + * This program is free software; you can redistribute it and/or + * modify it under the terms of the GNU General Public License + * as published by the Free Software Foundation; either version 2 + * of the License, or (at your option) any later version. + * + * This program is distributed in the hope that it will be useful, + * but WITHOUT ANY WARRANTY; without even the implied warranty of + * MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the + * GNU General Public License for more details. + * + * You should have received a copy of the GNU General Public License + * along with this program; see the file COPYING. If not, write to + * the Free Software Foundation, Inc., 51 Franklin Street, Fifth Floor, + * Boston, MA 02110-1301, USA. + * + * $URL$ + * $Id$ + *} + unit UScreenOptionsAdvanced; interface -- cgit v1.2.3 From c7f5d683c1eae49e30ee42a76557661f57311b9e Mon Sep 17 00:00:00 2001 From: k-m_schindler Date: Sat, 25 Apr 2009 10:09:59 +0000 Subject: Cosmetics. No code change git-svn-id: svn://svn.code.sf.net/p/ultrastardx/svn/trunk@1694 b956fd51-792f-4845-bead-9b4dfca2ff2c --- src/screens/UScreenOptionsAdvanced.pas | 27 +++++++++++++++++++-------- 1 file changed, 19 insertions(+), 8 deletions(-) (limited to 'src/screens/UScreenOptionsAdvanced.pas') diff --git a/src/screens/UScreenOptionsAdvanced.pas b/src/screens/UScreenOptionsAdvanced.pas index 8960640d..f57ee865 100644 --- a/src/screens/UScreenOptionsAdvanced.pas +++ b/src/screens/UScreenOptionsAdvanced.pas @@ -34,24 +34,32 @@ interface {$I switches.inc} uses - UMenu, SDL, UDisplay, UMusic, UFiles, UIni, UThemes; + UMenu, + SDL, + UDisplay, + UMusic, + UFiles, + UIni, + UThemes; type TScreenOptionsAdvanced = class(TMenu) public constructor Create; override; - function ParseInput(PressedKey: Cardinal; CharCode: WideChar; PressedDown: Boolean): Boolean; override; + function ParseInput(PressedKey: cardinal; CharCode: WideChar; PressedDown: boolean): boolean; override; procedure onShow; override; end; implementation -uses UGraphic, SysUtils; +uses + UGraphic, + SysUtils; -function TScreenOptionsAdvanced.ParseInput(PressedKey: Cardinal; CharCode: WideChar; PressedDown: Boolean): Boolean; +function TScreenOptionsAdvanced.ParseInput(PressedKey: cardinal; CharCode: WideChar; PressedDown: boolean): boolean; begin Result := true; - If (PressedDown) Then + if (PressedDown) then begin // Key Down // check normal keys case WideCharUpperCase(CharCode)[1] of @@ -76,7 +84,8 @@ begin begin //SelectLoadAnimation Hidden because it is useless atm //if SelInteraction = 7 then begin - if SelInteraction = 6 then begin + if SelInteraction = 6 then + begin Ini.Save; AudioPlayback.PlaySound(SoundLib.Back); FadeTo(@ScreenOptions); @@ -90,7 +99,8 @@ begin begin //SelectLoadAnimation Hidden because it is useless atm //if (SelInteraction >= 0) and (SelInteraction <= 6) then begin - if (SelInteraction >= 0) and (SelInteraction <= 5) then begin + if (SelInteraction >= 0) and (SelInteraction <= 5) then + begin AudioPlayback.PlaySound(SoundLib.Option); InteractInc; end; @@ -99,7 +109,8 @@ begin begin //SelectLoadAnimation Hidden because it is useless atm //if (SelInteraction >= 0) and (SelInteraction <= 6) then begin - if (SelInteraction >= 0) and (SelInteraction <= 5) then begin + if (SelInteraction >= 0) and (SelInteraction <= 5) then + begin AudioPlayback.PlaySound(SoundLib.Option); InteractDec; end; -- cgit v1.2.3 From bee4da886058f54ec7e1901951b5c1bf05f8ea34 Mon Sep 17 00:00:00 2001 From: mogguh Date: Wed, 27 May 2009 22:09:26 +0000 Subject: All options do have one option visible now FIXED: SelectSlides with only two options did not show arrows on reelection ENHANCEMENT: Beautified some portions of UMenuSelectSlide.pas code git-svn-id: svn://svn.code.sf.net/p/ultrastardx/svn/trunk@1784 b956fd51-792f-4845-bead-9b4dfca2ff2c --- src/screens/UScreenOptionsAdvanced.pas | 17 +++++++++++++++++ 1 file changed, 17 insertions(+) (limited to 'src/screens/UScreenOptionsAdvanced.pas') diff --git a/src/screens/UScreenOptionsAdvanced.pas b/src/screens/UScreenOptionsAdvanced.pas index f57ee865..d5f58c72 100644 --- a/src/screens/UScreenOptionsAdvanced.pas +++ b/src/screens/UScreenOptionsAdvanced.pas @@ -129,11 +129,28 @@ begin //SelectLoadAnimation Hidden because it is useless atm //AddSelect(Theme.OptionsAdvanced.SelectLoadAnimation, Ini.LoadAnimation, ILoadAnimation); + Theme.OptionsAdvanced.SelectScreenFade.showArrows := true; + Theme.OptionsAdvanced.SelectScreenFade.oneItemOnly := true; AddSelectSlide(Theme.OptionsAdvanced.SelectScreenFade, Ini.ScreenFade, IScreenFade); + + Theme.OptionsAdvanced.SelectEffectSing.showArrows := true; + Theme.OptionsAdvanced.SelectEffectSing.oneItemOnly := true; AddSelectSlide(Theme.OptionsAdvanced.SelectEffectSing, Ini.EffectSing, IEffectSing); + + Theme.OptionsAdvanced.SelectLineBonus.showArrows := true; + Theme.OptionsAdvanced.SelectLineBonus.oneItemOnly := true; AddSelectSlide(Theme.OptionsAdvanced.SelectLineBonus, Ini.LineBonus, ILineBonus); + + Theme.OptionsAdvanced.SelectOnSongClick.showArrows := true; + Theme.OptionsAdvanced.SelectOnSongClick.oneItemOnly := true; AddSelectSlide(Theme.OptionsAdvanced.SelectOnSongClick, Ini.OnSongClick, IOnSongClick); + + Theme.OptionsAdvanced.SelectAskbeforeDel.showArrows := true; + Theme.OptionsAdvanced.SelectAskbeforeDel.oneItemOnly := true; AddSelectSlide(Theme.OptionsAdvanced.SelectAskbeforeDel, Ini.AskBeforeDel, IAskbeforeDel); + + Theme.OptionsAdvanced.SelectPartyPopup.showArrows := true; + Theme.OptionsAdvanced.SelectPartyPopup.oneItemOnly := true; AddSelectSlide(Theme.OptionsAdvanced.SelectPartyPopup, Ini.PartyPopup, IPartyPopup); AddButton(Theme.OptionsAdvanced.ButtonExit); -- cgit v1.2.3 From 036ad16426b7003cf872ce49d8854648217eba8b Mon Sep 17 00:00:00 2001 From: k-m_schindler Date: Sat, 27 Jun 2009 20:01:11 +0000 Subject: Translation of option values. part 2 git-svn-id: svn://svn.code.sf.net/p/ultrastardx/svn/trunk@1829 b956fd51-792f-4845-bead-9b4dfca2ff2c --- src/screens/UScreenOptionsAdvanced.pas | 14 +++++++------- 1 file changed, 7 insertions(+), 7 deletions(-) (limited to 'src/screens/UScreenOptionsAdvanced.pas') diff --git a/src/screens/UScreenOptionsAdvanced.pas b/src/screens/UScreenOptionsAdvanced.pas index d5f58c72..0fb8153c 100644 --- a/src/screens/UScreenOptionsAdvanced.pas +++ b/src/screens/UScreenOptionsAdvanced.pas @@ -128,30 +128,30 @@ begin LoadFromTheme(Theme.OptionsAdvanced); //SelectLoadAnimation Hidden because it is useless atm - //AddSelect(Theme.OptionsAdvanced.SelectLoadAnimation, Ini.LoadAnimation, ILoadAnimation); + //AddSelect(Theme.OptionsAdvanced.SelectLoadAnimation, Ini.LoadAnimation, ILoadAnimationTranslated); Theme.OptionsAdvanced.SelectScreenFade.showArrows := true; Theme.OptionsAdvanced.SelectScreenFade.oneItemOnly := true; - AddSelectSlide(Theme.OptionsAdvanced.SelectScreenFade, Ini.ScreenFade, IScreenFade); + AddSelectSlide(Theme.OptionsAdvanced.SelectScreenFade, Ini.ScreenFade, IScreenFadeTranslated); Theme.OptionsAdvanced.SelectEffectSing.showArrows := true; Theme.OptionsAdvanced.SelectEffectSing.oneItemOnly := true; - AddSelectSlide(Theme.OptionsAdvanced.SelectEffectSing, Ini.EffectSing, IEffectSing); + AddSelectSlide(Theme.OptionsAdvanced.SelectEffectSing, Ini.EffectSing, IEffectSingTranslated); Theme.OptionsAdvanced.SelectLineBonus.showArrows := true; Theme.OptionsAdvanced.SelectLineBonus.oneItemOnly := true; - AddSelectSlide(Theme.OptionsAdvanced.SelectLineBonus, Ini.LineBonus, ILineBonus); + AddSelectSlide(Theme.OptionsAdvanced.SelectLineBonus, Ini.LineBonus, ILineBonusTranslated); Theme.OptionsAdvanced.SelectOnSongClick.showArrows := true; Theme.OptionsAdvanced.SelectOnSongClick.oneItemOnly := true; - AddSelectSlide(Theme.OptionsAdvanced.SelectOnSongClick, Ini.OnSongClick, IOnSongClick); + AddSelectSlide(Theme.OptionsAdvanced.SelectOnSongClick, Ini.OnSongClick, IOnSongClickTranslated); Theme.OptionsAdvanced.SelectAskbeforeDel.showArrows := true; Theme.OptionsAdvanced.SelectAskbeforeDel.oneItemOnly := true; - AddSelectSlide(Theme.OptionsAdvanced.SelectAskbeforeDel, Ini.AskBeforeDel, IAskbeforeDel); + AddSelectSlide(Theme.OptionsAdvanced.SelectAskbeforeDel, Ini.AskBeforeDel, IAskbeforeDelTranslated); Theme.OptionsAdvanced.SelectPartyPopup.showArrows := true; Theme.OptionsAdvanced.SelectPartyPopup.oneItemOnly := true; - AddSelectSlide(Theme.OptionsAdvanced.SelectPartyPopup, Ini.PartyPopup, IPartyPopup); + AddSelectSlide(Theme.OptionsAdvanced.SelectPartyPopup, Ini.PartyPopup, IPartyPopupTranslated); AddButton(Theme.OptionsAdvanced.ButtonExit); if (Length(Button[0].Text)=0) then -- cgit v1.2.3 From 917901e8e33438c425aef50a0a7417f32d77b760 Mon Sep 17 00:00:00 2001 From: s_alexander Date: Mon, 9 Nov 2009 00:27:55 +0000 Subject: merged unicode branch (r1931) into trunk git-svn-id: svn://svn.code.sf.net/p/ultrastardx/svn/trunk@1939 b956fd51-792f-4845-bead-9b4dfca2ff2c --- src/screens/UScreenOptionsAdvanced.pas | 15 ++++++++------- 1 file changed, 8 insertions(+), 7 deletions(-) (limited to 'src/screens/UScreenOptionsAdvanced.pas') diff --git a/src/screens/UScreenOptionsAdvanced.pas b/src/screens/UScreenOptionsAdvanced.pas index 0fb8153c..7116ad40 100644 --- a/src/screens/UScreenOptionsAdvanced.pas +++ b/src/screens/UScreenOptionsAdvanced.pas @@ -34,8 +34,8 @@ interface {$I switches.inc} uses - UMenu, SDL, + UMenu, UDisplay, UMusic, UFiles, @@ -46,24 +46,25 @@ type TScreenOptionsAdvanced = class(TMenu) public constructor Create; override; - function ParseInput(PressedKey: cardinal; CharCode: WideChar; PressedDown: boolean): boolean; override; - procedure onShow; override; + function ParseInput(PressedKey: cardinal; CharCode: UCS4Char; PressedDown: boolean): boolean; override; + procedure OnShow; override; end; implementation uses UGraphic, + UUnicodeUtils, SysUtils; -function TScreenOptionsAdvanced.ParseInput(PressedKey: cardinal; CharCode: WideChar; PressedDown: boolean): boolean; +function TScreenOptionsAdvanced.ParseInput(PressedKey: cardinal; CharCode: UCS4Char; PressedDown: boolean): boolean; begin Result := true; if (PressedDown) then begin // Key Down // check normal keys - case WideCharUpperCase(CharCode)[1] of - 'Q': + case UCS4UpperCase(CharCode) of + Ord('Q'): begin Result := false; Exit; @@ -160,7 +161,7 @@ begin Interaction := 0; end; -procedure TScreenOptionsAdvanced.onShow; +procedure TScreenOptionsAdvanced.OnShow; begin inherited; -- cgit v1.2.3 From 54f567282784181b99a3012fd9db03dae60f361e Mon Sep 17 00:00:00 2001 From: k-m_schindler Date: Mon, 22 Feb 2010 18:27:15 +0000 Subject: screens code cleanup git-svn-id: svn://svn.code.sf.net/p/ultrastardx/svn/trunk@2146 b956fd51-792f-4845-bead-9b4dfca2ff2c --- src/screens/UScreenOptionsAdvanced.pas | 2 -- 1 file changed, 2 deletions(-) (limited to 'src/screens/UScreenOptionsAdvanced.pas') diff --git a/src/screens/UScreenOptionsAdvanced.pas b/src/screens/UScreenOptionsAdvanced.pas index 7116ad40..7a4ce15b 100644 --- a/src/screens/UScreenOptionsAdvanced.pas +++ b/src/screens/UScreenOptionsAdvanced.pas @@ -121,8 +121,6 @@ begin end; constructor TScreenOptionsAdvanced.Create; -//var -// I: integer; // Auto Removed, Unused Variable begin inherited Create; -- cgit v1.2.3 From ffd76ba736eb429e7b79891f288b35fdde472e53 Mon Sep 17 00:00:00 2001 From: brunzelchen Date: Tue, 16 Mar 2010 19:25:13 +0000 Subject: some theme edits (option menu) git-svn-id: svn://svn.code.sf.net/p/ultrastardx/svn/trunk@2203 b956fd51-792f-4845-bead-9b4dfca2ff2c --- src/screens/UScreenOptionsAdvanced.pas | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) (limited to 'src/screens/UScreenOptionsAdvanced.pas') diff --git a/src/screens/UScreenOptionsAdvanced.pas b/src/screens/UScreenOptionsAdvanced.pas index 7a4ce15b..4998d3ec 100644 --- a/src/screens/UScreenOptionsAdvanced.pas +++ b/src/screens/UScreenOptionsAdvanced.pas @@ -154,7 +154,7 @@ begin AddButton(Theme.OptionsAdvanced.ButtonExit); if (Length(Button[0].Text)=0) then - AddButtonText(14, 20, Theme.Options.Description[7]); + AddButtonText(20, 5, Theme.Options.Description[7]); Interaction := 0; end; -- cgit v1.2.3 From f40c3b34bc54791a1313e4fc2047b08554c8c59d Mon Sep 17 00:00:00 2001 From: k-m_schindler Date: Mon, 3 May 2010 21:58:30 +0000 Subject: ESC saves again. revert 1183. git-svn-id: svn://svn.code.sf.net/p/ultrastardx/svn/trunk@2338 b956fd51-792f-4845-bead-9b4dfca2ff2c --- src/screens/UScreenOptionsAdvanced.pas | 3 +-- 1 file changed, 1 insertion(+), 2 deletions(-) (limited to 'src/screens/UScreenOptionsAdvanced.pas') diff --git a/src/screens/UScreenOptionsAdvanced.pas b/src/screens/UScreenOptionsAdvanced.pas index 4998d3ec..dd727dd8 100644 --- a/src/screens/UScreenOptionsAdvanced.pas +++ b/src/screens/UScreenOptionsAdvanced.pas @@ -76,8 +76,7 @@ begin SDLK_ESCAPE, SDLK_BACKSPACE : begin - // Escape -> save nothing - just leave this screen - + Ini.Save; AudioPlayback.PlaySound(SoundLib.Back); FadeTo(@ScreenOptions); end; -- cgit v1.2.3