feat: Enhance menu rendering and input handling

- Added support for new plugins: IrondashEngineContext and SuperNativeExtensions in the Flutter plugin registrant.
- Updated CMake configuration to include new plugins.
- Introduced a new dependency, super_clipboard, in pubspec.yaml.
- Enhanced the WolfEngine to set the menu background color.
- Implemented keyboard shortcuts for renderer mode toggling and ASCII theme cycling in CLI input handling.
- Updated menu manager to include a universal menu background color.
- Refactored ASCII and Sixel renderers to utilize the new menu background color and improved header drawing logic.
- Simplified the drawing of menu options sidebars and header bars across different renderers.
- Improved the layout and centering of menu titles in the header bar.

Signed-off-by: Hans Kokx <hans.d.kokx@gmail.com>
This commit is contained in:
2026-03-20 14:46:08 +01:00
parent 297f6f0260
commit 4d5b30f007
15 changed files with 740 additions and 324 deletions

View File

@@ -12,6 +12,7 @@ import 'package:wolf_3d_dart/wolf_3d_input.dart';
import 'package:wolf_3d_dart/wolf_3d_renderer.dart';
import 'package:wolf_3d_flutter/wolf_3d_flutter.dart';
import 'package:wolf_3d_flutter/wolf_3d_input_flutter.dart';
import 'package:wolf_3d_gui/screens/debug_tools_screen.dart';
import 'package:wolf_3d_renderer/wolf_3d_ascii_renderer.dart';
import 'package:wolf_3d_renderer/wolf_3d_flutter_renderer.dart';
import 'package:wolf_3d_renderer/wolf_3d_glsl_renderer.dart';
@@ -173,6 +174,11 @@ class _GameScreenState extends State<GameScreen> {
}
},
child: Scaffold(
floatingActionButton: FloatingActionButton(
onPressed: _openDebugTools,
tooltip: 'Open Debug Tools',
child: const Icon(Icons.bug_report),
),
body: LayoutBuilder(
builder: (context, constraints) {
return Listener(
@@ -336,6 +342,14 @@ class _GameScreenState extends State<GameScreen> {
_glslEffectsEnabled = !_glslEffectsEnabled;
}
void _openDebugTools() {
Navigator.of(context).push(
MaterialPageRoute(
builder: (_) => DebugToolsScreen(wolf3d: widget.wolf3d),
),
);
}
bool _handleHostShortcut(KeyEvent event) {
final HostShortcutHandler? customHandler = widget.hostShortcutHandler;
if (customHandler != null) {