Class: MG::List
Properties (collapse)
-
- (Float) items_margin
The margin between items in the list.
Attributes inherited from Scroll
#direction, #inner_container, #inner_size
Attributes inherited from Layout
#background_color, #clipping?, #type
Attributes inherited from Widget
Attributes inherited from Node
#alpha, #anchor_point, #color, #name, #position, #rotation, #scale, #size, #visible?, #z_index
Constructors (collapse)
-
- (List) initialize
constructor
Creates a new List widget.
Managing Items (collapse)
-
- (List) add_item(widget)
Adds a new item to the end of the list.
-
- (List) clear_items
Removes all items in the list.
-
- (List) delete_item(index)
Deletes the item at the given index.
-
- (List) insert_item(index, widget)
Inserts a new item at the given index in the list.
-
- (Widget) item_at(index)
Retrieves the item at the given index.
Selection (collapse)
-
- (List) on_selection {|Integer| ... }
Configures a block to be called when an item is selected in the list view.
-
- (Integer) selected_item
The index of the currently selected item.
Methods inherited from Widget
Methods inherited from Node
#add, #children, #clear, #delete, #delete_from_parent, #intersects?, #parent
Constructor Details
- (List) initialize
Creates a new List widget.
833 |
# File 'motion-game', line 833 def initialize; end |
Instance Attribute Details
- (Float) items_margin
Returns the margin between items in the list.
879 880 881 |
# File 'motion-game', line 879 def items_margin @items_margin end |
Instance Method Details
- (List) add_item(widget)
Adds a new item to the end of the list.
841 |
# File 'motion-game', line 841 def add_item(); end |
- (List) clear_items
Removes all items in the list.
861 |
# File 'motion-game', line 861 def clear_items; end |
- (List) delete_item(index)
Deletes the item at the given index.
857 |
# File 'motion-game', line 857 def delete_item(index); end |
- (List) insert_item(index, widget)
Inserts a new item at the given index in the list.
847 |
# File 'motion-game', line 847 def insert_item(index, ); end |
- (Widget) item_at(index)
Retrieves the item at the given index.
852 |
# File 'motion-game', line 852 def item_at(index); end |
- (List) on_selection {|Integer| ... }
Configures a block to be called when an item is selected in the list view.
870 |
# File 'motion-game', line 870 def on_selection; end |
- (Integer) selected_item
Returns the index of the currently selected item.
873 |
# File 'motion-game', line 873 def selected_item; end |