UNPKG

232 kBHTMLView Raw
1<!DOCTYPE html>
2
3<html lang="en">
4<head>
5 <meta charset="utf-8">
6 <meta name="viewport" content="width=device-width">
7 <title>CrossBrowdy API documentation Namespace: CB_Mouse</title>
8
9 <!--[if lt IE 9]>
10 <script src="//html5shiv.googlecode.com/svn/trunk/html5.js"></script>
11 <![endif]-->
12 <link type="text/css" rel="stylesheet" href="styles/sunlight.default.css">
13
14 <link type="text/css" rel="stylesheet" href="styles/site.cosmo.css">
15
16</head>
17
18<body style="min-width:800px; overflow-wrap:break-word; word-wrap:break-word; word-break:break-word; line-break:strict; hyphens:none; -webkit-hyphens:none; -moz-hyphens:none;">
19
20<div class="navbar navbar-default navbar-fixed-top ">
21<div class="container">
22 <div class="navbar-header">
23 <a class="navbar-brand" href="index.html">CrossBrowdy API documentation</a>
24 <button class="navbar-toggle" type="button" data-toggle="collapse" data-target="#topNavigation">
25 <span class="icon-bar"></span>
26 <span class="icon-bar"></span>
27 <span class="icon-bar"></span>
28 </button>
29 </div>
30 <div class="navbar-collapse collapse" id="topNavigation">
31 <ul class="nav navbar-nav">
32
33 <li class="dropdown">
34 <a href="namespaces.list.html" class="dropdown-toggle" data-toggle="dropdown">Namespaces<b class="caret"></b></a>
35 <ul class="dropdown-menu inline">
36 <li><a href="CB_Arrays.html">CB_Arrays</a></li><li><a href="CB_AudioDetector.html">CB_AudioDetector</a></li><li><a href="CB_Client.html">CB_Client</a></li><li><a href="CB_Collisions.html">CB_Collisions</a></li><li><a href="CB_Configuration.html">CB_Configuration</a></li><li><a href="CB_Configuration.CrossBase.html">CB_Configuration.CrossBase</a></li><li><a href="CB_Configuration.CrossBrowdy.html">CB_Configuration.CrossBrowdy</a></li><li><a href="CB_Controllers.html">CB_Controllers</a></li><li><a href="CB_Controllers_Proprietary.html">CB_Controllers_Proprietary</a></li><li><a href="CB_Controllers_Proprietary.WII.html">CB_Controllers_Proprietary.WII</a></li><li><a href="CB_Controllers_Proprietary.WII_U.html">CB_Controllers_Proprietary.WII_U</a></li><li><a href="CB_Device.html">CB_Device</a></li><li><a href="CB_Device.AmbientLight.html">CB_Device.AmbientLight</a></li><li><a href="CB_Device.Battery.html">CB_Device.Battery</a></li><li><a href="CB_Device.Location.html">CB_Device.Location</a></li><li><a href="CB_Device.Motion.html">CB_Device.Motion</a></li><li><a href="CB_Device.Orientation.html">CB_Device.Orientation</a></li><li><a href="CB_Device.Proximity.html">CB_Device.Proximity</a></li><li><a href="CB_Device.Vibration.html">CB_Device.Vibration</a></li><li><a href="CB_Elements.html">CB_Elements</a></li><li><a href="CB_Events.html">CB_Events</a></li><li><a href="CB_Keyboard.html">CB_Keyboard</a></li><li><a href="CB_Keyboard.chars.html">CB_Keyboard.chars</a></li><li><a href="CB_Keyboard.extended.html">CB_Keyboard.extended</a></li><li><a href="CB_Keyboard.keys.html">CB_Keyboard.keys</a></li><li><a href="CB_Modules.html">CB_Modules</a></li><li><a href="CB_Mouse.html">CB_Mouse</a></li><li><a href="CB_Mouse.CursorImage.html">CB_Mouse.CursorImage</a></li><li><a href="CB_Net.html">CB_Net</a></li><li><a href="CB_Net.Fetch.html">CB_Net.Fetch</a></li><li><a href="CB_Net.REST.html">CB_Net.REST</a></li><li><a href="CB_Net.Sockets.html">CB_Net.Sockets</a></li><li><a href="CB_Net.Sockets.SockJS.html">CB_Net.Sockets.SockJS</a></li><li><a href="CB_Net.XHR.html">CB_Net.XHR</a></li><li><a href="CB_Pointer.html">CB_Pointer</a></li><li><a href="CB_Screen.html">CB_Screen</a></li><li><a href="CB_Speaker.html">CB_Speaker</a></li><li><a href="CB_Touch.html">CB_Touch</a></li><li><a href="CB_baseSymbols.html">CB_baseSymbols</a></li>
37 </ul>
38 </li>
39
40 <li class="dropdown">
41 <a href="classes.list.html" class="dropdown-toggle" data-toggle="dropdown">Classes<b class="caret"></b></a>
42 <ul class="dropdown-menu inline">
43 <li><a href="CB_AudioFile.html">CB_AudioFile</a></li><li><a href="CB_AudioFileCache.html">CB_AudioFileCache</a></li><li><a href="CB_AudioFileSprites.html">CB_AudioFileSprites</a></li><li><a href="CB_AudioFileSpritesPool.html">CB_AudioFileSpritesPool</a></li><li><a href="CB_AudioFile_API.AAPI.html">CB_AudioFile_API.AAPI</a></li><li><a href="CB_AudioFile_API.ACMP.html">CB_AudioFile_API.ACMP</a></li><li><a href="CB_AudioFile_API.SM2.html">CB_AudioFile_API.SM2</a></li><li><a href="CB_AudioFile_API.WAAPI.html">CB_AudioFile_API.WAAPI</a></li><li><a href="CB_Canvas.html">CB_Canvas</a></li><li><a href="CB_GraphicSprites.html">CB_GraphicSprites</a></li><li><a href="CB_GraphicSpritesScene.html">CB_GraphicSpritesScene</a></li>
44 </ul>
45 </li>
46
47 <li class="dropdown">
48 <a href="global.html" class="dropdown-toggle" data-toggle="dropdown">Global<b class="caret"></b></a>
49 <ul class="dropdown-menu inline">
50 <li><a href="global.html#CB_BASE_NAME">CB_BASE_NAME</a></li><li><a href="global.html#CB_CREDITS_DEFAULT">CB_CREDITS_DEFAULT</a></li><li><a href="global.html#CB_NAME">CB_NAME</a></li><li><a href="global.html#CB_OPTIONS">CB_OPTIONS</a></li><li><a href="global.html#CB_VERSION">CB_VERSION</a></li><li><a href="global.html#CB_addCredits">CB_addCredits</a></li><li><a href="global.html#CB_baseToBase">CB_baseToBase</a></li><li><a href="global.html#CB_baseToInt">CB_baseToInt</a></li><li><a href="global.html#CB_br2nl">CB_br2nl</a></li><li><a href="global.html#CB_brToNl">CB_brToNl</a></li><li><a href="global.html#CB_combineArraysOrObjects">CB_combineArraysOrObjects</a></li><li><a href="global.html#CB_combineAutomatically">CB_combineAutomatically</a></li><li><a href="global.html#CB_combineJSON">CB_combineJSON</a></li><li><a href="global.html#CB_combineURIParameters">CB_combineURIParameters</a></li><li><a href="global.html#CB_combineURLParameters">CB_combineURLParameters</a></li><li><a href="global.html#CB_console">CB_console</a></li><li><a href="global.html#CB_copyObject">CB_copyObject</a></li><li><a href="global.html#CB_countDecimalDigits">CB_countDecimalDigits</a></li><li><a href="global.html#CB_countDecimalPart">CB_countDecimalPart</a></li><li><a href="global.html#CB_countDecimals">CB_countDecimals</a></li><li><a href="global.html#CB_countIntegerDigits">CB_countIntegerDigits</a></li><li><a href="global.html#CB_countIntegerPart">CB_countIntegerPart</a></li><li><a href="global.html#CB_credits">CB_credits</a></li><li><a href="global.html#CB_forEach">CB_forEach</a></li><li><a href="global.html#CB_forceString">CB_forceString</a></li><li><a href="global.html#CB_getBase64StringObject">CB_getBase64StringObject</a></li><li><a href="global.html#CB_getCookie">CB_getCookie</a></li><li><a href="global.html#CB_getDatum">CB_getDatum</a></li><li><a href="global.html#CB_getJSONPropertyValue">CB_getJSONPropertyValue</a></li><li><a href="global.html#CB_getLZStringObject">CB_getLZStringObject</a></li><li><a href="global.html#CB_getValueIndex">CB_getValueIndex</a></li><li><a href="global.html#CB_getValuePath">CB_getValuePath</a></li><li><a href="global.html#CB_includeJSFile">CB_includeJSFile</a></li><li><a href="global.html#CB_indexOf">CB_indexOf</a></li><li><a href="global.html#CB_init">CB_init</a></li><li><a href="global.html#CB_intToBase">CB_intToBase</a></li><li><a href="global.html#CB_isArray">CB_isArray</a></li><li><a href="global.html#CB_isEmail">CB_isEmail</a></li><li><a href="global.html#CB_isFileLocal">CB_isFileLocal</a></li><li><a href="global.html#CB_isString">CB_isString</a></li><li><a href="global.html#CB_lastIndexOf">CB_lastIndexOf</a></li><li><a href="global.html#CB_ltrim">CB_ltrim</a></li><li><a href="global.html#CB_nl2br">CB_nl2br</a></li><li><a href="global.html#CB_nlToBr">CB_nlToBr</a></li><li><a href="global.html#CB_numberFormat">CB_numberFormat</a></li><li><a href="global.html#CB_numberOfDecimalDigits">CB_numberOfDecimalDigits</a></li><li><a href="global.html#CB_numberOfDecimals">CB_numberOfDecimals</a></li><li><a href="global.html#CB_numberOfIntegerDigits">CB_numberOfIntegerDigits</a></li><li><a href="global.html#CB_parseJSON">CB_parseJSON</a></li><li><a href="global.html#CB_parseString">CB_parseString</a></li><li><a href="global.html#CB_regularExpressionString">CB_regularExpressionString</a></li><li><a href="global.html#CB_renderString">CB_renderString</a></li><li><a href="global.html#CB_replaceAll">CB_replaceAll</a></li><li><a href="global.html#CB_rtrim">CB_rtrim</a></li><li><a href="global.html#CB_scriptPath">CB_scriptPath</a></li><li><a href="global.html#CB_scriptPathCalculate">CB_scriptPathCalculate</a></li><li><a href="global.html#CB_setCookie">CB_setCookie</a></li><li><a href="global.html#CB_setDatum">CB_setDatum</a></li><li><a href="global.html#CB_sizeOf">CB_sizeOf</a></li><li><a href="global.html#CB_sizeof">CB_sizeof</a></li><li><a href="global.html#CB_stringifyJSON">CB_stringifyJSON</a></li><li><a href="global.html#CB_symmetricCall">CB_symmetricCall</a></li><li><a href="global.html#CB_symmetricCallClear">CB_symmetricCallClear</a></li><li><a href="global.html#CB_this">CB_this</a></li><li><a href="global.html#CB_trim">CB_trim</a></li>
51 </ul>
52 </li>
53
54 </ul>
55
56 <div class="col-sm-3 col-md-3">
57 <form class="navbar-form" role="search">
58 <div class="input-group">
59 <input type="text" class="form-control" placeholder="Search" name="q" id="search-input">
60 <div class="input-group-btn">
61 <button class="btn btn-default" id="search-submit"><i class="glyphicon glyphicon-search"></i></button>
62 </div>
63 </div>
64 </form>
65 </div>
66
67 </div>
68
69</div>
70</div>
71
72
73<div class="container" id="toc-content" style="width:100%;">
74<div class="row" style="width:100%;">
75
76
77 <div class="col-md-8" style="width:85%;">
78
79 <div id="main">
80
81
82
83 <h1 class="page-title">Namespace: CB_Mouse</h1>
84
85<section>
86
87<header>
88
89 <h2>
90 CB_Mouse
91 </h2>
92
93
94</header>
95
96
97<article>
98 <div class="container-overview">
99
100
101 <div class="description"><p>Static class to manage the mouse and related. It will return itself if it is tried to be instantiated.</p></div>
102
103
104
105<dl class="details">
106
107
108
109
110
111
112
113
114
115
116
117
118
119
120
121
122
123
124
125
126
127
128
129
130
131
132
133
134
135 <dt class="tag-source method-doc-label method-doc-details-label">Source:</dt>
136 <dd class="tag-source">
137 <ul class="dummy">
138 <li>
139 <a href="CrossBase_input_CB_Mouse.js.html">CrossBase/input/CB_Mouse.js</a>,
140 <a href="CrossBase_input_CB_Mouse.js.html#sunlight-1-line-12">line 12</a>
141 </li>
142 </ul>
143 </dd>
144
145
146
147
148
149
150
151</dl>
152
153
154
155
156 </div>
157
158
159
160
161
162
163
164
165
166
167 <h3 class="subsection-title">Namespaces</h3>
168
169 <dl>
170 <dt><a href="namespaces.html#CB_Mouse.CursorImage"><a href="CB_Mouse.CursorImage.html">CursorImage</a></a></dt>
171 <dd></dd>
172 </dl>
173
174
175
176
177
178 <h3 class="subsection-title">Methods</h3>
179
180 <dl>
181
182<hr>
183<dt>
184 <h4 class="name" id=".getButtons"><span class="type-signature">&lt;static> </span>getButtons<span class="signature">()</span><span class="type-signature"> &rarr; {Object}</span></h4>
185
186
187</dt>
188<dd>
189
190
191 <div class="description">
192 <p>Tells what mouse buttons are down (LEFT, MIDDLE and/or RIGHT buttons).</p>
193 </div>
194
195
196
197
198
199
200
201
202
203
204<dl class="details">
205
206
207
208
209
210
211
212
213
214
215
216
217
218
219
220
221
222
223
224
225
226
227
228
229
230
231
232
233
234 <dt class="tag-source method-doc-label method-doc-details-label">Source:</dt>
235 <dd class="tag-source">
236 <ul class="dummy">
237 <li>
238 <a href="CrossBase_input_CB_Mouse.js.html">CrossBase/input/CB_Mouse.js</a>,
239 <a href="CrossBase_input_CB_Mouse.js.html#sunlight-1-line-301">line 301</a>
240 </li>
241 </ul>
242 </dd>
243
244
245
246
247
248
249
250</dl>
251
252
253
254
255
256
257
258
259
260
261
262
263
264 <h5>Returns:</h5>
265
266
267<div class="param-desc">
268 <p>Returns an object using the following format (where &quot;true&quot; means that the button is being pressed): { LEFT : boolean, MIDDLE : boolean, RIGHT : boolean }</p>
269</div>
270
271
272
273<dl>
274 <dt>
275 Type
276 </dt>
277 <dd>
278
279<span class="param-type">Object</span>
280
281
282
283 </dd>
284</dl>
285
286
287
288
289
290</dd>
291
292
293
294<hr>
295<dt>
296 <h4 class="name" id=".getLockElement"><span class="type-signature">&lt;static> </span>getLockElement<span class="signature">( [avoidCache])</span><span class="type-signature"> &rarr; {Element|null}</span></h4>
297
298
299</dt>
300<dd>
301
302
303 <div class="description">
304 <p>Gets the lock element for the mouse pointer (if any) or null otherwise. More information: <a href="https://developer.mozilla.org/en-US/docs/Web/API/Pointer_Lock_API">Pointer Lock API</a>.</p>
305 </div>
306
307
308
309
310
311
312
313
314 <h5>Parameters:</h5>
315
316
317<table class="params table table-striped">
318 <thead>
319 <tr>
320
321 <th style="width:12%; min-width:110px;">Name</th>
322
323
324 <th style="width:12%; min-width:110px;">Type</th>
325
326
327 <th style="width:12%; min-width:110px;">Argument</th>
328
329
330
331 <th style="width:12%; min-width:110px;">Default</th>
332
333
334 <th class="last" style="min-width:310px;">Description</th>
335 </tr>
336 </thead>
337
338 <tbody>
339
340
341 <tr>
342
343 <td class="name" style="width:12%; min-width:110px; overflow-wrap:break-word; word-wrap:break-word; word-break:break-word; line-break:strict; hyphens:none; -webkit-hyphens:none; -moz-hyphens:none;"><code>avoidCache</code></td>
344
345
346 <td class="type" style="width:12%; min-width:110px; overflow-wrap:break-word; word-wrap:break-word; word-break:break-word; line-break:strict; hyphens:none; -webkit-hyphens:none; -moz-hyphens:none;">
347
348
349<span class="param-type">boolean</span>
350
351
352
353
354 </td>
355
356
357 <td class="attributes" style="width:12%; min-width:110px; overflow-wrap:break-word; word-wrap:break-word; word-break:break-word; line-break:strict; hyphens:none; -webkit-hyphens:none; -moz-hyphens:none;">
358
359 &lt;optional><br>
360
361
362
363
364
365 </td>
366
367
368
369 <td class="default" style="width:12%; min-width:110px; overflow-wrap:break-word; word-wrap:break-word; word-break:break-word; line-break:strict; hyphens:none; -webkit-hyphens:none; -moz-hyphens:none;">
370
371 false
372
373 </td>
374
375
376 <td class="description last" style="min-width:310px; overflow-wrap:break-word; word-wrap:break-word; word-break:break-word; line-break:strict; hyphens:none; -webkit-hyphens:none; -moz-hyphens:none;"><p>If set to false, the returning value will use the previously-cached value (updated when this function is called with this parameter set to true or the <a href="https://developer.mozilla.org/en-US/docs/Web/API/Document/pointerlockchange_event">onPointerLockChange</a> or analog event is fired or when the <a href="CB_Mouse.html#.lock"><code>CB_Mouse.lock</code></a> or <a href="CB_Mouse.html#.unlock"><code>CB_Mouse.unlock</code></a> functions are called successfully).</p></td>
377 </tr>
378
379
380 </tbody>
381</table>
382
383
384
385
386<dl class="details">
387
388
389
390
391
392
393
394
395
396
397
398
399
400
401
402
403
404
405
406
407
408
409
410
411
412
413
414
415
416 <dt class="tag-source method-doc-label method-doc-details-label">Source:</dt>
417 <dd class="tag-source">
418 <ul class="dummy">
419 <li>
420 <a href="CrossBase_input_CB_Mouse.js.html">CrossBase/input/CB_Mouse.js</a>,
421 <a href="CrossBase_input_CB_Mouse.js.html#sunlight-1-line-691">line 691</a>
422 </li>
423 </ul>
424 </dd>
425
426
427
428
429
430
431
432</dl>
433
434
435
436
437
438
439
440
441
442
443
444
445
446 <h5>Returns:</h5>
447
448
449<div class="param-desc">
450 <p>Returns the lock element for the mouse pointer (if any) or null otherwise.</p>
451</div>
452
453
454
455<dl>
456 <dt>
457 Type
458 </dt>
459 <dd>
460
461<span class="param-type">Element</span>
462|
463
464<span class="param-type">null</span>
465
466
467
468 </dd>
469</dl>
470
471
472
473
474
475</dd>
476
477
478
479<hr>
480<dt>
481 <h4 class="name" id=".getX"><span class="type-signature">&lt;static> </span>getX<span class="signature">( [e] [, ignoreScroll] [, ignoreLock])</span><span class="type-signature"> &rarr; {number}</span></h4>
482
483
484</dt>
485<dd>
486
487
488 <div class="description">
489 <p>Gets and returns the X coordinate (horizontal position) of the mouse (relative to the window in desktop) in pixels.</p>
490 </div>
491
492
493
494
495
496
497
498
499 <h5>Parameters:</h5>
500
501
502<table class="params table table-striped">
503 <thead>
504 <tr>
505
506 <th style="width:12%; min-width:110px;">Name</th>
507
508
509 <th style="width:12%; min-width:110px;">Type</th>
510
511
512 <th style="width:12%; min-width:110px;">Argument</th>
513
514
515
516 <th style="width:12%; min-width:110px;">Default</th>
517
518
519 <th class="last" style="min-width:310px;">Description</th>
520 </tr>
521 </thead>
522
523 <tbody>
524
525
526 <tr>
527
528 <td class="name" style="width:12%; min-width:110px; overflow-wrap:break-word; word-wrap:break-word; word-break:break-word; line-break:strict; hyphens:none; -webkit-hyphens:none; -moz-hyphens:none;"><code>e</code></td>
529
530
531 <td class="type" style="width:12%; min-width:110px; overflow-wrap:break-word; word-wrap:break-word; word-break:break-word; line-break:strict; hyphens:none; -webkit-hyphens:none; -moz-hyphens:none;">
532
533
534<span class="param-type">Event</span>
535
536
537
538
539 </td>
540
541
542 <td class="attributes" style="width:12%; min-width:110px; overflow-wrap:break-word; word-wrap:break-word; word-break:break-word; line-break:strict; hyphens:none; -webkit-hyphens:none; -moz-hyphens:none;">
543
544 &lt;optional><br>
545
546
547
548
549
550 </td>
551
552
553
554 <td class="default" style="width:12%; min-width:110px; overflow-wrap:break-word; word-wrap:break-word; word-break:break-word; line-break:strict; hyphens:none; -webkit-hyphens:none; -moz-hyphens:none;">
555
556 </td>
557
558
559 <td class="description last" style="min-width:310px; overflow-wrap:break-word; word-wrap:break-word; word-break:break-word; line-break:strict; hyphens:none; -webkit-hyphens:none; -moz-hyphens:none;"><p><a href="https://developer.mozilla.org/en-US/docs/Web/API/MouseEvent">Mouse event object</a>. If not provided, the returning value will use the previously-cached value (updated the last time that the <a href="https://developer.mozilla.org/en-US/docs/Web/API/Element/mousemove_event">onMouseMove</a> event was fired).</p></td>
560 </tr>
561
562
563
564 <tr>
565
566 <td class="name" style="width:12%; min-width:110px; overflow-wrap:break-word; word-wrap:break-word; word-break:break-word; line-break:strict; hyphens:none; -webkit-hyphens:none; -moz-hyphens:none;"><code>ignoreScroll</code></td>
567
568
569 <td class="type" style="width:12%; min-width:110px; overflow-wrap:break-word; word-wrap:break-word; word-break:break-word; line-break:strict; hyphens:none; -webkit-hyphens:none; -moz-hyphens:none;">
570
571
572<span class="param-type">boolean</span>
573
574
575
576
577 </td>
578
579
580 <td class="attributes" style="width:12%; min-width:110px; overflow-wrap:break-word; word-wrap:break-word; word-break:break-word; line-break:strict; hyphens:none; -webkit-hyphens:none; -moz-hyphens:none;">
581
582 &lt;optional><br>
583
584
585
586
587
588 </td>
589
590
591
592 <td class="default" style="width:12%; min-width:110px; overflow-wrap:break-word; word-wrap:break-word; word-break:break-word; line-break:strict; hyphens:none; -webkit-hyphens:none; -moz-hyphens:none;">
593
594 false
595
596 </td>
597
598
599 <td class="description last" style="min-width:310px; overflow-wrap:break-word; word-wrap:break-word; word-break:break-word; line-break:strict; hyphens:none; -webkit-hyphens:none; -moz-hyphens:none;"><p>If set to true, the horizontal scroll position will not be added to the returning value.</p></td>
600 </tr>
601
602
603
604 <tr>
605
606 <td class="name" style="width:12%; min-width:110px; overflow-wrap:break-word; word-wrap:break-word; word-break:break-word; line-break:strict; hyphens:none; -webkit-hyphens:none; -moz-hyphens:none;"><code>ignoreLock</code></td>
607
608
609 <td class="type" style="width:12%; min-width:110px; overflow-wrap:break-word; word-wrap:break-word; word-break:break-word; line-break:strict; hyphens:none; -webkit-hyphens:none; -moz-hyphens:none;">
610
611
612<span class="param-type">boolean</span>
613
614
615
616
617 </td>
618
619
620 <td class="attributes" style="width:12%; min-width:110px; overflow-wrap:break-word; word-wrap:break-word; word-break:break-word; line-break:strict; hyphens:none; -webkit-hyphens:none; -moz-hyphens:none;">
621
622 &lt;optional><br>
623
624
625
626
627
628 </td>
629
630
631
632 <td class="default" style="width:12%; min-width:110px; overflow-wrap:break-word; word-wrap:break-word; word-break:break-word; line-break:strict; hyphens:none; -webkit-hyphens:none; -moz-hyphens:none;">
633
634 false
635
636 </td>
637
638
639 <td class="description last" style="min-width:310px; overflow-wrap:break-word; word-wrap:break-word; word-break:break-word; line-break:strict; hyphens:none; -webkit-hyphens:none; -moz-hyphens:none;"><p>If set to true, it will ignore whether the cursor is being locked or not. Otherwise, if set to false and the cursor is locked, the returning value will only have in mind the position in the locking element.</p></td>
640 </tr>
641
642
643 </tbody>
644</table>
645
646
647
648
649<dl class="details">
650
651
652
653
654
655
656
657
658
659
660
661
662
663
664
665
666
667
668
669
670
671
672
673
674
675
676
677
678
679 <dt class="tag-source method-doc-label method-doc-details-label">Source:</dt>
680 <dd class="tag-source">
681 <ul class="dummy">
682 <li>
683 <a href="CrossBase_input_CB_Mouse.js.html">CrossBase/input/CB_Mouse.js</a>,
684 <a href="CrossBase_input_CB_Mouse.js.html#sunlight-1-line-315">line 315</a>
685 </li>
686 </ul>
687 </dd>
688
689
690
691
692
693
694
695</dl>
696
697
698
699
700
701
702
703
704
705
706
707
708
709 <h5>Returns:</h5>
710
711
712<div class="param-desc">
713 <p>Returns the X coordinate (horizontal position) of the mouse (relative to the window in desktop) in pixels.</p>
714</div>
715
716
717
718<dl>
719 <dt>
720 Type
721 </dt>
722 <dd>
723
724<span class="param-type">number</span>
725
726
727
728 </dd>
729</dl>
730
731
732
733
734
735</dd>
736
737
738
739<hr>
740<dt>
741 <h4 class="name" id=".getXMovement"><span class="type-signature">&lt;static> </span>getXMovement<span class="signature">( [e])</span><span class="type-signature"> &rarr; {number}</span></h4>
742
743
744</dt>
745<dd>
746
747
748 <div class="description">
749 <p>Returns the current X (horizontal) movement (useful when the mouse pointer is locked) in pixels. More information: <a href="https://developer.mozilla.org/en-US/docs/Web/API/MouseEvent/movementX">MouseEvent.movementX</a>.</p>
750 </div>
751
752
753
754
755
756
757
758
759 <h5>Parameters:</h5>
760
761
762<table class="params table table-striped">
763 <thead>
764 <tr>
765
766 <th style="width:12%; min-width:110px;">Name</th>
767
768
769 <th style="width:12%; min-width:110px;">Type</th>
770
771
772 <th style="width:12%; min-width:110px;">Argument</th>
773
774
775
776
777 <th class="last" style="min-width:310px;">Description</th>
778 </tr>
779 </thead>
780
781 <tbody>
782
783
784 <tr>
785
786 <td class="name" style="width:12%; min-width:110px; overflow-wrap:break-word; word-wrap:break-word; word-break:break-word; line-break:strict; hyphens:none; -webkit-hyphens:none; -moz-hyphens:none;"><code>e</code></td>
787
788
789 <td class="type" style="width:12%; min-width:110px; overflow-wrap:break-word; word-wrap:break-word; word-break:break-word; line-break:strict; hyphens:none; -webkit-hyphens:none; -moz-hyphens:none;">
790
791
792<span class="param-type">Event</span>
793
794
795
796
797 </td>
798
799
800 <td class="attributes" style="width:12%; min-width:110px; overflow-wrap:break-word; word-wrap:break-word; word-break:break-word; line-break:strict; hyphens:none; -webkit-hyphens:none; -moz-hyphens:none;">
801
802 &lt;optional><br>
803
804
805
806
807
808 </td>
809
810
811
812
813 <td class="description last" style="min-width:310px; overflow-wrap:break-word; word-wrap:break-word; word-break:break-word; line-break:strict; hyphens:none; -webkit-hyphens:none; -moz-hyphens:none;"><p><a href="https://developer.mozilla.org/en-US/docs/Web/API/MouseEvent">Mouse event object</a>. If not provided, the returning value will use the previously-cached value (updated the last time that the <a href="https://developer.mozilla.org/en-US/docs/Web/API/Element/mousemove_event">onMouseMove</a> event was fired).</p></td>
814 </tr>
815
816
817 </tbody>
818</table>
819
820
821
822
823<dl class="details">
824
825
826
827
828
829
830
831
832
833
834
835
836
837
838
839
840
841
842
843
844
845
846
847
848
849
850
851
852
853 <dt class="tag-source method-doc-label method-doc-details-label">Source:</dt>
854 <dd class="tag-source">
855 <ul class="dummy">
856 <li>
857 <a href="CrossBase_input_CB_Mouse.js.html">CrossBase/input/CB_Mouse.js</a>,
858 <a href="CrossBase_input_CB_Mouse.js.html#sunlight-1-line-475">line 475</a>
859 </li>
860 </ul>
861 </dd>
862
863
864
865
866
867
868
869</dl>
870
871
872
873
874
875
876
877
878
879
880
881
882
883 <h5>Returns:</h5>
884
885
886<div class="param-desc">
887 <p>Returns the current X (horizontal) movement (useful when the mouse pointer is locked) in pixels.</p>
888</div>
889
890
891
892<dl>
893 <dt>
894 Type
895 </dt>
896 <dd>
897
898<span class="param-type">number</span>
899
900
901
902 </dd>
903</dl>
904
905
906
907
908
909</dd>
910
911
912
913<hr>
914<dt>
915 <h4 class="name" id=".getXRelative"><span class="type-signature">&lt;static> </span>getXRelative<span class="signature">(x [, ignoreScroll])</span><span class="type-signature"> &rarr; {number}</span></h4>
916
917
918</dt>
919<dd>
920
921
922 <div class="description">
923 <p>Gets and returns the current X coordinate (horizontal position) in pixels of the mouse relative to a given X position. The returning value uses the previously-cached value (updated the last time that the <a href="https://developer.mozilla.org/en-US/docs/Web/API/Element/mousemove_event">onMouseMove</a> event was fired).</p>
924 </div>
925
926
927
928
929
930
931
932
933 <h5>Parameters:</h5>
934
935
936<table class="params table table-striped">
937 <thead>
938 <tr>
939
940 <th style="width:12%; min-width:110px;">Name</th>
941
942
943 <th style="width:12%; min-width:110px;">Type</th>
944
945
946 <th style="width:12%; min-width:110px;">Argument</th>
947
948
949
950 <th style="width:12%; min-width:110px;">Default</th>
951
952
953 <th class="last" style="min-width:310px;">Description</th>
954 </tr>
955 </thead>
956
957 <tbody>
958
959
960 <tr>
961
962 <td class="name" style="width:12%; min-width:110px; overflow-wrap:break-word; word-wrap:break-word; word-break:break-word; line-break:strict; hyphens:none; -webkit-hyphens:none; -moz-hyphens:none;"><code>x</code></td>
963
964
965 <td class="type" style="width:12%; min-width:110px; overflow-wrap:break-word; word-wrap:break-word; word-break:break-word; line-break:strict; hyphens:none; -webkit-hyphens:none; -moz-hyphens:none;">
966
967
968<span class="param-type">number</span>
969
970
971
972
973 </td>
974
975
976 <td class="attributes" style="width:12%; min-width:110px; overflow-wrap:break-word; word-wrap:break-word; word-break:break-word; line-break:strict; hyphens:none; -webkit-hyphens:none; -moz-hyphens:none;">
977
978
979
980
981
982 </td>
983
984
985
986 <td class="default" style="width:12%; min-width:110px; overflow-wrap:break-word; word-wrap:break-word; word-break:break-word; line-break:strict; hyphens:none; -webkit-hyphens:none; -moz-hyphens:none;">
987
988 </td>
989
990
991 <td class="description last" style="min-width:310px; overflow-wrap:break-word; word-wrap:break-word; word-break:break-word; line-break:strict; hyphens:none; -webkit-hyphens:none; -moz-hyphens:none;"><p>The X coordinate (horizontal position) in pixels. The returning value will be calculated relatively to it.</p></td>
992 </tr>
993
994
995
996 <tr>
997
998 <td class="name" style="width:12%; min-width:110px; overflow-wrap:break-word; word-wrap:break-word; word-break:break-word; line-break:strict; hyphens:none; -webkit-hyphens:none; -moz-hyphens:none;"><code>ignoreScroll</code></td>
999
1000
1001 <td class="type" style="width:12%; min-width:110px; overflow-wrap:break-word; word-wrap:break-word; word-break:break-word; line-break:strict; hyphens:none; -webkit-hyphens:none; -moz-hyphens:none;">
1002
1003
1004<span class="param-type">boolean</span>
1005
1006
1007
1008
1009 </td>
1010
1011
1012 <td class="attributes" style="width:12%; min-width:110px; overflow-wrap:break-word; word-wrap:break-word; word-break:break-word; line-break:strict; hyphens:none; -webkit-hyphens:none; -moz-hyphens:none;">
1013
1014 &lt;optional><br>
1015
1016
1017
1018
1019
1020 </td>
1021
1022
1023
1024 <td class="default" style="width:12%; min-width:110px; overflow-wrap:break-word; word-wrap:break-word; word-break:break-word; line-break:strict; hyphens:none; -webkit-hyphens:none; -moz-hyphens:none;">
1025
1026 false
1027
1028 </td>
1029
1030
1031 <td class="description last" style="min-width:310px; overflow-wrap:break-word; word-wrap:break-word; word-break:break-word; line-break:strict; hyphens:none; -webkit-hyphens:none; -moz-hyphens:none;"><p>If set to true, the horizontal scroll position will not be added to the returning value.</p></td>
1032 </tr>
1033
1034
1035 </tbody>
1036</table>
1037
1038
1039
1040
1041<dl class="details">
1042
1043
1044
1045
1046
1047
1048
1049
1050
1051
1052
1053
1054
1055
1056
1057
1058
1059
1060
1061
1062
1063
1064
1065
1066
1067
1068
1069
1070
1071 <dt class="tag-source method-doc-label method-doc-details-label">Source:</dt>
1072 <dd class="tag-source">
1073 <ul class="dummy">
1074 <li>
1075 <a href="CrossBase_input_CB_Mouse.js.html">CrossBase/input/CB_Mouse.js</a>,
1076 <a href="CrossBase_input_CB_Mouse.js.html#sunlight-1-line-435">line 435</a>
1077 </li>
1078 </ul>
1079 </dd>
1080
1081
1082
1083
1084
1085
1086
1087 <dt class="tag-todo method-doc-label method-doc-details-label">To Do:</dt>
1088 <dd class="tag-todo">
1089 <ul>
1090 <li>Think about allowing to define an "e" parameter with the <a href="https://developer.mozilla.org/en-US/docs/Web/API/MouseEvent">mouse event object</a>.</li>
1091 </ul>
1092 </dd>
1093
1094</dl>
1095
1096
1097
1098
1099
1100
1101
1102
1103
1104
1105
1106
1107
1108 <h5>Returns:</h5>
1109
1110
1111<div class="param-desc">
1112 <p>Returns the current X coordinate (horizontal position) in pixels of the mouse relative to a given X position.</p>
1113</div>
1114
1115
1116
1117<dl>
1118 <dt>
1119 Type
1120 </dt>
1121 <dd>
1122
1123<span class="param-type">number</span>
1124
1125
1126
1127 </dd>
1128</dl>
1129
1130
1131
1132
1133
1134</dd>
1135
1136
1137
1138<hr>
1139<dt>
1140 <h4 class="name" id=".getY"><span class="type-signature">&lt;static> </span>getY<span class="signature">( [e] [, ignoreScroll] [, ignoreLock])</span><span class="type-signature"> &rarr; {number}</span></h4>
1141
1142
1143</dt>
1144<dd>
1145
1146
1147 <div class="description">
1148 <p>Gets and returns the Y coordinate (vertical position) of the mouse (relative to the window in desktop) in pixels.</p>
1149 </div>
1150
1151
1152
1153
1154
1155
1156
1157
1158 <h5>Parameters:</h5>
1159
1160
1161<table class="params table table-striped">
1162 <thead>
1163 <tr>
1164
1165 <th style="width:12%; min-width:110px;">Name</th>
1166
1167
1168 <th style="width:12%; min-width:110px;">Type</th>
1169
1170
1171 <th style="width:12%; min-width:110px;">Argument</th>
1172
1173
1174
1175 <th style="width:12%; min-width:110px;">Default</th>
1176
1177
1178 <th class="last" style="min-width:310px;">Description</th>
1179 </tr>
1180 </thead>
1181
1182 <tbody>
1183
1184
1185 <tr>
1186
1187 <td class="name" style="width:12%; min-width:110px; overflow-wrap:break-word; word-wrap:break-word; word-break:break-word; line-break:strict; hyphens:none; -webkit-hyphens:none; -moz-hyphens:none;"><code>e</code></td>
1188
1189
1190 <td class="type" style="width:12%; min-width:110px; overflow-wrap:break-word; word-wrap:break-word; word-break:break-word; line-break:strict; hyphens:none; -webkit-hyphens:none; -moz-hyphens:none;">
1191
1192
1193<span class="param-type">Event</span>
1194
1195
1196
1197
1198 </td>
1199
1200
1201 <td class="attributes" style="width:12%; min-width:110px; overflow-wrap:break-word; word-wrap:break-word; word-break:break-word; line-break:strict; hyphens:none; -webkit-hyphens:none; -moz-hyphens:none;">
1202
1203 &lt;optional><br>
1204
1205
1206
1207
1208
1209 </td>
1210
1211
1212
1213 <td class="default" style="width:12%; min-width:110px; overflow-wrap:break-word; word-wrap:break-word; word-break:break-word; line-break:strict; hyphens:none; -webkit-hyphens:none; -moz-hyphens:none;">
1214
1215 </td>
1216
1217
1218 <td class="description last" style="min-width:310px; overflow-wrap:break-word; word-wrap:break-word; word-break:break-word; line-break:strict; hyphens:none; -webkit-hyphens:none; -moz-hyphens:none;"><p><a href="https://developer.mozilla.org/en-US/docs/Web/API/MouseEvent">Mouse event object</a>. If not provided, the returning value will use the previously-cached value (updated the last time that the <a href="https://developer.mozilla.org/en-US/docs/Web/API/Element/mousemove_event">onMouseMove</a> event was fired).</p></td>
1219 </tr>
1220
1221
1222
1223 <tr>
1224
1225 <td class="name" style="width:12%; min-width:110px; overflow-wrap:break-word; word-wrap:break-word; word-break:break-word; line-break:strict; hyphens:none; -webkit-hyphens:none; -moz-hyphens:none;"><code>ignoreScroll</code></td>
1226
1227
1228 <td class="type" style="width:12%; min-width:110px; overflow-wrap:break-word; word-wrap:break-word; word-break:break-word; line-break:strict; hyphens:none; -webkit-hyphens:none; -moz-hyphens:none;">
1229
1230
1231<span class="param-type">boolean</span>
1232
1233
1234
1235
1236 </td>
1237
1238
1239 <td class="attributes" style="width:12%; min-width:110px; overflow-wrap:break-word; word-wrap:break-word; word-break:break-word; line-break:strict; hyphens:none; -webkit-hyphens:none; -moz-hyphens:none;">
1240
1241 &lt;optional><br>
1242
1243
1244
1245
1246
1247 </td>
1248
1249
1250
1251 <td class="default" style="width:12%; min-width:110px; overflow-wrap:break-word; word-wrap:break-word; word-break:break-word; line-break:strict; hyphens:none; -webkit-hyphens:none; -moz-hyphens:none;">
1252
1253 false
1254
1255 </td>
1256
1257
1258 <td class="description last" style="min-width:310px; overflow-wrap:break-word; word-wrap:break-word; word-break:break-word; line-break:strict; hyphens:none; -webkit-hyphens:none; -moz-hyphens:none;"><p>If set to true, the vertical scroll position will not be added to the returning value.</p></td>
1259 </tr>
1260
1261
1262
1263 <tr>
1264
1265 <td class="name" style="width:12%; min-width:110px; overflow-wrap:break-word; word-wrap:break-word; word-break:break-word; line-break:strict; hyphens:none; -webkit-hyphens:none; -moz-hyphens:none;"><code>ignoreLock</code></td>
1266
1267
1268 <td class="type" style="width:12%; min-width:110px; overflow-wrap:break-word; word-wrap:break-word; word-break:break-word; line-break:strict; hyphens:none; -webkit-hyphens:none; -moz-hyphens:none;">
1269
1270
1271<span class="param-type">boolean</span>
1272
1273
1274
1275
1276 </td>
1277
1278
1279 <td class="attributes" style="width:12%; min-width:110px; overflow-wrap:break-word; word-wrap:break-word; word-break:break-word; line-break:strict; hyphens:non