aboutsummaryrefslogtreecommitdiffstats
path: root/Lua/src/screens/UScreenOptionsSound.pas
diff options
context:
space:
mode:
Diffstat (limited to '')
-rw-r--r--Lua/src/screens/UScreenOptionsSound.pas71
1 files changed, 50 insertions, 21 deletions
diff --git a/Lua/src/screens/UScreenOptionsSound.pas b/Lua/src/screens/UScreenOptionsSound.pas
index 80210f63..7556dceb 100644
--- a/Lua/src/screens/UScreenOptionsSound.pas
+++ b/Lua/src/screens/UScreenOptionsSound.pas
@@ -34,32 +34,41 @@ interface
{$I switches.inc}
uses
- UMenu, SDL, UDisplay, UMusic, UFiles, UIni, UThemes;
+ SDL,
+ UMenu,
+ UDisplay,
+ UMusic,
+ UFiles,
+ UIni,
+ UThemes;
type
TScreenOptionsSound = class(TMenu)
public
constructor Create; override;
- function ParseInput(PressedKey: cardinal; CharCode: widechar;
+ function ParseInput(PressedKey: Cardinal; CharCode: UCS4Char;
PressedDown: boolean): boolean; override;
- procedure onShow; override;
+ procedure OnShow; override;
end;
implementation
-uses UGraphic, SysUtils;
+uses
+ UGraphic,
+ UUnicodeUtils,
+ SysUtils;
function TScreenOptionsSound.ParseInput(PressedKey: cardinal;
- CharCode: widechar; PressedDown: boolean): boolean;
+ CharCode: UCS4Char; PressedDown: boolean): boolean;
begin
- Result := True;
+ 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;
+ Result := false;
Exit;
end;
end;
@@ -128,19 +137,39 @@ begin
LoadFromTheme(Theme.OptionsSound);
- AddSelectSlide(Theme.OptionsSound.SelectSlideVoicePassthrough,
- Ini.VoicePassthrough, IVoicePassthrough);
- AddSelectSlide(Theme.OptionsSound.SelectBackgroundMusic,
- Ini.BackgroundMusicOption, IBackgroundMusic);
- AddSelectSlide(Theme.OptionsSound.SelectMicBoost, Ini.MicBoost, IMicBoost);
+ Theme.OptionsSound.SelectSlideVoicePassthrough.showArrows := true;
+ Theme.OptionsSound.SelectSlideVoicePassthrough.oneItemOnly := true;
+ AddSelectSlide(Theme.OptionsSound.SelectSlideVoicePassthrough, Ini.VoicePassthrough, IVoicePassthroughTranslated);
+
+ Theme.OptionsSound.SelectBackgroundMusic.showArrows := true;
+ Theme.OptionsSound.SelectBackgroundMusic.oneItemOnly := true;
+ AddSelectSlide(Theme.OptionsSound.SelectBackgroundMusic, Ini.BackgroundMusicOption, IBackgroundMusicTranslated);
+
// TODO: - MicBoost needs to be moved to ScreenOptionsRecord
- AddSelectSlide(Theme.OptionsSound.SelectClickAssist, Ini.ClickAssist, IClickAssist);
- AddSelectSlide(Theme.OptionsSound.SelectBeatClick, Ini.BeatClick, IBeatClick);
+ Theme.OptionsSound.SelectMicBoost.showArrows := true;
+ Theme.OptionsSound.SelectMicBoost.oneItemOnly := true;
+ AddSelectSlide(Theme.OptionsSound.SelectMicBoost, Ini.MicBoost, IMicBoostTranslated);
+
+
+ Theme.OptionsSound.SelectClickAssist.showArrows := true;
+ Theme.OptionsSound.SelectClickAssist.oneItemOnly := true;
+ AddSelectSlide(Theme.OptionsSound.SelectClickAssist, Ini.ClickAssist, IClickAssistTranslated);
+
+ Theme.OptionsSound.SelectBeatClick.showArrows := true;
+ Theme.OptionsSound.SelectBeatClick.oneItemOnly := true;
+ AddSelectSlide(Theme.OptionsSound.SelectBeatClick, Ini.BeatClick, IBeatClickTranslated);
+
+ Theme.OptionsSound.SelectThreshold.showArrows := true;
+ Theme.OptionsSound.SelectThreshold.oneItemOnly := true;
AddSelectSlide(Theme.OptionsSound.SelectThreshold, Ini.ThresholdIndex, IThreshold);
- AddSelectSlide(Theme.OptionsSound.SelectSlidePreviewVolume,
- Ini.PreviewVolume, IPreviewVolume);
- AddSelectSlide(Theme.OptionsSound.SelectSlidePreviewFading,
- Ini.PreviewFading, IPreviewFading);
+
+ Theme.OptionsSound.SelectSlidePreviewVolume.showArrows := true;
+ Theme.OptionsSound.SelectSlidePreviewVolume.oneItemOnly := true;
+ AddSelectSlide(Theme.OptionsSound.SelectSlidePreviewVolume, Ini.PreviewVolume, IPreviewVolumeTranslated);
+
+ Theme.OptionsSound.SelectSlidePreviewFading.showArrows := true;
+ Theme.OptionsSound.SelectSlidePreviewFading.oneItemOnly := true;
+ AddSelectSlide(Theme.OptionsSound.SelectSlidePreviewFading, Ini.PreviewFading, IPreviewFadingTranslated);
AddButton(Theme.OptionsSound.ButtonExit);
if (Length(Button[0].Text) = 0) then
@@ -149,7 +178,7 @@ begin
Interaction := 0;
end;
-procedure TScreenOptionsSound.onShow;
+procedure TScreenOptionsSound.OnShow;
begin
inherited;
Interaction := 0;