feat: Add quit callback support to engine and UI components
Signed-off-by: Hans Kokx <hans.d.kokx@gmail.com>
This commit is contained in:
@@ -61,6 +61,7 @@ void main() async {
|
||||
),
|
||||
input: CliInput(),
|
||||
onGameWon: () => stopAndExit(0),
|
||||
onQuit: () => stopAndExit(0),
|
||||
);
|
||||
|
||||
engine.init();
|
||||
|
||||
@@ -45,6 +45,9 @@ class _GameScreenState extends State<GameScreen> {
|
||||
widget.wolf3d.clearActiveDifficulty();
|
||||
Navigator.of(context).pop();
|
||||
},
|
||||
onQuit: () {
|
||||
SystemNavigator.pop();
|
||||
},
|
||||
);
|
||||
}
|
||||
|
||||
|
||||
Reference in New Issue
Block a user