From the reference libraryRedM

autodoc_client_functions

jo_libs/modules/screen/autodoc/autodoc_client_functions.md

autodoc_client_functions

JO Functions > jo.screen.fadeIn()

Fades the screen in with specified duration <br>

JO Functions > jo.screen.fadeIn() > Syntax

jo.screen.fadeIn(duration, needWait)

JO Functions > jo.screen.fadeIn() > Parameters

duration : integer <BadgeOptional />

Duration of the fade in ms <br> default: 500

needWait : boolean <BadgeOptional />

Wait for the end of the fade <br> default: false

JO Functions > jo.screen.fadeIn() > Example

local duration = 1000 -- fade in over 1 second
local needWait = true -- wait until fade is complete
jo.screen.fadeIn(duration, needWait)


JO Functions > jo.screen.fadeOut()

Fades the screen out with specified duration <br>

JO Functions > jo.screen.fadeOut() > Syntax

jo.screen.fadeOut(duration, needWait)

JO Functions > jo.screen.fadeOut() > Parameters

duration : integer <BadgeOptional />

Duration of the fade in ms <br> default: 500

needWait : boolean <BadgeOptional />

Wait for the end of the fade <br> default: true

JO Functions > jo.screen.fadeOut() > Example

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

Back to documentation