application.setCurrentGame

Loads a game into the editor.

Prototype

  1. bOk = application.setCurrentGame ( hGame )

Description

Set hGame == nil to unload games.


Parameters

hGame - valid Game handle


Return values

bOk - true on success


Sample

  1. function onStageViewDestroy ( hView, hComponent )
  2.  
  3. application.setCurrentGame ( nil )
  4. this.unsetViewVariable ( hView, "hCurrentGame" )
  5. end
  6.  
  7. --------------------------------------------------------------------------------
  8.  
  9. function onStageViewFocusChanged ( hView, hComponent, bFocus )
  10.  
  11. if ( bFocus ) then
  12. application.setCurrentGame ( this.getViewVariable ( hView, "hCurrentGame" ) )
  13. end
  14. end

Available since ShiVa 2.0