# StateRenderer

# Description

Is used to render to the scene

# Methods

# SetMode(mode)

Change render mode for the following render calls (AddText, AddAction). Not case sensitive. Defaults to typewriter on invalid data.

  • mode (string) - either "static" or "typewriter"

StateRenderer

# AddLabel(x, y, key, [replacements])

Adds a screen label. Will be cleared with text.

  • x (number) - x coordinate inside game view relative to screen left.
  • y (number) - y coordinate inside game view relative to screen top (positive values downwards).
  • key (string) - text translation key
  • replacements - (Replacements)

StateRenderer

# AddText(key, [replacements])

Add text to text view

  • key (string) - text translation key
  • replacements - (Replacements)

StateRenderer

# AddAction(callback, key, [replacements])

Add text to text view

  • callback (LuaFunction) - no param lua function that is invoked when the text is clicked
  • key (string) - text translation key
  • replacements - (Replacements)

StateRenderer

# SetBackgroundColor(color)

Sets the background color for the current

StateRenderer