Interaction ideas from jhaizhou-ops/d2r-mobile (MIT), no code taken:
- world fingers in the bottom safe inset (gesture bar) are ignored
- SDL_EVENT_FINGER_CANCELED cancels one finger; a cancelled joystick
keeps its vector for 300 ms and a finger near the old base re-acquires it
- attack taps shorter than a frame release on the next Update
- cancelled UI touches and world taps park the pointer (no hover residue)
- long press on an empty inventory cell offers the original sort
Desktop ctest 59/59; sort sheet verified on the device.
Co-Authored-By: Claude Opus 5.5 <noreply@anthropic.com>
Engine-free AutoHunt state machine (search/engage/loot/return/paused) driven
from the game loop through the existing manual paths: move target, target
packet, normal attack, quickslot skills, item pick-up and belt potions.
player.SetAutoHunt/GetAutoHuntState/SetAutoHuntOption with autohunt.cfg;
AUTO button on the combat wheel (tap toggles, long press opens settings).
Tests: ava2.auto_hunt, extended ava2.touch_game; 54/54.
Co-Authored-By: Claude Opus 5.5 <noreply@anthropic.com>
Phones and tablets pick the logical UI size from the screen (height
600..768 from the dp height, width from the aspect ratio) instead of
letterboxing 1024x768; metin2.cfg is left untouched via a display-size
override. --phone/--safe-insets/--ui-height simulate on desktop. The
mobile HUD rebuilds and re-adopts the original windows when the safe
area changes. Keeps HUD gauge backgrounds alive and fixes the step-4
disc pixel check threshold.
Co-Authored-By: Claude Opus 5.5 <noreply@anthropic.com>
Native CDisc window for procedural round frames; ui_mobile_widgets
(RoundButton, QuickSlotDisc); HUD laid out as the phone plan: player
panel, top-right entry row with minimap, left button column, attack disc
with two quickslot rings, potion belt on quickslot page 4, exp bar. The
PC taskbar and its tooltips are hidden in mobile mode. Adds global
quickslot use/add/move for the belt.
Co-Authored-By: Claude Opus 5.5 <noreply@anthropic.com>
Move the macOS/Android data and config directory code out of main.cpp
into src/app/platform. Handle background/foreground: save config and
interface status, pause audio, cancel touch input and skip rendering
while keeping the network pumped. Map the window safe area through the
letterboxed presentation into TouchLayout and expose touch.GetSafeArea()
so the mobile HUD stays clear of notches and gesture bars.
Co-Authored-By: Claude Opus 5.5 <noreply@anthropic.com>
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>