Class: GGLib::MouseDragEvent
- Inherits:
-
Object
- Object
- GGLib::MouseDragEvent
- Defined in:
- lib/mouse.rb
Instance Attribute Summary collapse
-
#end_x ⇒ Object
readonly
Returns the value of attribute end_x.
-
#end_y ⇒ Object
readonly
Returns the value of attribute end_y.
-
#inprogress ⇒ Object
readonly
Returns the value of attribute inprogress.
-
#start_x ⇒ Object
readonly
Returns the value of attribute start_x.
-
#start_y ⇒ Object
readonly
Returns the value of attribute start_y.
-
#starting ⇒ Object
readonly
Returns the value of attribute starting.
Instance Method Summary collapse
- #confirmStart ⇒ Object
- #end ⇒ Object
-
#initialize ⇒ MouseDragEvent
constructor
A new instance of MouseDragEvent.
- #start ⇒ Object
- #terminate ⇒ Object
Constructor Details
#initialize ⇒ MouseDragEvent
Returns a new instance of MouseDragEvent.
40 41 42 43 44 45 |
# File 'lib/mouse.rb', line 40 def initialize @start_x, @start_y = 0 @end_x, @end_y = 0 @inprogress = false @starting = false end |
Instance Attribute Details
#end_x ⇒ Object (readonly)
Returns the value of attribute end_x.
39 40 41 |
# File 'lib/mouse.rb', line 39 def end_x @end_x end |
#end_y ⇒ Object (readonly)
Returns the value of attribute end_y.
39 40 41 |
# File 'lib/mouse.rb', line 39 def end_y @end_y end |
#inprogress ⇒ Object (readonly)
Returns the value of attribute inprogress.
39 40 41 |
# File 'lib/mouse.rb', line 39 def inprogress @inprogress end |
#start_x ⇒ Object (readonly)
Returns the value of attribute start_x.
39 40 41 |
# File 'lib/mouse.rb', line 39 def start_x @start_x end |
#start_y ⇒ Object (readonly)
Returns the value of attribute start_y.
39 40 41 |
# File 'lib/mouse.rb', line 39 def start_y @start_y end |
#starting ⇒ Object (readonly)
Returns the value of attribute starting.
39 40 41 |
# File 'lib/mouse.rb', line 39 def starting @starting end |
Instance Method Details
#confirmStart ⇒ Object
50 51 52 53 |
# File 'lib/mouse.rb', line 50 def confirmStart @starting = false @inprogress = true end |
#end ⇒ Object
54 55 56 57 |
# File 'lib/mouse.rb', line 54 def end @end_x, @end_y = $window.mouse_x, $window.mouse_y @inprogress = false end |
#start ⇒ Object
46 47 48 49 |
# File 'lib/mouse.rb', line 46 def start @start_x, @start_y = $window.mouse_x, $window.mouse_y @starting = true end |
#terminate ⇒ Object
58 59 60 |
# File 'lib/mouse.rb', line 58 def terminate @inprogress, @starting = false end |