diff options
Diffstat (limited to 'Game/Code/Screens')
-rw-r--r-- | Game/Code/Screens/UScreenMain.pas | 31 |
1 files changed, 25 insertions, 6 deletions
diff --git a/Game/Code/Screens/UScreenMain.pas b/Game/Code/Screens/UScreenMain.pas index 085f253d..af27b9b1 100644 --- a/Game/Code/Screens/UScreenMain.pas +++ b/Game/Code/Screens/UScreenMain.pas @@ -25,7 +25,7 @@ type implementation
-uses Windows, UGraphic, UMain, UIni, UTexture, USongs, Textgl, opengl, ULanguage, UParty, UDLLManager, UScreenCredits, USkins;
+uses Windows, UGraphic, UMain, UIni, UTexture, USongs, Textgl, opengl, ULanguage, UParty, UDLLManager, UScreenCredits, USkins, ULog;
function TScreenMain.ParseInput(PressedKey: Cardinal; ScanCode: byte; PressedDown: Boolean): Boolean;
@@ -62,11 +62,30 @@ begin begin
if (SDL_ModState = KMOD_LALT) then
begin
- //Credits_Y := 600;
- //Credits_Alpha := 0;
- //Credits_Visible := True;
- Music.PlayStart;
- FadeTo(@ScreenCredits);
+ //If CreditsScreen is not Created -> Then Create
+ If (ScreenCredits = nil) then
+ begin
+ try
+ //Display White Loading Text
+ SetFontStyle(2); //Font: Outlined1
+ SetFontSize(12);
+ SetFontItalic(False);
+ SetFontPos (400 - glTextWidth ('Loading Credits ...')/2, 250); //Position
+ glColor4f(1,1,1,1);
+ glPrint('Loading Credits ...');
+ SwapBuffers;
+
+ ScreenCredits := TScreenCredits.Create;
+ except
+ Log.LogError ('Couldn''t Create Credits Screen');
+ end;
+ end;
+
+ If (ScreenCredits <> nil) then
+ begin
+ Music.PlayStart;
+ FadeTo(@ScreenCredits);
+ end;
end;
end;
SDLK_M:
|