Anim Editor: added FoeFlip property, Space to play, S to swap sides, P to show/hide property lines for selected particle

This commit is contained in:
Maruno17
2024-04-18 22:35:15 +01:00
parent 15033d6114
commit 4480def33c
23 changed files with 264 additions and 161 deletions

View File

@@ -26,23 +26,17 @@ class UIControls::DropdownList < UIControls::BaseControl
super
end
def value=(new_value)
return if @value == new_value
@value = new_value
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)
@interactions = {
:button => @button_rect
}
def value=(new_value)
return if @value == new_value
@value = new_value
invalidate
end
#-----------------------------------------------------------------------------
@@ -54,6 +48,14 @@ class UIControls::DropdownList < UIControls::BaseControl
#-----------------------------------------------------------------------------
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)
@interactions = {
:button => @button_rect
}
end
def make_dropdown_menu
menu_height = (UIControls::List::ROW_HEIGHT * [@options.length, @max_rows].min) + (UIControls::List::BORDER_THICKNESS * 2)
# Draw menu's background