Refactor menu structure and add Flutter-specific input and persistence layers
- Moved menu-related classes to a new structure under `src/menu/`. - Introduced `WolfMenuPresentation` to handle menu art and mappings. - Added `MenuManager` tests to ensure menu state reflects game status. - Implemented `FlutterRendererSettingsPersistence` and `FlutterSaveGamePersistence` for managing settings and save files on desktop platforms. - Created `Wolf3dFlutterInput` to handle keyboard and mouse input in a Flutter environment. - Updated README to reflect new package structure and usage instructions. Signed-off-by: Hans Kokx <hans.d.kokx@gmail.com>
This commit is contained in:
@@ -41,13 +41,25 @@ final Wolf3dFlutterEngine engine = await Wolf3dFlutterEngine(
|
||||
|
||||
`init()` handles platform setup, audio init, and configured game-data discovery.
|
||||
|
||||
The facade itself lives in `lib/engine/wolf3d_flutter_engine.dart` and is re-exported
|
||||
through the package barrel at `lib/wolf_3d_flutter.dart`. External consumers
|
||||
should keep importing the barrel unless they have a specific reason to target
|
||||
the engine library directly.
|
||||
|
||||
The same pattern applies to the Flutter input adapter and the desktop
|
||||
persistence adapters: they now live in focused subdirectories and are
|
||||
re-exported through `lib/wolf_3d_flutter.dart`.
|
||||
|
||||
For full host wiring examples, see:
|
||||
|
||||
- `apps/wolf_3d_gui/lib/main.dart`
|
||||
|
||||
## Package Structure
|
||||
|
||||
- `lib/wolf_3d_flutter.dart` — exports main host facade and public Flutter APIs.
|
||||
- `lib/wolf_3d_flutter.dart` — barrel export for the public Flutter package surface.
|
||||
- `lib/engine/wolf3d_flutter_engine.dart` — high-level engine facade and discovery bootstrap.
|
||||
- `lib/input/` — Flutter-specific input adapters.
|
||||
- `lib/persistence/` — desktop persistence adapters for saves and renderer settings.
|
||||
- `lib/renderer/` — renderer host widgets.
|
||||
- `lib/managers/` — runtime/session/display/persistence managers.
|
||||
- `lib/audio/` — platform-aware audio backends.
|
||||
|
||||
Reference in New Issue
Block a user