Difference between revisions of "cock.setMouseOffset"

(Created page with "Sets horizontal and vertical mouse offset. It will be treaten as the "screen center", e.g. if mouse goes to the left or the the above of it then mouse position will read negative...")
 
m
 
(3 intermediate revisions by the same user not shown)
Line 1: Line 1:
Sets horizontal and vertical mouse offset. It will be treaten as the "screen center", e.g. if mouse goes to the left or the the above of it then mouse position will read negative value.
+
Sets horizontal and vertical mouse offset. You can access these values directly, see [[Common Organization of Controls Kit Fields|etc.mouse.*]] fields.
== Synopsis ==
+
== Function ==
=== Function ===
+
=== Synopsis ===
 
<source lang="Lua">cock.setMouseOffset ( self, x, y )</source>
 
<source lang="Lua">cock.setMouseOffset ( self, x, y )</source>
 
=== Arguments ===
 
=== Arguments ===
 
{{param|table|self|An object to use.}}
 
{{param|table|self|An object to use.}}
{{param|string|x|Optional. X-coordinate to use as center. Will use old value if not provided.}}
+
{{param|number|x|Optional. X-coordinate to use as center. Will use old value if not provided.}}
{{param|string|y|Optional. Y-coordinate to use as center. Will use old value if not provided.}}
+
{{param|number|y|Optional. Y-coordinate to use as center. Will use old value if not provided.}}
 +
== Remarks ==
 +
Values will be treaten as the "screen center", e.g. if mouse goes to the left or the the above of it then mouse position will read negative value.
 
==See also==
 
==See also==
 +
*[[cock.getMouseOffset]]
 
*[[cock.setMouseFactor]]
 
*[[cock.setMouseFactor]]
 +
*[[Common Organization of Controls Kit Fields]]
 
*[[parent::Common Organization of Controls Kit Manual]]
 
*[[parent::Common Organization of Controls Kit Manual]]
 
[[Category:Functions]]
 
[[Category:Functions]]

Latest revision as of 15:15, 2 September 2013

Sets horizontal and vertical mouse offset. You can access these values directly, see etc.mouse.* fields.

Function

Synopsis

cock.setMouseOffset ( self, x, y )

Arguments

table self
An object to use.
number x
Optional. X-coordinate to use as center. Will use old value if not provided.
number y
Optional. Y-coordinate to use as center. Will use old value if not provided.

Remarks

Values will be treaten as the "screen center", e.g. if mouse goes to the left or the the above of it then mouse position will read negative value.

See also