I can't seem to make it work. It doesn't appear that OnAppEvent is called :?
Nothing is written in the console window when the window loses focus or is minimized.Code:type TShooterGame = class(TSvPrototypeGame) public procedure OnAppEvent; override; end; procedure TShooterGame.OnAppEvent; begin inherited; WriteLn('AppEvent'); WriteLn(SV.Active); WriteLn(SV.Minimized); if not SV.Active or SV.Minimized then StopSong(Music) else PlaySong(Music, False); end;
Bookmarks