From 3dc26d2e5c5b360f844ea23c3f60ea4178f6f883 Mon Sep 17 00:00:00 2001 From: tobigun Date: Thu, 23 Jul 2009 14:42:01 +0000 Subject: merge with current trunk revision 1827 git-svn-id: svn://svn.code.sf.net/p/ultrastardx/svn/branches/experimental@1855 b956fd51-792f-4845-bead-9b4dfca2ff2c --- unicode/src/screens/UScreenPopup.pas | 67 ++++++++++++++++++------------------ 1 file changed, 33 insertions(+), 34 deletions(-) (limited to 'unicode/src/screens/UScreenPopup.pas') diff --git a/unicode/src/screens/UScreenPopup.pas b/unicode/src/screens/UScreenPopup.pas index 74107117..c8b8a743 100644 --- a/unicode/src/screens/UScreenPopup.pas +++ b/unicode/src/screens/UScreenPopup.pas @@ -44,34 +44,33 @@ uses type TScreenPopupCheck = class(TMenu) public - Visible: Boolean; //Whether the Menu should be Drawn + Visible: boolean; //Whether the Menu should be Drawn constructor Create; override; - function ParseInput(PressedKey: Cardinal; CharCode: UCS4Char; PressedDown: Boolean): Boolean; override; + function ParseInput(PressedKey: cardinal; CharCode: UCS4Char; PressedDown: boolean): boolean; override; procedure onShow; override; - procedure ShowPopup(msg: String); + procedure ShowPopup(msg: string); function Draw: boolean; override; end; type TScreenPopupError = class(TMenu) { private - CurMenu: Byte; //Num of the cur. Shown Menu} + CurMenu: byte; //Num of the cur. Shown Menu} public - Visible: Boolean; //Whether the Menu should be Drawn + Visible: boolean; //Whether the Menu should be Drawn constructor Create; override; - function ParseInput(PressedKey: Cardinal; CharCode: UCS4Char; PressedDown: Boolean): Boolean; override; + function ParseInput(PressedKey: cardinal; CharCode: UCS4Char; PressedDown: boolean): boolean; override; procedure onShow; override; procedure onHide; override; - procedure ShowPopup(msg: String); + procedure ShowPopup(msg: string); function Draw: boolean; override; end; var -// ISelections: Array of String; - SelectValue: Integer; - +// ISelections: array of string; + SelectValue: integer; implementation @@ -86,10 +85,10 @@ uses UDisplay, UUnicodeUtils; -function TScreenPopupCheck.ParseInput(PressedKey: Cardinal; CharCode: UCS4Char; PressedDown: Boolean): Boolean; +function TScreenPopupCheck.ParseInput(PressedKey: cardinal; CharCode: UCS4Char; PressedDown: boolean): boolean; begin Result := true; - If (PressedDown) Then + if (PressedDown) then begin // Key Down // check normal keys case UCS4UpperCase(CharCode) of @@ -105,9 +104,9 @@ begin SDLK_ESCAPE, SDLK_BACKSPACE : begin - Display.CheckOK:=False; - Display.NextScreenWithCheck:=NIL; - Visible:=False; + Display.CheckOK := false; + Display.NextScreenWithCheck := NIL; + Visible := false; Result := false; end; @@ -124,14 +123,14 @@ begin ScreenSingModi.Finish; end; - Display.CheckOK:=True; + Display.CheckOK := true; end; 1: begin - Display.CheckOK:=False; - Display.NextScreenWithCheck:=NIL; + Display.CheckOK := false; + Display.NextScreenWithCheck := NIL; end; end; - Visible:=False; + Visible := false; Result := false; end; @@ -173,15 +172,15 @@ begin inherited; end; -procedure TScreenPopupCheck.ShowPopup(msg: String); +procedure TScreenPopupCheck.ShowPopup(msg: string); begin Interaction := 0; //Reset Interaction - Visible := True; //Set Visible + Visible := true; //Set Visible Text[0].Text := Language.Translate(msg); - Button[0].Visible := True; - Button[1].Visible := True; + Button[0].Visible := true; + Button[1].Visible := true; Button[0].Text[0].Text := Language.Translate('SONG_MENU_YES'); Button[1].Text[0].Text := Language.Translate('SONG_MENU_NO'); @@ -191,10 +190,10 @@ end; // error popup -function TScreenPopupError.ParseInput(PressedKey: Cardinal; CharCode: UCS4Char; PressedDown: Boolean): Boolean; +function TScreenPopupError.ParseInput(PressedKey: cardinal; CharCode: UCS4Char; PressedDown: boolean): boolean; begin Result := true; - If (PressedDown) Then + if (PressedDown) then begin // Key Down case PressedKey of @@ -206,13 +205,13 @@ begin SDLK_ESCAPE, SDLK_BACKSPACE : begin - Visible:=False; + Visible := false; Result := false; end; SDLK_RETURN: begin - Visible:=False; + Visible := false; Result := false; end; @@ -242,7 +241,7 @@ end; function TScreenPopupError.Draw: boolean; begin - Draw:=inherited Draw; + Draw := inherited Draw; end; procedure TScreenPopupError.onShow; @@ -255,26 +254,26 @@ procedure TScreenPopupError.onHide; begin end; -procedure TScreenPopupError.ShowPopup(msg: String); +procedure TScreenPopupError.ShowPopup(msg: string); begin Interaction := 0; //Reset Interaction - Visible := True; //Set Visible + Visible := true; //Set Visible Background.OnShow; { //dirty hack... Text[0] is invisible for some strange reason for i:=1 to high(Text) do if i-1 <= high(msg) then begin - Text[i].Visible:=True; + Text[i].Visible := true; Text[i].Text := msg[i-1]; end else begin - Text[i].Visible:=False; + Text[i].Visible := false; end;} - Text[0].Text:=msg; + Text[0].Text := msg; - Button[0].Visible := True; + Button[0].Visible := true; Button[0].Text[0].Text := 'OK'; end; -- cgit v1.2.3