Three play-testing reports. 1. Buttons behind an open panel were still clickable. There are two input paths and both leaked. GUI clicks: the research and formation panels cannot block with mouse_filter = STOP, because their contents are driven from raw _unhandled_input and a Control consuming touches through the GUI system swallows them first - so the panels stay transparent and IconButton now checks whether it is behind one, via a "modal_menus" group. Raw input: a touch landing on the research panel but missing a node was left unhandled, so it fell through to GameController - which sits on the ROOT node and sees whatever its children ignore - and moved the fleet or pinch-zoomed the world. 2. "Store ore here" looked dead. It was working: the confirmation was overwritten one frame later by the per-frame status refresh added in #16, so it flashed for a single frame. Craft-panel messages now outlive a refresh (3s), and the button stays ENABLED with an empty hold so pressing it can say why - a greyed button that cannot explain itself is the same dead-button problem. 3. The mothership's description could overlap the button below it. The description block was positioned from the TOP while the buttons were anchored to the BOTTOM, so the gap between them was whatever the screen height left over - overlapping at 1280 and separating at 960. It is one bottom-anchored stack now, checked at both. Co-Authored-By: Claude Opus 5 <noreply@anthropic.com>
31 lines
1.2 KiB
GDScript
31 lines
1.2 KiB
GDScript
extends Node2D
|
|
|
|
# Preview, not a test. Opens the SkillMenu so its layout can be checked on a
|
|
# real viewport - the mothership's "Load ore" label was falling off the bottom
|
|
# of shorter screens, which no headless test can see.
|
|
#
|
|
# bash tests/screenshot.sh res://tests/_skill_menu_preview.tscn /tmp/m.png 20 720x1280
|
|
# ... and again at 720x960 to check a shorter screen format.
|
|
|
|
|
|
func _ready() -> void:
|
|
GameState.buildings.clear()
|
|
GameState.extractors.clear()
|
|
GameState.transporters.clear()
|
|
GameState.rocks = 180
|
|
GameState.fleet_cargo = 24
|
|
GameState.unlocked = ["shipyards", "logistics", "freight"]
|
|
var main: Node = load("res://Main.tscn").instantiate()
|
|
add_child(main)
|
|
main.get_node("BuildingField").place(GameState.BUILDING_TRANSPORT_HUB, Vector2(400.0, 0.0))
|
|
var bc: Node = main.get_node("BuildController")
|
|
bc.craft_building_id = 1
|
|
main.get_node("UI/SkillMenu").visible = true
|
|
if "Skill" == "Craft":
|
|
bc._refresh_craft_status()
|
|
else:
|
|
bc._refresh_load_ore()
|
|
# Select a node so the description, price and status all have text -
|
|
# an empty description cannot collide with anything.
|
|
bc.skill_tree.selected_id = "freight"
|
|
bc._refresh_skill_menu("freight")
|