Screen Client โ
Screen module is a module to control screen effects such as fades, transitions, and visual displays. It provides simple functions for creating smooth visual transitions in your game.
JO Functions โ
jo.screen.fadeIn() โ
Fades the screen in with specified duration
Syntax โ
lua
jo.screen.fadeIn(duration, needWait)
Parameters โ
duration
: integer Optional
Duration of the fade in ms
default: 500
needWait
: boolean Optional
Wait for the end of the fade
default: false
Example โ
lua
local duration = 1000 -- fade in over 1 second
local needWait = true -- wait until fade is complete
jo.screen.fadeIn(duration, needWait)
jo.screen.fadeOut() โ
Fades the screen out with specified duration
Syntax โ
lua
jo.screen.fadeOut(duration, needWait)
Parameters โ
duration
: integer Optional
Duration of the fade in ms
default: 500
needWait
: boolean Optional
Wait for the end of the fade
default: true
Example โ
lua
local duration = 2000 -- fade out over 2 seconds
local needWait = true -- wait until fade is complete
jo.screen.fadeOut(duration, needWait)
-- You can also use it with default values
jo.screen.fadeOut() -- Uses 500ms duration and waits for completion