#93: drive the research menu with a mouse, and close the hole under it
Two separate faults, both reported on the same ticket. The menu was inert under a mouse. Input reaches the tree as raw events through BuildController._unhandled_input, because a Control that consumes them through the GUI system swallows the drag, and the tree only ever read touch events. That was invisible while the project set emulate_touch_from_mouse and every click arrived as a synthetic touch; with that setting gone, nothing selects and nothing scrolls, and there is no other way to research anything on a desktop. The press and the pan are now the behaviour, with touch and mouse as two ways in to them. Motion pans only while the button is held - a hovering pointer must not drag the tree out from under the reader - and the wheel scrolls, which is the first thing a desktop player reaches for. The panel also still had the buy button's hole in it. That button went away in #83 and nothing moved down into the space, leaving ~180px of dead panel below the readout while the tree above it stayed cramped. The readout moves down 154px and the canvas takes the height: 1190px to 1344px. The test drives clicks through BuildController rather than into the view, since the missing piece was the routing - calling the view directly would have passed against the bug as reported. Co-Authored-By: Claude Opus 5 <noreply@anthropic.com>
This commit is contained in:
parent
03b1c85569
commit
4883197ef3
5 changed files with 242 additions and 11 deletions
|
|
@ -343,6 +343,14 @@ func _unhandled_input(event: InputEvent) -> void:
|
|||
skill_tree.handle_touch(event)
|
||||
elif event is InputEventScreenDrag:
|
||||
skill_tree.handle_drag(event)
|
||||
elif event is InputEventMouseButton:
|
||||
# #93: a click is not a touch. The project no longer emulates one
|
||||
# from the other, so without this branch the whole menu is inert
|
||||
# under a mouse - nothing selects, nothing scrolls, and there is
|
||||
# no other way to research anything on a desktop.
|
||||
skill_tree.handle_mouse_button(event)
|
||||
elif event is InputEventMouseMotion:
|
||||
skill_tree.handle_mouse_motion(event)
|
||||
# Handled either way. A touch that lands on the panel but misses a
|
||||
# node is still a touch ON THE PANEL - letting it through moved the
|
||||
# fleet and pinch-zoomed the world behind the menu, because
|
||||
|
|
|
|||
Loading…
Reference in a new issue