WIP pushing menu to game engine - improving menu text clarity in ASCII mode
Signed-off-by: Hans Kokx <hans.d.kokx@gmail.com>
This commit is contained in:
@@ -37,13 +37,12 @@ class _GameScreenState extends State<GameScreen> {
|
||||
|
||||
@override
|
||||
Widget build(BuildContext context) {
|
||||
return WillPopScope(
|
||||
onWillPop: () async {
|
||||
if (_engine.isDifficultySelectionPending) {
|
||||
return PopScope<Object?>(
|
||||
canPop: _engine.difficulty != null,
|
||||
onPopInvokedWithResult: (didPop, result) {
|
||||
if (!didPop && _engine.difficulty == null) {
|
||||
widget.wolf3d.input.queueBackAction();
|
||||
return false;
|
||||
}
|
||||
return true;
|
||||
},
|
||||
child: Scaffold(
|
||||
body: LayoutBuilder(
|
||||
@@ -55,7 +54,7 @@ class _GameScreenState extends State<GameScreen> {
|
||||
return Listener(
|
||||
onPointerDown: (event) {
|
||||
widget.wolf3d.input.onPointerDown(event);
|
||||
if (_engine.isDifficultySelectionPending &&
|
||||
if (_engine.difficulty == null &&
|
||||
viewportRect.width > 0 &&
|
||||
viewportRect.height > 0 &&
|
||||
viewportRect.contains(event.localPosition)) {
|
||||
|
||||
Reference in New Issue
Block a user