diff options
Diffstat (limited to 'Game/Code/Classes')
-rw-r--r-- | Game/Code/Classes/UGraphic.pas | 11 | ||||
-rw-r--r-- | Game/Code/Classes/UMain.pas | 9 | ||||
-rw-r--r-- | Game/Code/Classes/UThemes.pas | 28 |
3 files changed, 45 insertions, 3 deletions
diff --git a/Game/Code/Classes/UGraphic.pas b/Game/Code/Classes/UGraphic.pas index 39eea53d..8b17a73d 100644 --- a/Game/Code/Classes/UGraphic.pas +++ b/Game/Code/Classes/UGraphic.pas @@ -9,7 +9,8 @@ uses UScreenEdit, UScreenEditConvert, UScreenEditHeader, UScreenOpen, UThemes, USkins, UScreenSongMenu, UScreenSongJumpto,
{Party Screens} UScreenSingModi, UScreenPartyNewRound, UScreenPartyScore, UScreenPartyOptions, UScreenPartyWin, UScreenPartyPlayer,
{Stats Screens} UScreenStatMain, UScreenStatDetail,
- {CreditsScreen} UScreenCredits;
+ {CreditsScreen} UScreenCredits,
+ {Popup for errors, etc.} UScreenPopup;
type
TRecR = record
@@ -71,6 +72,10 @@ var //CreditsScreen
ScreenCredits: TScreenCredits;
+ //popup mod
+ ScreenPopupCheck: TScreenPopupCheck;
+ ScreenPopupError: TScreenPopupError;
+
//Notes
Tex_Left: array[0..6] of TTexture;
Tex_Mid: array[0..6] of TTexture;
@@ -433,6 +438,10 @@ begin Log.BenchmarkEnd(3); Log.LogBenchmark('====> Screen SongMenu', 3); Log.BenchmarkStart(3);
ScreenSongJumpto := TScreenSongJumpto.Create;
Log.BenchmarkEnd(3); Log.LogBenchmark('====> Screen SongJumpto', 3); Log.BenchmarkStart(3);
+ ScreenPopupCheck := TScreenPopupCheck.Create;
+ Log.BenchmarkEnd(3); Log.LogBenchmark('====> Screen Popup (Check)', 3); Log.BenchmarkStart(3);
+ ScreenPopupError := TScreenPopupError.Create;
+ Log.BenchmarkEnd(3); Log.LogBenchmark('====> Screen Popup (Error)', 3); Log.BenchmarkStart(3);
ScreenPartyNewRound := TScreenPartyNewRound.Create;
Log.BenchmarkEnd(3); Log.LogBenchmark('====> Screen PartyNewRound', 3); Log.BenchmarkStart(3);
ScreenPartyScore := TScreenPartyScore.Create;
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
diff --git a/Game/Code/Classes/UThemes.pas b/Game/Code/Classes/UThemes.pas index 6004502e..ee88ca9c 100644 --- a/Game/Code/Classes/UThemes.pas +++ b/Game/Code/Classes/UThemes.pas @@ -460,6 +460,19 @@ type ButtonExit: TThemeButton;
end;
+ //Error- and Check-Popup
+ TThemeError = class(TThemeBasic)
+ Button1: TThemeButton;
+ TextError: TThemeText;
+ end;
+
+ TThemeCheck = class(TThemeBasic)
+ Button1: TThemeButton;
+ Button2: TThemeButton;
+ TextCheck: TThemeText;
+ end;
+
+
//ScreenSong Menue
TThemeSongMenu = class(TThemeBasic)
Button1: TThemeButton;
@@ -656,6 +669,9 @@ type OptionsThemes: TThemeOptionsThemes;
OptionsRecord: TThemeOptionsRecord;
OptionsAdvanced: TThemeOptionsAdvanced;
+ //error and check popup
+ ErrorPopup: TThemeError;
+ CheckPopup: TThemeCheck;
//ScreenSong extensions
SongMenu: TThemeSongMenu;
SongJumpto: TThemeSongJumpTo;
@@ -750,6 +766,9 @@ begin OptionsRecord := TThemeOptionsRecord.Create;
OptionsAdvanced := TThemeOptionsAdvanced.Create;
+ ErrorPopup := TThemeError.Create;
+ CheckPopup := TThemeCheck.Create;
+
SongMenu := TThemeSongMenu.Create;
SongJumpto := TThemeSongJumpto.Create;
//Party Screens
@@ -1157,6 +1176,15 @@ begin ThemeLoadSelect (OptionsAdvanced.SelectAskbeforeDel, 'OptionsAdvancedSelectAskbeforeDel');
ThemeLoadButton (OptionsAdvanced.ButtonExit, 'OptionsAdvancedButtonExit');
+ //error and check popup
+ ThemeLoadBasic (ErrorPopup, 'ErrorPopup');
+ ThemeLoadButton(ErrorPopup.Button1, 'ErrorPopupButton1');
+ ThemeLoadText (ErrorPopup.TextError,'ErrorPopupText');
+ ThemeLoadBasic (CheckPopup, 'CheckPopup');
+ ThemeLoadButton(CheckPopup.Button1, 'CheckPopupButton1');
+ ThemeLoadButton(CheckPopup.Button2, 'CheckPopupButton2');
+ ThemeLoadText(CheckPopup.TextCheck , 'CheckPopupText');
+
//Song Menu
ThemeLoadBasic (SongMenu, 'SongMenu');
ThemeLoadButton(SongMenu.Button1, 'SongMenuButton1');
|