--- scripts/ui/skill_window.gd +++ scripts/ui/skill_window.gd @@ -111,8 +111,18 @@ static func prereq_path(id: String) -> Dictionary: # ---------------------------------------------------------------- building ## hud.gd hook: builds the skill window into its body. Returns true (the old list is not built). +static var _sig := "" + + static func fill(hud) -> bool: var body: VBoxContainer = hud.bodies["skills"] + # rebuild only when something shown changed (a rebuild between mouse-down and -up swallowed Learn clicks) + var ps0 = PlayerState + var sig := JSON.stringify([tab, selected, ps0.skills, ps0.skill_points, str(ps0.job), ps0.ch.wheel if ps0.ch else {}, + int(ps0.base_lv), SkillReset.check(ps0.ch) if ps0.ch else "", ps0.hotbar]) + if sig == _sig and body.get_child_count() > 0: + return true + _sig = sig hud._clear(body) hud.windows["skills"].custom_minimum_size = Vector2(880, 0) var ps = PlayerState @@ -231,6 +241,8 @@ static func _node(hud, id: String, center: Vector2, path: Dictionary) -> Control box.mouse_filter = Control.MOUSE_FILTER_STOP box.tooltip_text = _tip(hud, id) box.gui_input.connect(_node_input.bind(hud, id)) + # UI v3f: sticky rich tooltip (ui/hover_tip.gd) + load("res://scripts/ui/hud_skin.gd").sticky(box, "skill:" + id) var on_path := path.has(id) var sel := id == selected if sel or on_path: