aboutsummaryrefslogtreecommitdiffstats
diff options
context:
space:
mode:
authorbrunzelchen <brunzelchen@b956fd51-792f-4845-bead-9b4dfca2ff2c>2010-06-17 14:55:48 +0000
committerbrunzelchen <brunzelchen@b956fd51-792f-4845-bead-9b4dfca2ff2c>2010-06-17 14:55:48 +0000
commitbb0c744c662768afe58908129c4813da39bd3399 (patch)
tree06cc4effd46f3da5d7a94aa76ce936923e03df0b
parent83633ef9c0cb3fcecadc1a6b7be66190f31b8a3b (diff)
downloadusdx-bb0c744c662768afe58908129c4813da39bd3399.tar.gz
usdx-bb0c744c662768afe58908129c4813da39bd3399.tar.xz
usdx-bb0c744c662768afe58908129c4813da39bd3399.zip
special chars in UScreenName, UScreenPartyPlayer, ScreenPartyPlayerM2 and UScreenSongMenu (Playlist)
git-svn-id: svn://svn.code.sf.net/p/ultrastardx/svn/branches/1.0.1 Challenge MOD@2537 b956fd51-792f-4845-bead-9b4dfca2ff2c
-rw-r--r--Game/Code/Classes/UFiles.pas3
-rw-r--r--Game/Code/Screens/UScreenName.pas13
-rw-r--r--Game/Code/Screens/UScreenPartyPlayer.pas13
-rw-r--r--Game/Code/Screens/UScreenPartyPlayerM2.pas13
-rw-r--r--Game/Code/Screens/UScreenSongMenu.pas11
5 files changed, 29 insertions, 24 deletions
diff --git a/Game/Code/Classes/UFiles.pas b/Game/Code/Classes/UFiles.pas
index f9c281b1..acab9abd 100644
--- a/Game/Code/Classes/UFiles.pas
+++ b/Game/Code/Classes/UFiles.pas
@@ -727,7 +727,8 @@ begin
begin
Log.LogError('Note length error in sentence ' + IntToStr(line+1) + ', on beat ' + IntToStr(Czesci[p].Czesc[line].Nuta[note].Start) +
' in song ' + AktSong.Path + AktSong.Filename);
- //Exit;
+ if (Ini.LoadFaultySongs=0) then
+ Result := false;
end;
if(medley) then
diff --git a/Game/Code/Screens/UScreenName.pas b/Game/Code/Screens/UScreenName.pas
index 4f6289c3..ee81901f 100644
--- a/Game/Code/Screens/UScreenName.pas
+++ b/Game/Code/Screens/UScreenName.pas
@@ -28,6 +28,13 @@ var
SDL_ModState: Word;
begin
Result := true;
+
+ if not (ScanCode in [0..31, 127..159]) then
+ begin
+ Button[Interaction].Text[0].Text := Button[Interaction].Text[0].Text + chr(ScanCode);
+ Exit;
+ end;
+
If (PressedDown) Then
begin // Key Down
@@ -35,11 +42,6 @@ begin
+ KMOD_LCTRL + KMOD_RCTRL + KMOD_LALT + KMOD_RALT);
case PressedKey of
- SDLK_0..SDLK_9, SDLK_A..SDLK_Z, SDLK_SPACE, SDLK_MINUS, SDLK_EXCLAIM, SDLK_COMMA, SDLK_SLASH, SDLK_ASTERISK, SDLK_QUESTION, SDLK_QUOTE, SDLK_QUOTEDBL:
- begin
- Button[Interaction].Text[0].Text := Button[Interaction].Text[0].Text + chr(ScanCode);
- end;
-
SDLK_TAB:
begin
ScreenPopupHelp.ShowPopup();
@@ -193,6 +195,7 @@ begin
SDLK_UP: InteractPrev;
SDLK_RIGHT: InteractNext;
SDLK_LEFT: InteractPrev;
+
end;
end;
end;
diff --git a/Game/Code/Screens/UScreenPartyPlayer.pas b/Game/Code/Screens/UScreenPartyPlayer.pas
index 6c3000bb..0bf76615 100644
--- a/Game/Code/Screens/UScreenPartyPlayer.pas
+++ b/Game/Code/Screens/UScreenPartyPlayer.pas
@@ -65,8 +65,14 @@ var
end;
begin
-
Result := true;
+
+ if not (ScanCode in [0..31, 127..159]) then
+ begin
+ Button[Interaction].Text[0].Text := Button[Interaction].Text[0].Text + chr(ScanCode);
+ Exit;
+ end;
+
If (PressedDown) Then
begin // Key Down
SDL_ModState := SDL_GetModState and (KMOD_LSHIFT + KMOD_RSHIFT
@@ -244,11 +250,6 @@ begin
ScreenPopupHelp.ShowPopup();
end;
- SDLK_0..SDLK_9, SDLK_A..SDLK_Z, SDLK_SPACE, SDLK_MINUS, SDLK_EXCLAIM, SDLK_COMMA, SDLK_SLASH, SDLK_ASTERISK, SDLK_QUESTION, SDLK_QUOTE, SDLK_QUOTEDBL:
- begin
- Button[Interaction].Text[0].Text := Button[Interaction].Text[0].Text + chr(ScanCode);
- end;
-
// Templates for Names Mod
SDLK_F1:
if (SDL_ModState = KMOD_LALT) then
diff --git a/Game/Code/Screens/UScreenPartyPlayerM2.pas b/Game/Code/Screens/UScreenPartyPlayerM2.pas
index da96bf30..c51b6c97 100644
--- a/Game/Code/Screens/UScreenPartyPlayerM2.pas
+++ b/Game/Code/Screens/UScreenPartyPlayerM2.pas
@@ -39,23 +39,24 @@ var
end;
begin
Result := true;
+
+ if not (ScanCode in [0..31, 127..159]) then
+ begin
+ Button[Interaction].Text[0].Text := Button[Interaction].Text[0].Text + chr(ScanCode);
+ Exit;
+ end;
+
If (PressedDown) Then
begin // Key Down
SDL_ModState := SDL_GetModState and (KMOD_LSHIFT + KMOD_RSHIFT
+ KMOD_LCTRL + KMOD_RCTRL + KMOD_LALT + KMOD_RALT);
-
case PressedKey of
SDLK_TAB:
begin
ScreenPopupHelp.ShowPopup();
end;
- SDLK_0..SDLK_9, SDLK_A..SDLK_Z, SDLK_SPACE, SDLK_MINUS, SDLK_EXCLAIM, SDLK_COMMA, SDLK_SLASH, SDLK_ASTERISK, SDLK_QUESTION, SDLK_QUOTE, SDLK_QUOTEDBL:
- begin
- Button[Interaction].Text[0].Text := Button[Interaction].Text[0].Text + chr(ScanCode);
- end;
-
// Templates for Names Mod
SDLK_F1:
if (SDL_ModState = KMOD_LALT) then
diff --git a/Game/Code/Screens/UScreenSongMenu.pas b/Game/Code/Screens/UScreenSongMenu.pas
index c61331b8..1a3ee675 100644
--- a/Game/Code/Screens/UScreenSongMenu.pas
+++ b/Game/Code/Screens/UScreenSongMenu.pas
@@ -66,13 +66,12 @@ begin
if (CurMenu = SM_Playlist_New) AND (Interaction=0) then
begin
+ if not (ScanCode in [0..31, 127..159]) then
+ begin
+ Button[Interaction].Text[0].Text := Button[Interaction].Text[0].Text + chr(ScanCode);
+ Exit;
+ end;
case PressedKey of
- SDLK_0..SDLK_9, SDLK_A..SDLK_Z, SDLK_SPACE, SDLK_MINUS, SDLK_EXCLAIM, SDLK_COMMA, SDLK_SLASH, SDLK_ASTERISK, SDLK_QUESTION, SDLK_QUOTE, SDLK_QUOTEDBL:
- begin
- Button[Interaction].Text[0].Text := Button[Interaction].Text[0].Text + chr(ScanCode);
- exit;
- end;
-
SDLK_BACKSPACE:
begin
Button[Interaction].Text[0].DeleteLastL;