DrawText

drawText(text)

Displays text on the screen in an overlay format.

Parameters:

  • text (string): The text to display on screen

Returns:

  • None

Validation:

  • Returns early if text is nil, not a string, or empty

Exports:

  • Standard Export: exports.ps_lib:drawText(text)

  • PS-UI Export (Legacy Support): exports['ps-ui']:drawText(text)

hideDrawText()

Hides the currently displayed text overlay.

Parameters:

  • None

Returns:

  • None

Exports:

  • Standard Export: exports.ps_lib:hideDrawText()

  • PS-UI Export (Legacy Support): exports['ps-ui']:hideDrawText()

Usage Examples

Basic Text Display

-- Show interaction prompt
exports['ps-lib']:drawText('[E] To interact')

-- Hide text when done
exports['ps-lib']:hideDrawText()

Last updated