#64: Load used to blindly cycle to "the next" saved setup with no way to see what existed or jump straight to one by name. It now opens a real selectable ItemList of every saved setup (name + surface profile), tap one to load it. #65: a single-finger drag over empty canvas could never pan - the touch handler placed an item on PRESS, before a drag had any chance to happen, so the "pan" branch below it was unreachable dead code (it only fired when selected_palette == "", which nothing in the UI can ever produce). Placement now waits for release: released within PAN_DEADZONE of where the finger went down is a tap (place), crossing it partway through is a pan - the same tap-vs-drag deadzone idiom GasBombController already uses for its own aim gesture. #66: added a persistent "Selected: <kind> #<n>" label, refreshed wherever selected_item changes (touch-select, new/load a setup, delete), so a tap actually confirms what got picked instead of the player inferring it from which dot on screen turned white. Also widened test_space_time_distorder.gd's formation-lag margin after it strayed 2.6x over its old allowance under one heavily loaded JOBS=1 full-suite run and passed cleanly in isolation immediately after - device jitter, not a regression; the wider margin still leaves orders-of-magnitude headroom below a real desync bug's stray distance.
15 lines
544 B
GDScript
15 lines
544 B
GDScript
extends Node2D
|
|
|
|
|
|
func _ready() -> void:
|
|
var editor: Node = load("res://PlanetSetupEditor.tscn").instantiate()
|
|
add_child(editor)
|
|
editor.new_setup("preview_setup", "Preview Setup", "rocky")
|
|
editor.add_capture_point(Vector2(300, 150))
|
|
editor.add_capture_point(Vector2(-250, 300))
|
|
editor.add_enemy("chaser", Vector2(200, -300))
|
|
editor.add_enemy("sniper", Vector2(-300, -150))
|
|
editor.add_enemy("artillery", Vector2(0, 350))
|
|
editor.selected_item = {"kind": "capture", "index": 0}
|
|
editor._rebuild_markers()
|
|
editor._refresh_selected_label()
|