You've already forked lazarus-ccr
tappytux: Moves image loading to Form.OnCreate to be able to show error messages
git-svn-id: https://svn.code.sf.net/p/lazarus-ccr/svn@2031 8e941d3f-bd1b-0410-a28a-d453659cc2b4
This commit is contained in:
@ -108,8 +108,14 @@ begin
|
||||
end;
|
||||
|
||||
procedure TformConfig.FormCreate(Sender: TObject);
|
||||
var
|
||||
i: Integer;
|
||||
begin
|
||||
TranslateUI();
|
||||
|
||||
// Initialize modules
|
||||
for i := 0 to GetModuleCount() do
|
||||
GetModule(i).InitModule();
|
||||
end;
|
||||
|
||||
procedure TformConfig.TranslateUI;
|
||||
|
@ -23,6 +23,7 @@ type
|
||||
procedure TranslateTexts(ALanguage: Integer);
|
||||
procedure TranslateTextsToEnglish; virtual;
|
||||
procedure TranslateTextsToPortuguese; virtual;
|
||||
procedure InitModule(); virtual;
|
||||
procedure StartNewGame(); virtual; abstract;
|
||||
procedure EndGame(); virtual; abstract;
|
||||
end;
|
||||
@ -73,8 +74,6 @@ begin
|
||||
imgLevel2 := TJPEGImage.Create;
|
||||
imgLevel3 := TJPEGImage.Create;
|
||||
|
||||
LoadImages();
|
||||
|
||||
TranslateTexts(ID_ENGLISH);
|
||||
end;
|
||||
|
||||
@ -119,6 +118,11 @@ begin
|
||||
|
||||
end;
|
||||
|
||||
procedure TTappyModule.InitModule;
|
||||
begin
|
||||
LoadImages();
|
||||
end;
|
||||
|
||||
initialization
|
||||
gTappyModules := TFPList.Create;
|
||||
finalization
|
||||
|
@ -101,6 +101,10 @@
|
||||
<UnitOutputDirectory Value="lib\$(TargetCPU)-$(TargetOS)"/>
|
||||
</SearchPaths>
|
||||
<Linking>
|
||||
<Debugging>
|
||||
<GenerateDebugInfo Value="True"/>
|
||||
<GenerateDwarf Value="True"/>
|
||||
</Debugging>
|
||||
<Options>
|
||||
<Win32>
|
||||
<GraphicApplication Value="True"/>
|
||||
|
Reference in New Issue
Block a user