Added canvas to new animation editor (isn't interactive yet), improved example animations

This commit is contained in:
Maruno17
2024-01-25 21:07:16 +00:00
parent 94f0a9c8d0
commit 4455c093b8
245 changed files with 22085 additions and 14046 deletions

View File

@@ -9,7 +9,7 @@ class UIControls::DropdownList < UIControls::BaseControl
TEXT_BOX_WIDTH = 200
TEXT_BOX_HEIGHT = 24
TEXT_BOX_PADDING = 4 # Gap between sides of text box and text
MAX_LIST_ROWS = 8
MAX_LIST_ROWS = 10
# NOTE: options is a hash: keys are symbols, values are display names.
def initialize(width, height, viewport, options, value)
@@ -32,6 +32,11 @@ class UIControls::DropdownList < UIControls::BaseControl
invalidate
end
def values=(new_vals)
@options = new_vals
@dropdown_menu.values = @options if @dropdown_menu
end
def set_interactive_rects
@button_rect = Rect.new(TEXT_BOX_X, (height - TEXT_BOX_HEIGHT) / 2,
[@box_width, width - (TEXT_BOX_X * 2)].min, TEXT_BOX_HEIGHT)