#111. Six vessels were authored as one row of 65px buttons with 105px captions overlapping each other, so "Energy Propulser" was clipped and the price was crushed onto a second line under it. Laid out in code now, in two rows of three, and the price is GLYPHS rather than words - every resource already has a mark the resource bar and the transfer list draw, so a price reads as a number beside a symbol instead of "15 ore · 5 gas" eating the two lines the vessel's own name needed. #120. The hangar's icons give up height so their captions have somewhere to go - vessel names are two and three words long and were wrapping into a box barely tall enough for one line, so "Gas Bomber" read as "Gas". And there is a rule between the two halves now: what is parked here and what is flying are different questions, and with only a heading between them the grids read as one long list. The divider is drawn by the menu itself rather than by a separate node, because its y comes from the same layout pass that places both grids - a line positioned independently would drift away from the sections it divides the first time either changed size. Co-Authored-By: Claude Opus 5 <noreply@anthropic.com>
20 lines
734 B
GDScript
20 lines
734 B
GDScript
extends Control
|
|
|
|
# #120: the rule between the hangar's two halves.
|
|
#
|
|
# The panel itself draws it rather than a separate node, because the y comes
|
|
# from BuildController._layout_hangar() - which is also what places the two
|
|
# grids - and a divider that had to be positioned independently would drift
|
|
# away from the sections it divides the first time either grid changed size.
|
|
|
|
const RULE_COLOR: Color = Color(0.45, 0.9, 0.55)
|
|
|
|
@onready var controller: Node = get_node("../../BuildController")
|
|
|
|
|
|
func _draw() -> void:
|
|
if controller == null or controller.hangar_divider_y <= 0.0:
|
|
return
|
|
var y: float = controller.hangar_divider_y
|
|
NeonDraw.draw_glowing_line(self, Vector2(24.0, y), Vector2(size.x - 24.0, y),
|
|
RULE_COLOR, 0.5, 0.4)
|