Add touch input router for mobile (step 3)
Route each finger to UI, the attack button, a floating lower-left joystick or the camera (drag rotate, pinch zoom, tap = world click). Touch mode is default on Android/iOS and available on desktop via --touch / AVA2_TOUCH=1; it disables SDL touch-to-mouse and drives app.ENABLE_MOBILE_HUD. The joystick feeds the original camera-relative movement path and the attack button sets the same attack-key state as player.SetAttackKeyState. New `touch` Python module; the mobile HUD joystick and combat wheel become display-only. Tests: ava2.touch_router, ava2.touch_game (GameWindow + mobile HUD). Co-Authored-By: Claude Opus 5.5 <noreply@anthropic.com>
This commit is contained in:
co-authored by
Claude Opus 5.5
parent
1dfdcba739
commit
5597842d90
@@ -17,6 +17,7 @@
|
||||
#include "python_net.h"
|
||||
#include "python_app.h"
|
||||
#include "python_dbg.h"
|
||||
#include "python_touch.h"
|
||||
#include "python_system.h"
|
||||
#include "python_wndmgr.h"
|
||||
#include "python_gameplay_modules.h"
|
||||
@@ -113,6 +114,7 @@ PythonRuntime::PythonRuntime(const std::filesystem::path& stdlib,const std::file
|
||||
if(PyImport_AppendInittab("pack",initpack)!=0 ||
|
||||
PyImport_AppendInittab("app",initapp)!=0 ||
|
||||
PyImport_AppendInittab("dbg",initdbg)!=0 ||
|
||||
PyImport_AppendInittab("touch",inittouch)!=0 ||
|
||||
PyImport_AppendInittab("systemSetting",initsystemSetting)!=0 ||
|
||||
PyImport_AppendInittab("wndMgr",initwndMgr)!=0 ||
|
||||
PyImport_AppendInittab("item",initItem)!=0 ||
|
||||
|
||||
Reference in New Issue
Block a user