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;
|
end;
|
||||||
|
|
||||||
procedure TformConfig.FormCreate(Sender: TObject);
|
procedure TformConfig.FormCreate(Sender: TObject);
|
||||||
|
var
|
||||||
|
i: Integer;
|
||||||
begin
|
begin
|
||||||
TranslateUI();
|
TranslateUI();
|
||||||
|
|
||||||
|
// Initialize modules
|
||||||
|
for i := 0 to GetModuleCount() do
|
||||||
|
GetModule(i).InitModule();
|
||||||
end;
|
end;
|
||||||
|
|
||||||
procedure TformConfig.TranslateUI;
|
procedure TformConfig.TranslateUI;
|
||||||
|
@@ -23,6 +23,7 @@ type
|
|||||||
procedure TranslateTexts(ALanguage: Integer);
|
procedure TranslateTexts(ALanguage: Integer);
|
||||||
procedure TranslateTextsToEnglish; virtual;
|
procedure TranslateTextsToEnglish; virtual;
|
||||||
procedure TranslateTextsToPortuguese; virtual;
|
procedure TranslateTextsToPortuguese; virtual;
|
||||||
|
procedure InitModule(); virtual;
|
||||||
procedure StartNewGame(); virtual; abstract;
|
procedure StartNewGame(); virtual; abstract;
|
||||||
procedure EndGame(); virtual; abstract;
|
procedure EndGame(); virtual; abstract;
|
||||||
end;
|
end;
|
||||||
@@ -73,8 +74,6 @@ begin
|
|||||||
imgLevel2 := TJPEGImage.Create;
|
imgLevel2 := TJPEGImage.Create;
|
||||||
imgLevel3 := TJPEGImage.Create;
|
imgLevel3 := TJPEGImage.Create;
|
||||||
|
|
||||||
LoadImages();
|
|
||||||
|
|
||||||
TranslateTexts(ID_ENGLISH);
|
TranslateTexts(ID_ENGLISH);
|
||||||
end;
|
end;
|
||||||
|
|
||||||
@@ -119,6 +118,11 @@ begin
|
|||||||
|
|
||||||
end;
|
end;
|
||||||
|
|
||||||
|
procedure TTappyModule.InitModule;
|
||||||
|
begin
|
||||||
|
LoadImages();
|
||||||
|
end;
|
||||||
|
|
||||||
initialization
|
initialization
|
||||||
gTappyModules := TFPList.Create;
|
gTappyModules := TFPList.Create;
|
||||||
finalization
|
finalization
|
||||||
|
@@ -101,6 +101,10 @@
|
|||||||
<UnitOutputDirectory Value="lib\$(TargetCPU)-$(TargetOS)"/>
|
<UnitOutputDirectory Value="lib\$(TargetCPU)-$(TargetOS)"/>
|
||||||
</SearchPaths>
|
</SearchPaths>
|
||||||
<Linking>
|
<Linking>
|
||||||
|
<Debugging>
|
||||||
|
<GenerateDebugInfo Value="True"/>
|
||||||
|
<GenerateDwarf Value="True"/>
|
||||||
|
</Debugging>
|
||||||
<Options>
|
<Options>
|
||||||
<Win32>
|
<Win32>
|
||||||
<GraphicApplication Value="True"/>
|
<GraphicApplication Value="True"/>
|
||||||
|
Reference in New Issue
Block a user