mirror of
https://github.com/infinitefusion/infinitefusion-e18.git
synced 2025-12-07 13:15:01 +00:00
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:
@@ -16,21 +16,12 @@ class UIControls::Button < UIControls::BaseControl
|
||||
@highlight = false
|
||||
end
|
||||
|
||||
#-----------------------------------------------------------------------------
|
||||
|
||||
def set_fixed_size
|
||||
@fixed_size = true
|
||||
end
|
||||
|
||||
def set_interactive_rects
|
||||
@interactions&.clear
|
||||
button_width = (@fixed_size) ? width - (BUTTON_X * 2) : self.bitmap.text_size(@text).width + (BUTTON_PADDING * 2)
|
||||
button_height = (@fixed_size) ? height - (2 * BUTTON_Y) : BUTTON_HEIGHT
|
||||
button_height = [button_height, height - (2 * BUTTON_Y)].min
|
||||
@button_rect = Rect.new(BUTTON_X, (height - button_height) / 2, button_width, button_height)
|
||||
@interactions = {
|
||||
:button => @button_rect
|
||||
}
|
||||
end
|
||||
|
||||
def set_text(val)
|
||||
return if @text == val
|
||||
@text = val
|
||||
@@ -38,6 +29,8 @@ class UIControls::Button < UIControls::BaseControl
|
||||
invalidate
|
||||
end
|
||||
|
||||
#-----------------------------------------------------------------------------
|
||||
|
||||
def disabled?
|
||||
return highlighted? || super
|
||||
end
|
||||
@@ -70,6 +63,19 @@ class UIControls::Button < UIControls::BaseControl
|
||||
|
||||
#-----------------------------------------------------------------------------
|
||||
|
||||
def set_interactive_rects
|
||||
@interactions&.clear
|
||||
button_width = (@fixed_size) ? width - (BUTTON_X * 2) : self.bitmap.text_size(@text).width + (BUTTON_PADDING * 2)
|
||||
button_height = (@fixed_size) ? height - (2 * BUTTON_Y) : BUTTON_HEIGHT
|
||||
button_height = [button_height, height - (2 * BUTTON_Y)].min
|
||||
@button_rect = Rect.new(BUTTON_X, (height - button_height) / 2, button_width, button_height)
|
||||
@interactions = {
|
||||
:button => @button_rect
|
||||
}
|
||||
end
|
||||
|
||||
#-----------------------------------------------------------------------------
|
||||
|
||||
def refresh
|
||||
super
|
||||
if highlighted?
|
||||
|
||||
Reference in New Issue
Block a user