Skip to content

Return of Reckoning

Wiki

RoR Wiki

API:StatusBarGetMaximumValue

From RoR Wiki

UI Lua API · StatusBar functions
Version: WAR 1.4.8

Returns the maximum value of a StatusBar.

maximum = StatusBarGetMaximumValue(barName)

Arguments

barName
string – Name of a StatusBar window.

Returns

maximum
number – The bar's maximum value.

Details

  • The maximum is set with StatusBarSetMaximumValue.
  • The error is the same when the window does not exist and when it is not a StatusBar.
  • The stock UI never calls StatusBarGetMaximumValue.

Errors

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

Example

A minimal example built from the signature above:

local fraction = StatusBarGetCurrentValue( "MyBar" ) / StatusBarGetMaximumValue( "MyBar" )

See also