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

@@ -6,21 +6,24 @@ class UIControls::Checkbox < UIControls::BaseControl
CHECKBOX_WIDTH = 40
CHECKBOX_HEIGHT = 24
CHECKBOX_FILL_SIZE = CHECKBOX_HEIGHT - 4
UNCHECKED_COLOR = Color.gray
CHECKED_COLOR = Color.new(48, 192, 48) # Darkish green
UNCHECKED_COLOR = Color.gray
CHECKED_COLOR = Color.new(48, 192, 48) # Darkish green
def initialize(width, height, viewport, value = false)
super(width, height, viewport)
@value = value
end
#-----------------------------------------------------------------------------
def value=(new_value)
return if @value == new_value
@value = new_value
invalidate
end
#-----------------------------------------------------------------------------
def set_interactive_rects
@checkbox_rect = Rect.new(CHECKBOX_X, (height - CHECKBOX_HEIGHT) / 2,
CHECKBOX_WIDTH, CHECKBOX_HEIGHT)