API:StatusBarSetBackgroundTint
From RoR Wiki
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
StatusBarSetForegroundTintinstead ofStatusBarSetBackgroundTint. 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)
