Class: MG::Slider

Inherits:
Widget show all
Defined in:
doc/API_reference.rb

Overview

slider.on_changed { puts slider.progress }

Instance Attribute Summary collapse

Attributes inherited from Node

#alpha, #anchor_point, #color, #name, #position, #rotation, #scale, #size, #z_index

Constructors collapse

Instance Method Summary collapse

Methods inherited from Widget

#enabled=, #enabled?, #highlighted=, #highlighted?, #on_touch, #touch_enabled=, #touch_enabled?

Methods inherited from Node

#add, #children, #clear, #delete, #delete_from_parent, #intersects?, #number_of_running_actions, #parent, #run_action, #schedule, #schedule_once, #stop_action, #stop_all_actions, #unschedule, #visible=, #visible?

Constructor Details

#initializeSlider

Creates a new Slider widget.



1575
# File 'doc/API_reference.rb', line 1575

def initialize; end

Instance Attribute Details

#progressInteger



1582
1583
1584
# File 'doc/API_reference.rb', line 1582

def progress
  @progress
end

Instance Method Details

#load_bar_texture(value) ⇒ self

Load texture for slider bar.



1587
# File 'doc/API_reference.rb', line 1587

def load_bar_texture(value); end

#load_progress_bar_texture(value) ⇒ self

Load texture for slider progress bar.



1599
# File 'doc/API_reference.rb', line 1599

def load_progress_bar_texture(value); end

#load_slid_ball_textures(normal, pressed, disabled) ⇒ self

Load textures for slider ball.



1594
# File 'doc/API_reference.rb', line 1594

def load_slid_ball_textures(normal, pressed, disabled); end

#on_changed { ... } ⇒ self

Configures a block to be called when a slider event is received on the widget.

Yields:

  • the block will be called when a slider event is received.



1605
# File 'doc/API_reference.rb', line 1605

def on_changed; end