aboutsummaryrefslogtreecommitdiffstats
path: root/src/screens/UScreenPartyOptions.pas
diff options
context:
space:
mode:
Diffstat (limited to 'src/screens/UScreenPartyOptions.pas')
-rw-r--r--src/screens/UScreenPartyOptions.pas41
1 files changed, 21 insertions, 20 deletions
diff --git a/src/screens/UScreenPartyOptions.pas b/src/screens/UScreenPartyOptions.pas
index 5f7f1d9e..2deffda6 100644
--- a/src/screens/UScreenPartyOptions.pas
+++ b/src/screens/UScreenPartyOptions.pas
@@ -61,20 +61,20 @@ type
NumPlayer1, NumPlayer2, NumPlayer3: integer;
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;
procedure SetAnimationProgress(Progress: real); override;
procedure SetPlaylist2;
end;
var
- IPlaylist: array[0..2] of string;
- IPlaylist2: array of string;
+ IPlaylist: array[0..2] of UTF8String;
+ IPlaylist2: array of UTF8String;
const
- ITeams: array[0..1] of string = ('2', '3');
- IPlayers: array[0..3] of string = ('1', '2', '3', '4');
- IRounds: array[0..5] of string = ('2', '3', '4', '5', '6', '7');
+ ITeams: array[0..1] of UTF8String = ('2', '3');
+ IPlayers: array[0..3] of UTF8String = ('1', '2', '3', '4');
+ IRounds: array[0..5] of UTF8String = ('2', '3', '4', '5', '6', '7');
implementation
@@ -88,9 +88,10 @@ uses
USong,
UDLLManager,
UPlaylist,
- USongs;
+ USongs,
+ UUnicodeUtils;
-function TScreenPartyOptions.ParseInput(PressedKey: cardinal; CharCode: WideChar; PressedDown: boolean): boolean;
+function TScreenPartyOptions.ParseInput(PressedKey: cardinal; CharCode: UCS4Char; PressedDown: boolean): boolean;
var
I, J: integer;
OnlyMultiPlayer: boolean;
@@ -99,8 +100,8 @@ begin
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;
@@ -239,14 +240,14 @@ begin
//Load Screen From Theme
LoadFromTheme(Theme.PartyOptions);
- SelectLevel := AddSelectSlide (Theme.PartyOptions.SelectLevel, Ini.Difficulty, Theme.ILevel);
- SelectPlayList := AddSelectSlide (Theme.PartyOptions.SelectPlayList, PlayList, IPlaylist);
- SelectPlayList2 := AddSelectSlide (Theme.PartyOptions.SelectPlayList2, PlayList2, IPlaylist2);
- SelectRounds := AddSelectSlide (Theme.PartyOptions.SelectRounds, Rounds, IRounds);
- SelectTeams := AddSelectSlide (Theme.PartyOptions.SelectTeams, NumTeams, ITeams);
- SelectPlayers1 := AddSelectSlide (Theme.PartyOptions.SelectPlayers1, NumPlayer1, IPlayers);
- SelectPlayers2 := AddSelectSlide (Theme.PartyOptions.SelectPlayers2, NumPlayer2, IPlayers);
- SelectPlayers3 := AddSelectSlide (Theme.PartyOptions.SelectPlayers3, NumPlayer3, IPlayers);
+ SelectLevel := AddSelectSlide(Theme.PartyOptions.SelectLevel, Ini.Difficulty, Theme.ILevel);
+ SelectPlayList := AddSelectSlide(Theme.PartyOptions.SelectPlayList, PlayList, IPlaylist);
+ SelectPlayList2 := AddSelectSlide(Theme.PartyOptions.SelectPlayList2, PlayList2, IPlaylist2);
+ SelectRounds := AddSelectSlide(Theme.PartyOptions.SelectRounds, Rounds, IRounds);
+ SelectTeams := AddSelectSlide(Theme.PartyOptions.SelectTeams, NumTeams, ITeams);
+ SelectPlayers1 := AddSelectSlide(Theme.PartyOptions.SelectPlayers1, NumPlayer1, IPlayers);
+ SelectPlayers2 := AddSelectSlide(Theme.PartyOptions.SelectPlayers2, NumPlayer2, IPlayers);
+ SelectPlayers3 := AddSelectSlide(Theme.PartyOptions.SelectPlayers3, NumPlayer3, IPlayers);
Interaction := 0;
@@ -301,7 +302,7 @@ begin
UpdateSelectSlideOptions(Theme.PartyOptions.SelectPlayList2, 2, IPlaylist2, Playlist2);
end;
-procedure TScreenPartyOptions.onShow;
+procedure TScreenPartyOptions.OnShow;
begin
inherited;