1
1
mirror of https://github.com/Rundll86/Dog-Lynx-And-HCN.git synced 2026-05-28 15:01:53 +08:00
Files
Dog-Lynx-And-HCN/scripts/Statemachine/Variants/VerticalColorBar.gd
T

9 lines
396 B
GDScript
Raw Normal View History

@tool
extends ColorBar
class_name VerticalColorBar
func _draw():
draw_style_box(backBox, Rect2(0, 0, size.x, size.y))
draw_style_box(middleBox2 if forwardDirection > 0 else middleBox1, Rect2(0, size.y * (1 - getPercent(middleValue)), size.x, size.y * getPercent(middleValue)))
draw_style_box(frontBox, Rect2(0, size.y * (1 - getPercent(frontValue)), size.x, size.y * getPercent(frontValue)))