2014-03-10 14:04:58 +08:00
|
|
|
|
|
|
|
--------------------------------
|
|
|
|
-- @module EventMouse
|
2014-03-20 10:21:28 +08:00
|
|
|
-- @extend Event
|
2014-06-25 17:36:50 +08:00
|
|
|
-- @parent_module cc
|
2014-03-18 15:55:30 +08:00
|
|
|
|
2014-08-08 10:49:17 +08:00
|
|
|
--------------------------------
|
2015-03-24 11:25:31 +08:00
|
|
|
-- Returns the previous touch location in screen coordinates.<br>
|
2015-03-25 11:59:57 +08:00
|
|
|
-- return The previous touch location in screen coordinates.<br>
|
|
|
|
-- js NA
|
2014-08-08 10:49:17 +08:00
|
|
|
-- @function [parent=#EventMouse] getPreviousLocationInView
|
|
|
|
-- @param self
|
|
|
|
-- @return vec2_table#vec2_table ret (return value: vec2_table)
|
|
|
|
|
|
|
|
--------------------------------
|
2015-03-24 11:25:31 +08:00
|
|
|
-- Returns the current touch location in OpenGL coordinates.<br>
|
|
|
|
-- return The current touch location in OpenGL coordinates.
|
2014-08-08 10:49:17 +08:00
|
|
|
-- @function [parent=#EventMouse] getLocation
|
|
|
|
-- @param self
|
|
|
|
-- @return vec2_table#vec2_table ret (return value: vec2_table)
|
|
|
|
|
2014-03-10 14:04:58 +08:00
|
|
|
--------------------------------
|
2015-03-24 11:25:31 +08:00
|
|
|
-- Get mouse button.<br>
|
2015-03-25 11:59:57 +08:00
|
|
|
-- return The mouse button.<br>
|
|
|
|
-- js getButton
|
2014-03-10 14:04:58 +08:00
|
|
|
-- @function [parent=#EventMouse] getMouseButton
|
|
|
|
-- @param self
|
|
|
|
-- @return int#int ret (return value: int)
|
|
|
|
|
2014-08-08 10:49:17 +08:00
|
|
|
--------------------------------
|
2015-03-24 11:25:31 +08:00
|
|
|
-- Returns the previous touch location in OpenGL coordinates.<br>
|
2015-03-25 11:59:57 +08:00
|
|
|
-- return The previous touch location in OpenGL coordinates.<br>
|
|
|
|
-- js NA
|
2014-08-08 10:49:17 +08:00
|
|
|
-- @function [parent=#EventMouse] getPreviousLocation
|
|
|
|
-- @param self
|
|
|
|
-- @return vec2_table#vec2_table ret (return value: vec2_table)
|
|
|
|
|
|
|
|
--------------------------------
|
2015-03-24 11:25:31 +08:00
|
|
|
-- Returns the delta of 2 current touches locations in screen coordinates.<br>
|
|
|
|
-- return The delta of 2 current touches locations in screen coordinates.
|
2014-08-08 10:49:17 +08:00
|
|
|
-- @function [parent=#EventMouse] getDelta
|
|
|
|
-- @param self
|
|
|
|
-- @return vec2_table#vec2_table ret (return value: vec2_table)
|
|
|
|
|
2014-03-10 14:04:58 +08:00
|
|
|
--------------------------------
|
2015-03-24 11:25:31 +08:00
|
|
|
-- Set mouse scroll data.<br>
|
|
|
|
-- param scrollX The scroll data of x axis.<br>
|
|
|
|
-- param scrollY The scroll data of y axis.
|
2014-03-10 14:04:58 +08:00
|
|
|
-- @function [parent=#EventMouse] setScrollData
|
|
|
|
-- @param self
|
2014-09-02 13:45:07 +08:00
|
|
|
-- @param #float scrollX
|
|
|
|
-- @param #float scrollY
|
2015-01-21 17:33:26 +08:00
|
|
|
-- @return EventMouse#EventMouse self (return value: cc.EventMouse)
|
2014-03-10 14:04:58 +08:00
|
|
|
|
2014-08-08 10:49:17 +08:00
|
|
|
--------------------------------
|
2015-03-24 11:25:31 +08:00
|
|
|
-- Returns the start touch location in screen coordinates.<br>
|
2015-03-25 11:59:57 +08:00
|
|
|
-- return The start touch location in screen coordinates.<br>
|
|
|
|
-- js NA
|
2014-08-08 10:49:17 +08:00
|
|
|
-- @function [parent=#EventMouse] getStartLocationInView
|
|
|
|
-- @param self
|
|
|
|
-- @return vec2_table#vec2_table ret (return value: vec2_table)
|
|
|
|
|
|
|
|
--------------------------------
|
2015-03-24 11:25:31 +08:00
|
|
|
-- Returns the start touch location in OpenGL coordinates.<br>
|
2015-03-25 11:59:57 +08:00
|
|
|
-- return The start touch location in OpenGL coordinates.<br>
|
|
|
|
-- js NA
|
2014-08-08 10:49:17 +08:00
|
|
|
-- @function [parent=#EventMouse] getStartLocation
|
|
|
|
-- @param self
|
|
|
|
-- @return vec2_table#vec2_table ret (return value: vec2_table)
|
|
|
|
|
2014-03-10 14:04:58 +08:00
|
|
|
--------------------------------
|
2015-03-24 11:25:31 +08:00
|
|
|
-- Set mouse button.<br>
|
2015-03-25 11:59:57 +08:00
|
|
|
-- param button a given mouse button.<br>
|
|
|
|
-- js setButton
|
2014-03-10 14:04:58 +08:00
|
|
|
-- @function [parent=#EventMouse] setMouseButton
|
|
|
|
-- @param self
|
2014-09-02 13:45:07 +08:00
|
|
|
-- @param #int button
|
2015-01-21 17:33:26 +08:00
|
|
|
-- @return EventMouse#EventMouse self (return value: cc.EventMouse)
|
2014-03-10 14:04:58 +08:00
|
|
|
|
2014-08-08 10:49:17 +08:00
|
|
|
--------------------------------
|
2015-03-24 11:25:31 +08:00
|
|
|
-- Returns the current touch location in screen coordinates.<br>
|
|
|
|
-- return The current touch location in screen coordinates.
|
2014-08-08 10:49:17 +08:00
|
|
|
-- @function [parent=#EventMouse] getLocationInView
|
|
|
|
-- @param self
|
|
|
|
-- @return vec2_table#vec2_table ret (return value: vec2_table)
|
|
|
|
|
2014-03-10 14:04:58 +08:00
|
|
|
--------------------------------
|
2015-03-24 11:25:31 +08:00
|
|
|
-- Get mouse scroll data of y axis.<br>
|
|
|
|
-- return The scroll data of y axis.
|
2014-03-10 14:04:58 +08:00
|
|
|
-- @function [parent=#EventMouse] getScrollY
|
|
|
|
-- @param self
|
|
|
|
-- @return float#float ret (return value: float)
|
|
|
|
|
|
|
|
--------------------------------
|
2015-03-24 11:25:31 +08:00
|
|
|
-- Get mouse scroll data of x axis.<br>
|
|
|
|
-- return The scroll data of x axis.
|
2014-03-10 14:04:58 +08:00
|
|
|
-- @function [parent=#EventMouse] getScrollX
|
|
|
|
-- @param self
|
|
|
|
-- @return float#float ret (return value: float)
|
|
|
|
|
|
|
|
--------------------------------
|
2015-03-24 11:25:31 +08:00
|
|
|
-- Get the cursor position of x axis.<br>
|
2015-03-25 11:59:57 +08:00
|
|
|
-- return The x coordinate of cursor position.<br>
|
|
|
|
-- js getLocationX
|
2014-03-10 14:04:58 +08:00
|
|
|
-- @function [parent=#EventMouse] getCursorX
|
|
|
|
-- @param self
|
|
|
|
-- @return float#float ret (return value: float)
|
|
|
|
|
|
|
|
--------------------------------
|
2015-03-24 11:25:31 +08:00
|
|
|
-- Get the cursor position of y axis.<br>
|
2015-03-25 11:59:57 +08:00
|
|
|
-- return The y coordinate of cursor position.<br>
|
|
|
|
-- js getLocationY
|
2014-03-10 14:04:58 +08:00
|
|
|
-- @function [parent=#EventMouse] getCursorY
|
|
|
|
-- @param self
|
|
|
|
-- @return float#float ret (return value: float)
|
|
|
|
|
|
|
|
--------------------------------
|
2015-03-24 11:25:31 +08:00
|
|
|
-- Set the cursor position.<br>
|
|
|
|
-- param x The x coordinate of cursor position.<br>
|
2015-03-25 11:59:57 +08:00
|
|
|
-- param y The y coordinate of cursor position.<br>
|
|
|
|
-- js setLocation
|
2014-03-10 14:04:58 +08:00
|
|
|
-- @function [parent=#EventMouse] setCursorPosition
|
|
|
|
-- @param self
|
2014-09-02 13:45:07 +08:00
|
|
|
-- @param #float x
|
|
|
|
-- @param #float y
|
2015-01-21 17:33:26 +08:00
|
|
|
-- @return EventMouse#EventMouse self (return value: cc.EventMouse)
|
2014-03-10 14:04:58 +08:00
|
|
|
|
|
|
|
--------------------------------
|
2015-03-24 11:25:31 +08:00
|
|
|
-- Constructor.<br>
|
2015-03-25 11:59:57 +08:00
|
|
|
-- param mouseEventCode A given mouse event type.<br>
|
|
|
|
-- js ctor
|
2014-03-10 14:04:58 +08:00
|
|
|
-- @function [parent=#EventMouse] EventMouse
|
|
|
|
-- @param self
|
2014-09-02 13:45:07 +08:00
|
|
|
-- @param #int mouseEventCode
|
2015-01-21 17:33:26 +08:00
|
|
|
-- @return EventMouse#EventMouse self (return value: cc.EventMouse)
|
2014-03-10 14:04:58 +08:00
|
|
|
|
|
|
|
return nil
|