diff options
author | b1indy <b1indy@b956fd51-792f-4845-bead-9b4dfca2ff2c> | 2007-05-03 00:19:52 +0000 |
---|---|---|
committer | b1indy <b1indy@b956fd51-792f-4845-bead-9b4dfca2ff2c> | 2007-05-03 00:19:52 +0000 |
commit | 5bf0ebf274fef28811ab952338bd261bd1dd0fa8 (patch) | |
tree | f6271ebd739455d74a7e6e4abd535c7ad3413b33 /Game/Code/Classes/UMain.pas | |
parent | 28b809432bd8064400bbc9a52a4e354debf86bb6 (diff) | |
download | usdx-5bf0ebf274fef28811ab952338bd261bd1dd0fa8.tar.gz usdx-5bf0ebf274fef28811ab952338bd261bd1dd0fa8.tar.xz usdx-5bf0ebf274fef28811ab952338bd261bd1dd0fa8.zip |
added "popups" to ask for confirmation when leaving party mode or game or to display messages (like minor errors)
still ugly, needs some theme work
git-svn-id: svn://svn.code.sf.net/p/ultrastardx/svn/trunk@157 b956fd51-792f-4845-bead-9b4dfca2ff2c
Diffstat (limited to '')
-rw-r--r-- | Game/Code/Classes/UMain.pas | 9 |
1 files changed, 7 insertions, 2 deletions
diff --git a/Game/Code/Classes/UMain.pas b/Game/Code/Classes/UMain.pas index c9002a36..69eca419 100644 --- a/Game/Code/Classes/UMain.pas +++ b/Game/Code/Classes/UMain.pas @@ -2,7 +2,7 @@ unit UMain; interface
uses SDL, UGraphic, UMusic, URecord, UTime, SysUtils, UDisplay, UIni, ULog, ULyrics, UScreenSing,
- OpenGL12, zlportio {you can disable it and all PortWriteB calls}, ULCD, ULight, UThemes;
+ OpenGL12, zlportio {you can disable it and all PortWriteB calls}, ULCD, ULight, UThemes{, UScreenPopup};
type
TPlayer = record
@@ -112,7 +112,7 @@ begin CheckEvents;
// display
- Display.Draw;
+ done:=not Display.Draw;
SwapBuffers;
// light
@@ -156,6 +156,11 @@ Begin End; // With}
SDL_KEYDOWN:
begin
+ // popup hack... if there is a visible popup then let it handle input instead of underlying screen
+ // shoud be done in a way to be sure the topmost popup has preference (maybe error, then check)
+ if ScreenPopupError <> NIL then if ScreenPopupError.Visible then ScreenPopupError.ParseInput(Event.key.keysym.sym, Event.key.keysym.unicode, True) else
+ if ScreenPopupCheck <> NIL then if ScreenPopupCheck.Visible then ScreenPopupCheck.ParseInput(Event.key.keysym.sym, Event.key.keysym.unicode, True) else
+ // end of popup hack
if (Not Display.ActualScreen^.ParseInput(Event.key.keysym.sym, Event.key.keysym.unicode, True)) then
// if (Not Display.ActualScreen^.ParseInput(Event.key.keysym.scancode, True)) then
done := true; // exit game
|