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.
156 157 158 159 160 161 |
# File 'lib/mouse.rb', line 156 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.
155 156 157 |
# File 'lib/mouse.rb', line 155 def end_x @end_x end |
#end_y ⇒ Object (readonly)
Returns the value of attribute end_y.
155 156 157 |
# File 'lib/mouse.rb', line 155 def end_y @end_y end |
#inprogress ⇒ Object (readonly)
Returns the value of attribute inprogress.
155 156 157 |
# File 'lib/mouse.rb', line 155 def inprogress @inprogress end |
#start_x ⇒ Object (readonly)
Returns the value of attribute start_x.
155 156 157 |
# File 'lib/mouse.rb', line 155 def start_x @start_x end |
#start_y ⇒ Object (readonly)
Returns the value of attribute start_y.
155 156 157 |
# File 'lib/mouse.rb', line 155 def start_y @start_y end |
#starting ⇒ Object (readonly)
Returns the value of attribute starting.
155 156 157 |
# File 'lib/mouse.rb', line 155 def starting @starting end |
Instance Method Details
#confirmStart ⇒ Object
166 167 168 169 |
# File 'lib/mouse.rb', line 166 def confirmStart @starting = false @inprogress = true end |
#end ⇒ Object
170 171 172 173 |
# File 'lib/mouse.rb', line 170 def end @end_x, @end_y = $window.mouse_x, $window.mouse_y @inprogress = false end |
#start ⇒ Object
162 163 164 165 |
# File 'lib/mouse.rb', line 162 def start @start_x, @start_y = $window.mouse_x, $window.mouse_y @starting = true end |
#terminate ⇒ Object
174 175 176 |
# File 'lib/mouse.rb', line 174 def terminate @inprogress, @starting = false end |