Fleshing out animation editor's code

This commit is contained in:
Maruno17
2023-10-23 22:36:43 +01:00
parent 7031698d85
commit 340983e765
14 changed files with 810 additions and 282 deletions

View File

@@ -19,8 +19,8 @@ class UIControls::ControlsContainer
attr_reader :values
attr_reader :visible
LINE_SPACING = 32
OFFSET_FROM_LABEL_X = 80
LINE_SPACING = 28
OFFSET_FROM_LABEL_X = 90
OFFSET_FROM_LABEL_Y = 0
def initialize(x, y, width, height)
@@ -61,6 +61,15 @@ class UIControls::ControlsContainer
repaint if @visible
end
def get_control(id)
ret = nil
@controls.each do |c|
ret = c[1] if c[0] == id
break if ret
end
return ret
end
#-----------------------------------------------------------------------------
def add_label(id, label, has_label = false)