From c7db744c1dcbafb38f25a5cb005219faf16134b8 Mon Sep 17 00:00:00 2001
From: b1indy <b1indy@b956fd51-792f-4845-bead-9b4dfca2ff2c>
Date: Thu, 3 May 2007 15:34:36 +0000
Subject: minor changes to PopUp code and to related parts of themes

git-svn-id: svn://svn.code.sf.net/p/ultrastardx/svn/trunk@160 b956fd51-792f-4845-bead-9b4dfca2ff2c
---
 Game/Code/Screens/UScreenPopup.pas | 14 ++++++--------
 1 file changed, 6 insertions(+), 8 deletions(-)

(limited to 'Game/Code/Screens')

diff --git a/Game/Code/Screens/UScreenPopup.pas b/Game/Code/Screens/UScreenPopup.pas
index a6e8ccca..019632ff 100644
--- a/Game/Code/Screens/UScreenPopup.pas
+++ b/Game/Code/Screens/UScreenPopup.pas
@@ -7,8 +7,6 @@ uses
 
 type
   TScreenPopupCheck = class(TMenu)
-    private
-      CurMenu: Byte; //Num of the cur. Shown Menu
     public
       Visible: Boolean; //Whether the Menu should be Drawn
 
@@ -30,7 +28,7 @@ type
       function ParseInput(PressedKey: Cardinal; ScanCode: byte; PressedDown: Boolean): Boolean; override;
       procedure onShow; override;
       procedure onHide; override;
-      procedure ShowPopup(msg: array of String);
+      procedure ShowPopup(msg: String);
       function Draw: boolean; override;
   end;
 
@@ -220,6 +218,7 @@ begin
 
       SDLK_ESCAPE :
         begin
+          Visible:=False;
           Result := false;
         end;
 
@@ -280,17 +279,15 @@ end;
 procedure TScreenPopupError.onHide;
 var i: integer;
 begin
-  for i:=0 to high(Text) do
-    Text[i].Text:='';
 end;
 
-procedure TScreenPopupError.ShowPopup(msg: array of String);
+procedure TScreenPopupError.ShowPopup(msg: String);
 var i: integer;
 begin
   Interaction := 0; //Reset Interaction
   Visible := True;  //Set Visible
 
-  //dirty hack... Text[0] is invisible for some strange reason
+{  //dirty hack... Text[0] is invisible for some strange reason
   for i:=1 to high(Text) do
     if i-1 <= high(msg) then
     begin
@@ -300,7 +297,8 @@ begin
     else
     begin
       Text[i].Visible:=False;
-    end;
+    end;}
+  Text[0].Text:=msg;
 
   Button[0].Visible := True;
 
-- 
cgit v1.2.3