mirror of
https://github.com/infinitefusion/infinitefusion-e18.git
synced 2025-12-06 06:01:46 +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:
@@ -20,6 +20,8 @@ class UIControls::TextBox < UIControls::BaseControl
|
||||
@blacklist = []
|
||||
end
|
||||
|
||||
#-----------------------------------------------------------------------------
|
||||
|
||||
def value
|
||||
return @value.dup
|
||||
end
|
||||
@@ -60,36 +62,6 @@ class UIControls::TextBox < UIControls::BaseControl
|
||||
invalidate
|
||||
end
|
||||
|
||||
def set_interactive_rects
|
||||
@text_box_rect = Rect.new(TEXT_BOX_X, (height - TEXT_BOX_HEIGHT) / 2,
|
||||
[@box_width, width - (TEXT_BOX_X * 2)].min, TEXT_BOX_HEIGHT)
|
||||
@interactions = {
|
||||
:text_box => @text_box_rect
|
||||
}
|
||||
end
|
||||
|
||||
#-----------------------------------------------------------------------------
|
||||
|
||||
def disabled?
|
||||
val = (@value.respond_to?("strip!")) ? @value.strip : @value
|
||||
return true if @blacklist.include?(val)
|
||||
return super
|
||||
end
|
||||
|
||||
def busy?
|
||||
return @cursor_pos >= 0 if @captured_area == :text_box
|
||||
return super
|
||||
end
|
||||
|
||||
def reset_interaction
|
||||
@cursor_pos = -1
|
||||
@display_pos = 0
|
||||
@cursor_timer = nil
|
||||
@initial_value = nil
|
||||
Input.text_input = false
|
||||
invalidate
|
||||
end
|
||||
|
||||
#-----------------------------------------------------------------------------
|
||||
|
||||
def get_cursor_index_from_mouse_position
|
||||
@@ -107,6 +79,36 @@ class UIControls::TextBox < UIControls::BaseControl
|
||||
return @value.to_s.length
|
||||
end
|
||||
|
||||
def disabled?
|
||||
val = (@value.respond_to?("strip!")) ? @value.strip : @value
|
||||
return true if @blacklist.include?(val)
|
||||
return super
|
||||
end
|
||||
|
||||
def busy?
|
||||
return @cursor_pos >= 0 if @captured_area == :text_box
|
||||
return super
|
||||
end
|
||||
|
||||
#-----------------------------------------------------------------------------
|
||||
|
||||
def set_interactive_rects
|
||||
@text_box_rect = Rect.new(TEXT_BOX_X, (height - TEXT_BOX_HEIGHT) / 2,
|
||||
[@box_width, width - (TEXT_BOX_X * 2)].min, TEXT_BOX_HEIGHT)
|
||||
@interactions = {
|
||||
:text_box => @text_box_rect
|
||||
}
|
||||
end
|
||||
|
||||
def reset_interaction
|
||||
@cursor_pos = -1
|
||||
@display_pos = 0
|
||||
@cursor_timer = nil
|
||||
@initial_value = nil
|
||||
Input.text_input = false
|
||||
invalidate
|
||||
end
|
||||
|
||||
def reset_display_pos
|
||||
box_width = @text_box_rect.width - (TEXT_BOX_PADDING * 2)
|
||||
char_widths = []
|
||||
|
||||
Reference in New Issue
Block a user