API:StatusBarSetForegroundTint
From RoR Wiki
UI Lua API · StatusBar functions
Version: WAR 1.4.8
Tints the fill (foreground) of a StatusBar.
StatusBarSetForegroundTint(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 foreground window and all of its children.
- If the bar has no foreground, nothing happens.
- The error 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.."Bar1Bar", BAR_ORDER_TINT.r, BAR_ORDER_TINT.g, BAR_ORDER_TINT.b) StatusBarSetBackgroundTint (self.windowName.."Bar1Bar", BAR_BACKGROUND_TINT.r, BAR_BACKGROUND_TINT.g, BAR_BACKGROUND_TINT.b)
