mirror of
https://github.com/infinitefusion/infinitefusion-e18.git
synced 2025-12-07 21:24:59 +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:
@@ -24,6 +24,8 @@ class UIControls::BaseControl < BitmapSprite
|
||||
invalidate
|
||||
end
|
||||
|
||||
#-----------------------------------------------------------------------------
|
||||
|
||||
def width
|
||||
return self.bitmap.width
|
||||
end
|
||||
@@ -32,6 +34,8 @@ class UIControls::BaseControl < BitmapSprite
|
||||
return self.bitmap.height
|
||||
end
|
||||
|
||||
#-----------------------------------------------------------------------------
|
||||
|
||||
def mouse_pos
|
||||
mouse_coords = Mouse.getMousePos
|
||||
return nil, nil if !mouse_coords
|
||||
@@ -40,10 +44,6 @@ class UIControls::BaseControl < BitmapSprite
|
||||
return ret_x, ret_y
|
||||
end
|
||||
|
||||
def set_interactive_rects
|
||||
@interactions = {}
|
||||
end
|
||||
|
||||
def mouse_in_control?
|
||||
return false if !@interactions || @interactions.empty?
|
||||
mouse_x, mouse_y = mouse_pos
|
||||
@@ -51,8 +51,6 @@ class UIControls::BaseControl < BitmapSprite
|
||||
return @interactions.any? { |area, rect| rect.contains?(mouse_x, mouse_y) }
|
||||
end
|
||||
|
||||
#-----------------------------------------------------------------------------
|
||||
|
||||
def disabled?
|
||||
return @disabled
|
||||
end
|
||||
@@ -102,6 +100,12 @@ class UIControls::BaseControl < BitmapSprite
|
||||
|
||||
#-----------------------------------------------------------------------------
|
||||
|
||||
def set_interactive_rects
|
||||
@interactions = {}
|
||||
end
|
||||
|
||||
#-----------------------------------------------------------------------------
|
||||
|
||||
def draw_text(this_bitmap, text_x, text_y, this_text)
|
||||
text_size = this_bitmap.text_size(this_text)
|
||||
this_bitmap.draw_text(text_x, text_y, text_size.width, text_size.height, this_text, 0)
|
||||
|
||||
Reference in New Issue
Block a user