AGK for Pascal
ContentsIndexHome
PreviousUpNext
TAgkApplication.SetScene Method

Set the current scene to display. If the previously active scene has AutoFree set to True, then the previous scene will be freed.

Syntax
Pascal
procedure SetScene(const Scene: TAgkScene);
Parameters 
Description 
const Scene: TAgkScene 
the scene to display. 

The first time you call this method, the application loop will be started. In that case, this method will not return until the application is terminated. So with this typical construct: 

 

var
  App: TAgkApplication;
begin
  App := TAgkApplication.Create;
  App.Title := 'My Application'; // ...etc. set application options
  App.SetScene(TMyScene.Create);
end.

 

the SetScene method will return only when the application terminates. So you should set any application options (like screen size etc.) before you set the first scene.

Copyright (c) 2012. All rights reserved.