From 154b7014692602ea50a9fc556519a4e9212b2e43 Mon Sep 17 00:00:00 2001 From: brunzelchen Date: Sun, 28 Feb 2010 20:05:21 +0000 Subject: popup with error count on start up, if there were any errors during the start up procedure. shift+v for playing video with clicks (in editor) git-svn-id: svn://svn.code.sf.net/p/ultrastardx/svn/branches/1.0.1 Challenge MOD@2161 b956fd51-792f-4845-bead-9b4dfca2ff2c --- Game/Code/Classes/UGraphic.pas | 4 ++++ Game/Code/Classes/ULog.pas | 4 ++++ 2 files changed, 8 insertions(+) (limited to 'Game/Code/Classes') diff --git a/Game/Code/Classes/UGraphic.pas b/Game/Code/Classes/UGraphic.pas index bcb2aa65..0dae93a6 100644 --- a/Game/Code/Classes/UGraphic.pas +++ b/Game/Code/Classes/UGraphic.pas @@ -316,6 +316,10 @@ begin Log.BenchmarkStart(3); LoadScreens; + + if Log.NumErrors>0 then + ScreenMain.ShowNumErrors := true; + Display.ActualScreen^.FadeTo(@ScreenMain); Log.BenchmarkEnd(2); diff --git a/Game/Code/Classes/ULog.pas b/Game/Code/Classes/ULog.pas index ce6d5f07..ed7855bd 100644 --- a/Game/Code/Classes/ULog.pas +++ b/Game/Code/Classes/ULog.pas @@ -14,6 +14,8 @@ type FileError: TextFile; FileErrorO: boolean; // opened + NumErrors: integer; + Title: String; //Application Title //Should Log Files be written @@ -145,6 +147,7 @@ procedure TLog.LogError(Text: string); begin if Enabled AND (not FileErrorO) then begin FileErrorO := true; + NumErrors := 0; AssignFile(FileError, LogPath + 'Error.log'); {$I-} Rewrite(FileError); @@ -166,6 +169,7 @@ begin try WriteLn(FileError, Text); Flush(FileError); + Inc(NumErrors); except FileErrorO := false; end; -- cgit v1.2.3