mirror of
https://github.com/infinitefusion/infinitefusion-e18.git
synced 2026-01-22 22:36:03 +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:
@@ -7,7 +7,6 @@ class UIControls::NumberTextBox < UIControls::TextBox
|
||||
|
||||
PLUS_MINUS_SIZE = 16
|
||||
CONTROL_PADDING = 2 # Gap between buttons and text box
|
||||
|
||||
MINUS_X = 0
|
||||
TEXT_BOX_X = MINUS_X + PLUS_MINUS_SIZE + CONTROL_PADDING
|
||||
TEXT_BOX_WIDTH = 64
|
||||
@@ -21,6 +20,8 @@ class UIControls::NumberTextBox < UIControls::TextBox
|
||||
self.value = value
|
||||
end
|
||||
|
||||
#-----------------------------------------------------------------------------
|
||||
|
||||
def value=(new_value)
|
||||
old_val = @value.to_i
|
||||
@value = new_value.to_i.clamp(self.min_value, self.max_value)
|
||||
@@ -49,6 +50,8 @@ class UIControls::NumberTextBox < UIControls::TextBox
|
||||
invalidate
|
||||
end
|
||||
|
||||
#-----------------------------------------------------------------------------
|
||||
|
||||
def set_interactive_rects
|
||||
@text_box_rect = Rect.new(TEXT_BOX_X, (height - TEXT_BOX_HEIGHT) / 2,
|
||||
TEXT_BOX_WIDTH, TEXT_BOX_HEIGHT)
|
||||
@@ -61,8 +64,6 @@ class UIControls::NumberTextBox < UIControls::TextBox
|
||||
}
|
||||
end
|
||||
|
||||
#-----------------------------------------------------------------------------
|
||||
|
||||
def reset_interaction
|
||||
super
|
||||
self.value = @value # Turn value back into a number and clamp it
|
||||
|
||||
Reference in New Issue
Block a user