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
@@ -89,6 +89,12 @@ bool GetPlayerMovementYaw(float cameraYaw, float& movementYaw);
|
||||
bool IsPlayerMouseMoving();
|
||||
bool IsPlayerCameraDragging();
|
||||
void CancelPlayerMovement();
|
||||
// Touch joystick (screen axes, x right / y down, length 0..1); replaces the movement keys while active.
|
||||
void SetPlayerJoystick(bool active, float x, float y);
|
||||
// player.SetAttackKeyState for native input (touch attack button).
|
||||
void SetPlayerAttackKey(bool pressed);
|
||||
// True when handler is the window passed to player.SetGameWindow (game.GameWindow).
|
||||
bool IsPlayerGameWindow(const void* handler);
|
||||
void SetWeaponPower(uint32_t dwMinPower, uint32_t dwMaxPower, uint32_t dwMinMagicPower, uint32_t dwMaxMagicPower, uint32_t dwAddPower);
|
||||
void UpdateEquippedWeaponPower();
|
||||
bool HasEnoughArrow();
|
||||
|
||||
Reference in New Issue
Block a user