aboutsummaryrefslogtreecommitdiffstats
path: root/Lua/src/screens/UScreenOptionsAdvanced.pas
diff options
context:
space:
mode:
authorwhiteshark0 <whiteshark0@b956fd51-792f-4845-bead-9b4dfca2ff2c>2009-12-11 17:34:54 +0000
committerwhiteshark0 <whiteshark0@b956fd51-792f-4845-bead-9b4dfca2ff2c>2009-12-11 17:34:54 +0000
commit1ab628e8ad6c85c8f1b562f10480253ee3e622b7 (patch)
treed21621f68850ecd7762137e1c4387fa15731a811 /Lua/src/screens/UScreenOptionsAdvanced.pas
parent6ec275387c320d3d9a8f5b6fe185687643565b8c (diff)
downloadusdx-1ab628e8ad6c85c8f1b562f10480253ee3e622b7.tar.gz
usdx-1ab628e8ad6c85c8f1b562f10480253ee3e622b7.tar.xz
usdx-1ab628e8ad6c85c8f1b562f10480253ee3e622b7.zip
merged trunk into lua branch
plugin loading is disabled atm because of a bug reading the files (lua may be the reason). Reading the files in usdx and passing the contents to lua may solve this git-svn-id: svn://svn.code.sf.net/p/ultrastardx/svn/branches/experimental@2019 b956fd51-792f-4845-bead-9b4dfca2ff2c
Diffstat (limited to '')
-rw-r--r--Lua/src/screens/UScreenOptionsAdvanced.pas67
1 files changed, 48 insertions, 19 deletions
diff --git a/Lua/src/screens/UScreenOptionsAdvanced.pas b/Lua/src/screens/UScreenOptionsAdvanced.pas
index 8960640d..7116ad40 100644
--- a/Lua/src/screens/UScreenOptionsAdvanced.pas
+++ b/Lua/src/screens/UScreenOptionsAdvanced.pas
@@ -34,28 +34,37 @@ interface
{$I switches.inc}
uses
- UMenu, SDL, UDisplay, UMusic, UFiles, UIni, UThemes;
+ SDL,
+ UMenu,
+ 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;
+ function ParseInput(PressedKey: cardinal; CharCode: UCS4Char; PressedDown: boolean): boolean; override;
+ procedure OnShow; override;
end;
implementation
-uses UGraphic, SysUtils;
+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
+ 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;
@@ -76,7 +85,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 +100,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 +110,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;
@@ -117,13 +129,30 @@ begin
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);
+ //AddSelect(Theme.OptionsAdvanced.SelectLoadAnimation, Ini.LoadAnimation, ILoadAnimationTranslated);
+ Theme.OptionsAdvanced.SelectScreenFade.showArrows := true;
+ Theme.OptionsAdvanced.SelectScreenFade.oneItemOnly := true;
+ AddSelectSlide(Theme.OptionsAdvanced.SelectScreenFade, Ini.ScreenFade, IScreenFadeTranslated);
+
+ Theme.OptionsAdvanced.SelectEffectSing.showArrows := true;
+ Theme.OptionsAdvanced.SelectEffectSing.oneItemOnly := true;
+ AddSelectSlide(Theme.OptionsAdvanced.SelectEffectSing, Ini.EffectSing, IEffectSingTranslated);
+
+ Theme.OptionsAdvanced.SelectLineBonus.showArrows := true;
+ Theme.OptionsAdvanced.SelectLineBonus.oneItemOnly := true;
+ AddSelectSlide(Theme.OptionsAdvanced.SelectLineBonus, Ini.LineBonus, ILineBonusTranslated);
+
+ Theme.OptionsAdvanced.SelectOnSongClick.showArrows := true;
+ Theme.OptionsAdvanced.SelectOnSongClick.oneItemOnly := true;
+ AddSelectSlide(Theme.OptionsAdvanced.SelectOnSongClick, Ini.OnSongClick, IOnSongClickTranslated);
+
+ Theme.OptionsAdvanced.SelectAskbeforeDel.showArrows := true;
+ Theme.OptionsAdvanced.SelectAskbeforeDel.oneItemOnly := true;
+ AddSelectSlide(Theme.OptionsAdvanced.SelectAskbeforeDel, Ini.AskBeforeDel, IAskbeforeDelTranslated);
+
+ Theme.OptionsAdvanced.SelectPartyPopup.showArrows := true;
+ Theme.OptionsAdvanced.SelectPartyPopup.oneItemOnly := true;
+ AddSelectSlide(Theme.OptionsAdvanced.SelectPartyPopup, Ini.PartyPopup, IPartyPopupTranslated);
AddButton(Theme.OptionsAdvanced.ButtonExit);
if (Length(Button[0].Text)=0) then
@@ -132,7 +161,7 @@ begin
Interaction := 0;
end;
-procedure TScreenOptionsAdvanced.onShow;
+procedure TScreenOptionsAdvanced.OnShow;
begin
inherited;