Animation editor now uses proper animation data, misc other code tweaks to animation editor

This commit is contained in:
Maruno17
2023-10-01 20:39:04 +01:00
parent 2ff47cf40d
commit 79ffcd3230
12 changed files with 339 additions and 105 deletions

View File

@@ -134,7 +134,6 @@ class UIControls::BaseControl < BitmapSprite
end
end
# Returns whether this control has been properly decaptured.
def on_mouse_release
@captured_area = nil
invalidate
@@ -167,6 +166,7 @@ class UIControls::BaseControl < BitmapSprite
# Updates the logic on the control, invalidating it if necessary.
def update
return if !self.visible
# TODO: Disabled control stuff.
# return if self.disabled

View File

@@ -15,9 +15,9 @@ class UIControls::Checkbox < UIControls::BaseControl
@value = value
end
def value=(val)
return if @value == val
@value = val
def value=(new_value)
return if @value == new_value
@value = new_value
invalidate
end

View File

@@ -267,6 +267,7 @@ class UIControls::TextBox < UIControls::BaseControl
end
def update
return if !self.visible
super
# TODO: Disabled control stuff.
# return if self.disabled

View File

@@ -106,6 +106,7 @@ class UIControls::Slider < UIControls::BaseControl
end
def update
return if !self.visible
super
# TODO: Disabled control stuff.
# return if self.disabled

View File

@@ -122,6 +122,7 @@ class UIControls::ValueBox < UIControls::TextBox
end
def update
return if !self.visible
super
case @captured_area
when :minus

View File

@@ -29,6 +29,16 @@ class UIControls::Button < UIControls::BaseControl
}
end
def set_changed
@value = true
super
end
def clear_changed
@value = false
super
end
#-----------------------------------------------------------------------------
def refresh

View File

@@ -33,6 +33,7 @@ class UIControls::List < UIControls::BaseControl
else
self.top_row = 0
end
self.selected = -1 if @selected >= @values.length
invalidate
end
@@ -202,6 +203,7 @@ class UIControls::List < UIControls::BaseControl
end
def update
return if !self.visible
super
# TODO: Disabled control stuff.
# return if self.disabled