Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Added variables in OTUI #10

Closed

Conversation

luanluciano93
Copy link

  • Syntax: $var-: value
  • Can be used in Lua, ie. label:setColor("$var-color")
  • g_ui.getOTUIVars() returns map with all variables and their values
  • g_ui.hasOTUIVar(variable) returns true if variable exists
  • g_ui.getOTUIVar(variable) returns value of variable
  • g_ui.getOTUIVarSafe(variable) returns value of variable or variable
  • g_ui.addOTUIVar(var, value) adds new variable with value
  • Added data/styles/0-vars.otui with variables for 10-labels.otui

credits: Oen44

- Syntax: $var-<name>: value
- Can be used in Lua, ie. label:setColor("$var-color")
- g_ui.getOTUIVars() returns map with all variables and their values
- g_ui.hasOTUIVar(variable) returns true if variable exists
- g_ui.getOTUIVar(variable) returns value of variable
- g_ui.getOTUIVarSafe(variable) returns value of variable or variable
- g_ui.addOTUIVar(var, value) adds new variable with value
- Added data/styles/0-vars.otui with variables for 10-labels.otui
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

Successfully merging this pull request may close these issues.

2 participants