20 lines
734 B
GDScript3
20 lines
734 B
GDScript3
|
|
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)
|