Skip to content

Return of Reckoning

Wiki

RoR Wiki

API:StatusBarSetBackgroundTint

From RoR Wiki
Revision as of 19:49, 16 October 2026 by Maintenance script (talk | contribs) (UI Lua API import (WAR 1.4.8))
(diff) ← Older revision | Latest revision (diff) | Newer revision → (diff)

UI Lua API · StatusBar functions
Version: WAR 1.4.8

Tints the background of a StatusBar.

StatusBarSetBackgroundTint(barName, r, g, b)

Arguments

barName
string – Name of a StatusBar window.
r, g, b
number – Red, green and blue on a 0–255 scale.

Returns

Nothing.

Details

  • The values are divided by 255 (fractions are kept). Alpha is set to fully opaque.
  • The tint is applied to the bar's background window and all of its children.
  • If the bar has no background (for example background="" in XML), nothing happens.
  • The error message names StatusBarSetForegroundTint instead of StatusBarSetBackgroundTint. It is the same when the window does not exist and when it is not a StatusBar.

Errors

  • Error in function call 'StatusBarSetForegroundTint': StatusBar %s does not exist.

Example

From easystem_rrq/source/rrqprogressbar.lua:

StatusBarSetForegroundTint(self.windowName.."Bar0Bar", BAR_NEUTRAL_TINT.r, BAR_NEUTRAL_TINT.g, BAR_NEUTRAL_TINT.b)
StatusBarSetBackgroundTint (self.windowName.."Bar0Bar", BAR_BACKGROUND_TINT.r, BAR_BACKGROUND_TINT.g, BAR_BACKGROUND_TINT.b)

See also