#118/#121: the speed fader and the formation editor under a mouse
Both read raw touches, and the project no longer turns clicks into them - the same routing gap #93 fixed in the research tree. The boost was unreachable on a desktop and the formation could not be rearranged at all. Wrappers over the same press/drag logic in each case, never a second implementation, so the touch and mouse paths cannot drift apart. The wheel replaces the pinch in the formation editor: a mouse has no second finger, and zoom is the other half of what that panel does. The fader gets first refusal on a mouse press in GameController, so dragging the boost does not also pan or zoom the world behind it. Co-Authored-By: Claude Opus 5 <noreply@anthropic.com>
This commit is contained in:
parent
39ad050dc6
commit
8412280e71
4 changed files with 243 additions and 43 deletions
|
|
@ -293,8 +293,16 @@ func _unhandled_input(event: InputEvent) -> void:
|
|||
_handle_key(event)
|
||||
elif event is InputEventMouseMotion:
|
||||
_note_keyboard()
|
||||
elif event is InputEventMouseButton and event.pressed:
|
||||
if speed_fader != null:
|
||||
speed_fader.handle_mouse_motion(event)
|
||||
elif event is InputEventMouseButton:
|
||||
_note_keyboard()
|
||||
# #118: the fader gets first refusal, so dragging the boost does not
|
||||
# also pan or zoom the world behind it.
|
||||
if speed_fader != null and speed_fader.handle_mouse_button(event):
|
||||
return
|
||||
if not event.pressed:
|
||||
return
|
||||
# Wheel zoom, the desktop equivalent of the pinch.
|
||||
if event.button_index == MOUSE_BUTTON_WHEEL_UP:
|
||||
_set_zoom(camera.zoom.x * WHEEL_ZOOM_STEP)
|
||||
|
|
|
|||
Loading…
Reference in a new issue