diff options
author | b1indy <b1indy@b956fd51-792f-4845-bead-9b4dfca2ff2c> | 2007-05-03 15:34:36 +0000 |
---|---|---|
committer | b1indy <b1indy@b956fd51-792f-4845-bead-9b4dfca2ff2c> | 2007-05-03 15:34:36 +0000 |
commit | c7db744c1dcbafb38f25a5cb005219faf16134b8 (patch) | |
tree | 8ab3b34d886c19778553e98c4402e13336997485 /Game/Code | |
parent | 7ddd1afb9bec5dca80a272a50ea02f6c3cfbc2b7 (diff) | |
download | usdx-c7db744c1dcbafb38f25a5cb005219faf16134b8.tar.gz usdx-c7db744c1dcbafb38f25a5cb005219faf16134b8.tar.xz usdx-c7db744c1dcbafb38f25a5cb005219faf16134b8.zip |
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
Diffstat (limited to '')
-rw-r--r-- | Game/Code/Menu/UDisplay.pas | 6 | ||||
-rw-r--r-- | Game/Code/Screens/UScreenPopup.pas | 14 |
2 files changed, 9 insertions, 11 deletions
diff --git a/Game/Code/Menu/UDisplay.pas b/Game/Code/Menu/UDisplay.pas index 428cc6c7..e6c0c4f0 100644 --- a/Game/Code/Menu/UDisplay.pas +++ b/Game/Code/Menu/UDisplay.pas @@ -157,7 +157,7 @@ begin // check if we had an initialization error (canfade=false, dofade=true)
if doFade and not canFade then begin
doFade:=False; //disable fading
- ScreenPopupError.ShowPopup(['Error initializing','fade texture','','fading','disabled']); //show error message
+ ScreenPopupError.ShowPopup('Error initializing\nfade texture\n\nfading\ndisabled'); //show error message
end;
if doFade and canFade then
begin
@@ -169,10 +169,10 @@ begin ActualScreen.Draw;
glBindTexture(GL_TEXTURE_2D, pTex[S]);
glCopyTexImage2D(GL_TEXTURE_2D, 0, GL_RGB, 0, 0, 512, 512, 0);
- if glGetError <> GL_NO_ERROR then
+ if glGetError = GL_NO_ERROR then
begin
canFade := False;
- ScreenPopupError.ShowPopup(['Error copying','fade texture','','fading','disabled']); //show error message
+ ScreenPopupError.ShowPopup('Error copying\nfade texture\nfading\ndisabled'); //show error message
end;
glViewPort((S-1) * ScreenW div Screens, 0, ScreenW div Screens, ScreenH);
NextScreen.onShow;
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;
|