mirror of
https://github.com/infinitefusion/infinitefusion-e18.git
synced 2025-12-08 13:44: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:
@@ -2,6 +2,8 @@
|
||||
#
|
||||
#===============================================================================
|
||||
class UIControls::Scrollbar < UIControls::BaseControl
|
||||
attr_reader :slider_top
|
||||
|
||||
SLIDER_WIDTH = 16
|
||||
WIDTH_PADDING = 0
|
||||
SCROLL_DISTANCE = 16
|
||||
@@ -9,8 +11,6 @@ class UIControls::Scrollbar < UIControls::BaseControl
|
||||
SLIDER_COLOR = Color.black
|
||||
GRAB_COLOR = HOVER_COLOR # Cyan
|
||||
|
||||
attr_reader :slider_top
|
||||
|
||||
def initialize(x, y, size, viewport, horizontal = false, always_visible = false)
|
||||
if horizontal
|
||||
super(size, SLIDER_WIDTH, viewport)
|
||||
@@ -28,18 +28,7 @@ class UIControls::Scrollbar < UIControls::BaseControl
|
||||
self.visible = @always_visible
|
||||
end
|
||||
|
||||
def position
|
||||
return 0 if @range <= @tray_size
|
||||
return (@range - @tray_size) * @slider_top / (@tray_size - @slider_size)
|
||||
end
|
||||
|
||||
def minimum?
|
||||
return @slider_top <= 0
|
||||
end
|
||||
|
||||
def maximum?
|
||||
return @slider_top >= @tray_size - @slider_size
|
||||
end
|
||||
#-----------------------------------------------------------------------------
|
||||
|
||||
# Range is the total size of the large area that the scrollbar is able to
|
||||
# show part of.
|
||||
@@ -68,6 +57,21 @@ class UIControls::Scrollbar < UIControls::BaseControl
|
||||
invalidate if @slider_top != old_val
|
||||
end
|
||||
|
||||
def position
|
||||
return 0 if @range <= @tray_size
|
||||
return (@range - @tray_size) * @slider_top / (@tray_size - @slider_size)
|
||||
end
|
||||
|
||||
def minimum?
|
||||
return @slider_top <= 0
|
||||
end
|
||||
|
||||
def maximum?
|
||||
return @slider_top >= @tray_size - @slider_size
|
||||
end
|
||||
|
||||
#-----------------------------------------------------------------------------
|
||||
|
||||
def set_interactive_rects
|
||||
@interactions = {}
|
||||
if @horizontal
|
||||
|
||||
Reference in New Issue
Block a user