...
public
AdGUI: TAdGUI;
...
procedure TForm6.FormCreate(Sender: TObject);
var
i:integer;
AdSetup: TAdSetup;
begin
Randomize;
AdPerCounter := TAdPerformanceCounter.Create;
Cursor := crNone;
AdDraw := TAdDraw.Create(self);
AdDraw.Options := AdDraw.Options - [aoCulling];
AdDraw.DllName:='
AndorraDX93D.dll';
with AdDraw.Display
do
begin
DisplayMode :=dmWindowed;
Width :=800;
Height :=600;
BitDepth := ad32Bit;
end;
if AdDraw.Initialize
then
begin
Application.OnIdle := Idle;
AdImageList := TAdImageList.Create(AdDraw);
AdImageList.LoadFromFile(pathc+'
demo_wormhunter.ail');
AdPixelCollisionTester := TAdSpritePixelCollisionTester.Create(AdDraw);
AdSpriteEngine := TSpriteEngine.Create(AdDraw);
//GUI Menü
AdGUI := TAdGUI.Create(AdDraw);
AdGUI.Skin.LoadFromFile('
sunna.axs');
AdGUI.Cursors.LoadFromFile('
cursors.xml');
//Laden der Cursor
AdGUI.LoadFromFile('
VideoGUI.axg');
//GUI Menü
AdSplatterEffect := TAdParticleSystem.Create(AdDraw);
AdSplatterEffect.LoadFromFile(pathp + '
splatter.apf');
AdSplatterEffect.Texture := AdImageList.Find('
particle').Texture;
...
end
else
begin
ShowMessage(AdDraw.GetLastError);
halt;
end;
end;
procedure TForm6.Idle(Sender: TObject;
var Done: boolean);
var
keys:TKeys;
begin
if (AdDraw.CanDraw)
then
begin
AdPerCounter.Calculate;
AdDraw.ClearSurface(clBlack);
AdDraw.BeginScene;
ActTime := ActTime + AdPerCounter.TimeGap;
...
//GUI Menü Updaten
AdGUI.Update(AdPerCounter.TimeGap / 1000);
//GUI Menü Updaten
AdDraw.EndScene;
AdDraw.Flip;
end;
Done := false;
end;