focus callback

This commit is contained in:
Jill 2022-09-22 15:57:56 +03:00
parent ecc7911fa0
commit 09148da26f
2 changed files with 5 additions and 1 deletions

View File

@ -35,6 +35,7 @@ Uranium Template originally formed during the creation of a currently unreleased
- [`uranium.init()`](#uraniuminit)
- [`uranium.ready()`](#uraniumready)
- [`uranium.exit()`](#uraniumexit)
- [`uranium.focus(hasFocus: boolean)`](#uraniumfocushasfocus-boolean)
- [Custom callbacks](#custom-callbacks)
- [Requiring files](#requiring-files)
- [Standard library](#standard-library)
@ -337,6 +338,9 @@ Fired on the first tick. A later version of `init()` where more things should be
#### `uranium.exit()`
_Should_ call when the player exits the file. **Not properly tested yet.**
#### `uranium.focus(hasFocus: boolean)`
Called whenever the window loses/gains focus. You can use this to reduce render quality on alt-tab.
### Custom callbacks
Custom callbacks require no extra setup. Define your callback like usual:

@ -1 +1 @@
Subproject commit f528fa55f6fa9bd2ba47e233a3f6814c68214c7c
Subproject commit 0763d750ff574e0df75943b036b357428dd9158c