lua_api.txt 21 KB

123456789101112131415161718192021222324252627282930313233343536373839404142434445464748495051525354555657585960616263646566676869707172737475767778798081828384858687888990919293949596979899100101102103104105106107108109110111112113114115116117118119120121122123124125126127128129130131132133134135136137138139140141142143144145146147148149150151152153154155156157158159160161162163164165166167168169170171172173174175176177178179180181182183184185186187188189190191192193194195196197198199200201202203204205206207208209210211212213214215216217218219220221222223224225226227228229230231232233234235236237238239240241242243244245246247248249250251252253254255256257258259260261262263264265266267268269270271272273274275276277278279280281282283284285286287288289290291292293294295296297298299300301302303304305306307308309310311312313314315316317318319320321322323324325326327328329330331332333334335336337338339340341342343344345346347348349350351352353354355356357358359360361362363364365366367368369370371372373374375376377378379380381382383384385386387388389390391392393394395396397398399400401402403404405406407408409410411412413414415416417418419420421422423424425426427428429430431432433434435436437438439440441442443444445446447448449450451452453454455456457458459460461462463464465466467468469470471472473474475476477478479480481482483484485486487488489490491492493494495496497498499500501502503504505506507508509510511512513514515516517518519520521522523524525526527528529530531532533534535536537538539540541542543544545546547548549550551552553554555556557558559560561562563564565566567568569570571572573574575576577578579580581582583584585586587588589590591592593594595596597598599600601602603604605606607608609610611612613614615616617618619620621622623624625626627628629630631632633634635636637638639640641642643644645646647648649650651652653654655656657658659660661662663664665666667668669670671672673674675676677678679680681682683684685686687688689690691692693694695696697698699700701702703704705706707708709710711712713714715716717718719720721722723724725726727728729730731732733734735736737738739740741742743744745746747748749750751752753754755756757758759760761762763764765766767768769770771772773774775776777778779780781782783784785786787788789790791792793794795796797798799800801802803804805806807808809810811812813814815816817818819820821822823824825826827828829830831832833834835836837838839840841842843844845846847848849850851852
  1. .. contents::
  2. Math
  3. ====
  4. Vector3
  5. -------
  6. **Vector3** (x, y, z) : Vector3
  7. Constructor.
  8. **x** (v) : float
  9. Returns the x value of the vector.
  10. **y** (v) : float
  11. Returns the y value of the vector.
  12. **z** (v) : float
  13. Returns the z value of the vector.
  14. **.x** : float
  15. Returns/assigns the x value of the vector.
  16. **.y** : float
  17. Returns/assigns the y value of the vector.
  18. **.z** : float
  19. Returns/assigns the z value of the vector.
  20. **set_x** (v, x)
  21. Sets the value of the x value of the vector.
  22. **set_y** (v, y)
  23. Sets the value of the y value of the vector.
  24. **set_z** (v, z)
  25. Sets the value of the z value of the vector.
  26. **values** (v) : float, float, float
  27. Returns the x, y and z values of the vector.
  28. **add** (a, b) : Vector3
  29. Adds the vector *a* to *b* and returns the result.
  30. **subtract** (a, b) : Vector3
  31. Subtracts the vector *b* from *a* and returns the result.
  32. **multiply** (a, k) : Vector3
  33. Multiplies the vector *a* by the scalar *k* and returns the result.
  34. **divide** (a, k) : Vector3
  35. Divides the vector *a* by the scalar *k* and returns the result.
  36. **dot** (a, b) : float
  37. Returns the dot product between the vectors *a* and *b*.
  38. **cross** (a, b) : Vector3
  39. Returns the cross product between the vectors *a* and *b*.
  40. **equal** (a, b) : bool
  41. Returns true whether the vectors *a* and *b* are equal.
  42. **length** (a) : float
  43. Returns the lenght of *a*.
  44. **squared_length** (a) : float
  45. Returns the squared length of *a*.
  46. **set_length** (a, len)
  47. Sets the lenght of *a* to *len*.
  48. **normalize** (a) : Vector3
  49. Normalizes *a* and returns the result.
  50. **distance** (a, b) : float
  51. Returns the distance between the points *a* and *b*.
  52. **angle** (a, b) : float
  53. Returns the angle between the vectors *a* and *b*.
  54. **forward** () : Vector3
  55. **backward** () : Vector3
  56. **left** () : Vector3
  57. **right** () : Vector3
  58. **up** () : Vector3
  59. **down** () : Vector3
  60. Returns the corresponding semantic axis.
  61. Vector3Box
  62. ----------
  63. **Vector3Box** ()
  64. Creates a new Vector3Box.
  65. **Vector3Box** (v)
  66. Creates a new Vector3Box from the Vector3 *v*.
  67. **Vector3Box** (x, y, z)
  68. Creates a new Vector3Box from components.
  69. **store** (v)
  70. Stores the Vector3 *v* in the box.
  71. **store** (x, y, z)
  72. Stores Vector3(x, y, z) in the box.
  73. **unbox** () : Vector3
  74. Returns the stored vector from the box.
  75. Quaternion
  76. ----------
  77. **Quaternion** (v, w) : Quaternion
  78. Constructor.
  79. **negate** (q) : Quaternion
  80. Negates the quaternion *q* and returns the result.
  81. **identity** () : Quaternion
  82. Returns the identity quaternion.
  83. **multiply** (a, b) : Quaternion
  84. Multiplies the quaternions *a* and *b*. (i.e. rotates first by *a* then by *b*).
  85. **multiply_by_scalar** (a, k) : Quaternion
  86. Multiplies the quaternion *a* by the scalar *k*.
  87. **length** (q) : float
  88. Returns the length of *q*.
  89. **normalize** (q) : Quaternion
  90. Normalizes the quaternion *q* and returns the result.
  91. **conjugate** (q) : Quaternion
  92. Returns the conjugate of quaternion *q*.
  93. **inverse** (q) : Quaternion
  94. Returns the inverse of quaternion *q*.
  95. **power** (q, exp) : Quaternion
  96. Returns the quaternion *q* raised to the power of *exp*.
  97. **elements** (q) : x, y, z, w
  98. Returns the elements of the quaternion.
  99. QuaternionBox
  100. -------------
  101. **QuaternionBox** ()
  102. Creates a new QuaternionBox.
  103. **QuaternionBox** (q)
  104. Creates a new QuaternionBox from the Quaternion *q*.
  105. **QuaternionBox** (x, y, z, w)
  106. Creates a new QuaternionBox from elements.
  107. **store(q)** ()
  108. Stores the Quaternion *q* in the box.
  109. **store** (x, y, z, w)
  110. Stores Quaternion(x, y, z, w) in the box.
  111. **unbox** () : Quaternion
  112. Returns the stored quaternion from the box.
  113. Matrix4x4
  114. ---------
  115. **Matrix4x4** (m0, m1, ..., m15) : Matrix4x4
  116. Constructor.
  117. **from_quaternion** (q) : Matrix4x4
  118. Returns a new matrix from *q*.
  119. **from_translation** (t) : Matrix4x4
  120. Returns a new matrix from *t*.
  121. **from_quaternion_translation** (q, t) : Matrix4x4
  122. Returns a new matrix from *q* and *t*.
  123. **from_axes** (x, y, z, t) : Matrix4x4
  124. Returns a new matrix from *x*, *y*, *z* and *t*.
  125. **add** (a, b) : Matrix4x4
  126. Adds the matrix *a* to *b* and returns the result.
  127. **subtract** (a, b) : Matrix4x4
  128. Subtracts the matrix *b* from *a* and returns the result.
  129. **multiply** (a, b) : Matrix4x4
  130. Multiplies the matrix *a* by *b* and returns the result. (i.e. transforms first by *a* then by *b*)
  131. **transpose** (m) : Matrix4x4
  132. Transposes the matrix *m* and returns the result.
  133. **determinant** (m) : float
  134. Returns the determinant of the matrix *m*.
  135. **invert** (m) : Matrix4x4
  136. Inverts the matrix *m* and returns the result.
  137. **x** (m) : Vector3
  138. Returns the x asis of the matrix *m*.
  139. **y** (m) : Vector3
  140. Returns the y asis of the matrix *m*.
  141. **z** (m) : Vector3
  142. Returns the z asis of the matrix *m*.
  143. **set_x** (m, x)
  144. Sets the x axis of the matrix *m*.
  145. **set_y** (m, y)
  146. Sets the y axis of the matrix *m*.
  147. **set_z** (m, z)
  148. Sets the z axis of the matrix *m*.
  149. **translation** (m, a) : Vector3
  150. Returns the translation portion of the matrix *m*.
  151. **set_translation** (m, t)
  152. Sets the translation portion of the matrix *m*.
  153. **identity** ()
  154. Returns the identity matrix.
  155. **to_string** (a)
  156. Returns a string representing the matrix.
  157. Matrix4x4Box
  158. ------------
  159. **Matrix4x4Box** (m)
  160. Creates a new Matrix4x4Box from the Matrix4x4 *m*.
  161. **store** (m)
  162. Stores the Matrix4x4 *m* in the box.
  163. **unbox** () : Matrix4x4
  164. Returns the stored matrix from the box.
  165. Math
  166. ----
  167. **ray_obb_intersection** (from, dir, tm, extents) : float
  168. Returns the distance along ray (from, dir) to intersection point with the oriented
  169. bounding box (tm, extents) or -1.0 if no intersection.
  170. World
  171. =====
  172. **spawn_unit** (world, name, [position, rotation]) : Unit
  173. Spawns a new instance of the unit *name* at the given *position* and *rotation*.
  174. **destroy_unit** (world, unit)
  175. Destroys the given *unit*.
  176. **num_units** (world) : int
  177. Returns the number of units in the *world*.
  178. **units** (world) : Table
  179. Returns all the the units in the world in a table.
  180. **update_animations** (world, dt)
  181. Update all animations with *dt*.
  182. **update_scene** (world, dt)
  183. Updates the scene with *dt*.
  184. **update** (world, dt)
  185. Updates the world with *dt*.
  186. **play_sound** (world, name, [loop, volume, position, range]) : SoundInstanceId
  187. Plays the sound with the given *name* at the given *position*, with the given
  188. *volume* and *range*. *loop* controls whether the sound must loop or not.
  189. **stop_sound** (world, id)
  190. Stops the sound with the given *id*.
  191. **link_sound** (world, id, unit, node)
  192. Links the sound *id* to the *node* of the given *unit*.
  193. After this call, the sound *id* will follow the unit *unit*.
  194. **set_listener_pose** (world, pose)
  195. Sets the *pose* of the listener.
  196. **set_sound_position** (world, position)
  197. Sets the *position* of the sound *id*.
  198. **set_sound_range** (world, range)
  199. Sets the *range* of the sound *id*.
  200. **set_sound_volume** (world, volume)
  201. Sets the *volume* of the sound *id*.
  202. **create_window_gui** (world) : Gui
  203. Creates a new window-space Gui of size *width* and *height*.
  204. **destroy_gui** (world, id)
  205. Destroys the gui with the given *id*.
  206. **create_debug_line** (world, depth_test) : DebugLine
  207. Creates a new DebugLine. *depth_test* controls whether to
  208. enable depth test when rendering the lines.
  209. **destroy_debug_line** (world, line)
  210. Destroys the debug *line*.
  211. **load_level** (world, name) : Level
  212. Loads the level *name* into the world.
  213. **physics_world** (world) : PhysicsWorld
  214. Returns the physics sub-world.
  215. **sound_world** (world) : SoundWorld
  216. Returns the sound sub-world.
  217. Unit
  218. ----
  219. **local_position** (unit) : Vector3
  220. Returns the local position of the unit.
  221. **local_rotation** (unit) : Quaternion
  222. Returns the local rotation of the unit.
  223. **local_scale** (unit) : Vector3
  224. Returns the local scale of the unit.
  225. **local_pose** (unit) : Matrix4x4
  226. Returns the local pose of the unit.
  227. **world_position** (unit) : Vector3
  228. Returns the world position of the unit.
  229. **world_rotation** (unit) : Quaternion
  230. Returns the world rotation of the unit.
  231. **world_pose** (unit) : Matrix4x4
  232. Returns the world pose of the unit.
  233. **set_local_position** (unit, position)
  234. Sets the local position of the unit.
  235. **set_local_rotation** (unit, rotation)
  236. Sets the local rotation of the unit.
  237. **set_local_scale** (unit, scale)
  238. Sets the local scale of the unit.
  239. **set_local_pose** (unit, n, pose)
  240. Sets the local pose of the unit.
  241. **camera** (unit, name)
  242. Returns the camera *name*.
  243. **material** (unit, name)
  244. Returns the material *name*.
  245. **mesh** (unit, name)
  246. Returns the mesh *name*.
  247. **sprite** (unit, name)
  248. Returns the sprite *name*.
  249. **actor** (unit, name)
  250. Returns the actor *name*.
  251. **controller** (unit, name)
  252. Returns the controller *name*.
  253. **is_a** (unit, type)
  254. Returns whether the unit is of the given *type*.
  255. **play_sprite_animation** (unit, name, loop)
  256. Plays the sprite animation *name*.
  257. **stop_sprite_animation** (unit)
  258. Stops the current playing animation.
  259. Camera
  260. ------
  261. **set_projection_type** (camera, type)
  262. Sets the projection type of the camera.
  263. **projection_type** (camera) : int
  264. Returns the projection type of the camera.
  265. **fov** (camera) : float
  266. Returns the field-of-view of the camera in degrees.
  267. **set_fov** (camera, degrees)
  268. Sets the field-of-view of the camera in degrees.
  269. **aspect** (camera) : float
  270. Returns the aspect ratio of the camera. (Perspective projection only.)
  271. **set_aspect** (camera)
  272. Sets the aspect ratio of the camera. (Perspective projection only.)
  273. **near_clip_distance** (camera) : float
  274. Returns the near clip distance of the camera.
  275. **set_near_clip_distance** (camera, near)
  276. Sets the near clip distance of the camera.
  277. **far_clip_distance** (camera) : float
  278. Returns the far clip distance of the camera.
  279. **set_far_clip_distance** (camera, far)
  280. Sets the far clip distance of the camera.
  281. **set_orthographic_metrics** (camera, left, right, bottom, top)
  282. Sets the coordinates for orthographic clipping planes. (Orthographic projection only.)
  283. **set_viewport_metrics** (camera, x, y, width, height)
  284. Sets the coordinates for the camera viewport in pixels.
  285. **screen_to_world** (camera, pos) : Vector3
  286. Returns *pos* from screen-space to world-space coordinates.
  287. **world_to_screen** (camera, pos) : Vector3
  288. Returns *pos* from world-space to screen-space coordinates.
  289. Sprite
  290. ------
  291. **set_frame** (sprite, num)
  292. Sets the frame of the sprite.
  293. **set_depth** (sprite, depth)
  294. Sets the depth of the sprite.
  295. Sprites with higher depth values are drawn in front of sprites
  296. whith lower depth values.
  297. Mesh
  298. ----
  299. **local_position** (mesh) : Vector3
  300. Returns the local position of the mesh.
  301. **local_rotation** (mesh) : Quaternion
  302. Returns the local rotation of the mesh.
  303. **local_pose** (mesh) : Matrix4x4
  304. Returns the local pose of the mesh.
  305. **set_local_position** (mesh, unit, position)
  306. Sets the local position of the mesh.
  307. **set_local_rotation** (mesh, unit, rotation)
  308. Sets the local rotation of the mesh.
  309. **set_local_pose** (mesh, unit, pose)
  310. Sets the local pose of the mesh.
  311. Material
  312. --------
  313. **set_float** (material, variable, value)
  314. Sets the material variable to the given value.
  315. **set_vector2** (material, variable, value)
  316. Sets the material variable to the given value.
  317. **set_vector3** (material, variable, value)
  318. Sets the material variable to the given value.
  319. Gui
  320. ---
  321. resolution
  322. TODO
  323. move
  324. TODO
  325. screen_to_gui
  326. TODO
  327. draw_rectangle
  328. TODO
  329. draw_image
  330. TODO
  331. draw_image_uv
  332. TODO
  333. draw_text
  334. TODO
  335. PhysicsWorld
  336. =============
  337. **gravity** (physics_world) : Vector3
  338. Returns the gravity.
  339. **set_gravity** (physics_world, gravity)
  340. Sets the gravity.
  341. **make_raycast**
  342. TODO
  343. **overlap_test**
  344. TODO
  345. Controller
  346. ----------
  347. **move** (controller, position)
  348. Moves the controller to *position*.
  349. **position** (controller) : Vector3
  350. Returns the position of the controller.
  351. **collides_up** (controller) : bool
  352. Returns whether the contoller collides upwards.
  353. **collides_down** (controller) : bool
  354. Returns whether the controller collides downwards.
  355. **collides_sides** (controller) : bool
  356. Returns whether the controller collides sidewards.
  357. Actor
  358. -----
  359. **world_position** (actor) : Vector3
  360. Returns the world position of the actor.
  361. **world_rotation** (actor) : Quaternion
  362. Returns the world rotation of the actor.
  363. **world_pose** (actor) : Matrix4x4
  364. Returns the world pose of the actor.
  365. **teleport_world_position** (actor, position)
  366. Teleports the actor to the given world position.
  367. **teleport_world_rotation** (actor, rotation)
  368. Teleports the actor to the given world rotation.
  369. **teleport_world_pose** (actor, pose)
  370. Teleports the actor to the given world pose.
  371. **center_of_mass** (actor) : Vector3
  372. Returns the center of mass of the actor.
  373. **enable_gravity** (actor)
  374. Enables gravity for the actor.
  375. **disable_gravity** (actor)
  376. Disables gravity for the actor.
  377. **enable_collision** (actor)
  378. Enables collision detection for the actor.
  379. **disable_collision** (actor)
  380. Disables collision detection for the actor.
  381. **set_collision_filter** (actor, name)
  382. Sets the collision filter of the actor.
  383. **set_kinematic** (actor, kinematic)
  384. Sets whether the actor is kinematic or not.
  385. Note that this call has no effect on static actors.
  386. **move** (actor, position)
  387. Moves the actor to *pos*
  388. Note that this call only affects nonkinematic actors.
  389. **is_static** (actor) : bool
  390. Returns whether the actor is static.
  391. **is_dynamic** (actor) bool
  392. Returns whether the actor is dynamic.
  393. **is_kinematic** (actor) : bool
  394. Returns whether the actor is kinematic (keyframed).
  395. **is_nonkinematic** (actor) : bool
  396. Returns whether the actor is nonkinematic (i.e. dynamic and not kinematic).
  397. **linear_damping** (actor) : float
  398. Returns the linear damping of the actor.
  399. **set_linear_damping** (actor, damping)
  400. Sets the linear damping of the actor.
  401. **angular_damping** (actor) : float
  402. Returns the angular damping of the actor.
  403. **set_angular_damping** (actor, rate)
  404. Sets the angular damping of the actor.
  405. **linear_velocity** (actor) : Vector3
  406. Returns the linear velocity of the actor.
  407. **set_linear_velocity** (actor, velocity)
  408. Sets the linear velocity of the actor.
  409. Note that this call only affects nonkinematic actors.
  410. **angular_velocity** (actor) : Vector3
  411. Returns the angular velocity of the actor.
  412. **set_angular_velocity** (actor, velocity)
  413. Sets the angular velocity of the actor.
  414. Note that this call only affects nonkinematic actors.
  415. **add_impulse** (actor, impulse)
  416. Adds a linear impulse (acting along the center of mass) to the actor.
  417. Note that this call only affects nonkinematic actors.
  418. **add_impulse_at** (actor, impulse, position)
  419. Adds a linear impulse (acting along the world position *pos*) to the actor.
  420. Note that this call only affects nonkinematic actors.
  421. **add_torque_impulse** (actor, impulse)
  422. Adds a torque impulse to the actor.
  423. **push** (actor, velocity, mass)
  424. Pushes the actor as if it was hit by a point object with the given *mass*
  425. travelling at the given *velocity*.
  426. Note that this call only affects nonkinematic actors.
  427. **push_at** (actor, velocity, mass, position)
  428. Like push() but applies the force at the world position *pos*.
  429. Note that this call only affects nonkinematic actors.
  430. **is_sleeping** (actor) : bool
  431. Returns whether the actor is sleeping.
  432. **wake_up** (actor)
  433. Wakes the actor up.
  434. **unit** (actor) : Unit
  435. Returns the unit that owns the actor or nil;
  436. SoundWorld
  437. ===========
  438. **stop_all** (sound_world)
  439. Stops all the sounds in the world.
  440. **pause_all** (sound_world)
  441. Pauses all the sounds in the world
  442. **resume_all** (sound_world)
  443. Resumes all previously paused sounds in the world.
  444. **is_playing** (sound_world, id) : bool
  445. Returns wheter the sound *id* is playing.
  446. ResourcePackage
  447. ================
  448. **load** (package)
  449. Loads all the resources in the package.
  450. Note that the resources are not immediately available after the call is made,
  451. instead, you have to poll for completion with has_loaded().
  452. **unload** (package)
  453. Unloads all the resources in the package.
  454. **flush** (package)
  455. Waits until the package has been loaded.
  456. **has_loaded** (package) : bool
  457. Returns whether the package has been loaded.
  458. Device
  459. ======
  460. **platform** () : string
  461. Returns a string identifying what platform the engine is running on.
  462. **architecture** () : string
  463. Returns a string identifying what architecture the engine is running on.
  464. **version** () : string
  465. Returns a string identifying the engine version.
  466. **last_delta_time** () : float
  467. Returns the time in seconds needed to render the last frame
  468. **quit** ()
  469. Quits the application.
  470. **resolution** () : Table
  471. Returns the main window resolution.
  472. **create_world** () : World
  473. Creates a new world.
  474. **destroy_world** (world)
  475. Destroys the given *world*.
  476. **render_world** (world, camera)
  477. Renders the given *world* from the point of view of the given *camera*.
  478. **create_resource_package** (name) : ResourcePackage
  479. Returns the resource package with the given *package_name* name.
  480. **destroy_resource_package** (package)
  481. Destroy a previously created resource *package*.
  482. Note that to unload the resources loaded by the package, you have to call
  483. ResourcePackage.unload() first.
  484. **console_send** (table)
  485. Sends the given lua *table* to clients connected to the engine.
  486. Note that the current version only supports explicitly escaped strings as key/value pairs.
  487. **can_get** (type, name) : bool
  488. Returns whether the resource (type, name) is loaded.
  489. When resource autoload is enabled it always returns true.
  490. **enable_resource_autoload** (enable)
  491. Sets whether resources should be automatically loaded when accessed.
  492. DebugLine
  493. =========
  494. **add_line** (debug_line, start, end, color)
  495. Adds a line from *start* to *end* with the given *color*.
  496. **add_sphere** (debug_line, center, radius, color)
  497. Adds a sphere at *center* with the given *radius* and *color*.
  498. **add_obb** (debug_line, tm, extents, color)
  499. Adds an orientd bounding box. *tm* describes the position and orientation of
  500. the box. *extents* describes the size of the box along the axis.
  501. **clear** (debug_line)
  502. Clears all the lines.
  503. **commit** (debug_line)
  504. Sends the lines to renderer for drawing.
  505. Input
  506. =====
  507. Keyboard
  508. --------
  509. **modifier_pressed** (modifier) : bool
  510. Returns whether the specified *modifier* is pressed.
  511. **button_pressed** (button) : bool
  512. Returns whether the specified *b* button is pressed in the current frame.
  513. **button_released** (button) : bool
  514. Returns whether the specified *b* button is released in the current frame.
  515. **any_pressed** () : bool
  516. Returns wheter any button is pressed in the current frame.
  517. **any_released** () : bool
  518. Returns whether any button is released in the current frame.
  519. Mouse
  520. -----
  521. **button_pressed** (button) : bool
  522. Returns whether the *b* button is pressed in the current frame.
  523. **button_released** (button) : bool
  524. Returns whether the *b* button is released in the current frame.
  525. **any_pressed** () : bool
  526. Returns wheter any button is pressed in the current frame.
  527. **any_released** () : bool
  528. DReturns whether any button is released in the current frame.ef
  529. **cursor_xy** () : Vector2
  530. Returns the position of the cursor in window space.
  531. **set_cursor_xy** (position)
  532. Sets the position of the cursor in window space.
  533. **cursor_relative_xy** () : Vector2
  534. Returns the relative position of the cursor in window space.
  535. **set_cursor_relative_xy** (position)
  536. Sets the relative position of the cursor in window space.
  537. **wheel** () : float
  538. Returns the mouse wheel state in the current frame.
  539. A positive or negative value is returned when the wheel is up or down
  540. respectively, 0.0 otherwise.
  541. Touch
  542. -----
  543. **pointer_down** (pointer) : bool
  544. Returns whether the *p* pointer is pressed in the current frame.
  545. **pointer_up** (pointer) : bool
  546. Returns whether the *p* pointer is released in the current frame.
  547. **any_down** () : bool
  548. Returns wheter any pointer is pressed in the current frame.
  549. **any_up** () : bool
  550. Returns whether any pointer is released in the current frame.
  551. **pointer_xy** () : Vector2
  552. Returns the position of the pointer *p* in window space.
  553. Window
  554. ======
  555. **show** ()
  556. Shows the window.
  557. **hide** ()
  558. Hides the window.
  559. **resize** (width, height)
  560. Resizes the window to *width* and *height*.
  561. **move** (x, y)
  562. Moves the window to *x* and *y*.
  563. **minimize** ()
  564. Minimizes the window.
  565. **restore** ()
  566. Restores the window.
  567. **is_resizable** () : bool
  568. Returns whether the window is resizable.
  569. **set_resizable** (resizable)
  570. Sets whether the window is resizable.
  571. **title** () : string
  572. Returns the title of the window.
  573. **set_title** (title)
  574. Sets the title of the window.