Skip to content

Return of Reckoning

Wiki

RoR Wiki

API:SliderBarGetCurrentPosition

From RoR Wiki

UI Lua API · SliderBar functions
Version: WAR 1.4.8

Returns the position of a SliderBar.

position = SliderBarGetCurrentPosition(sliderBarName)

Arguments

sliderBarName
string – Name of the SliderBar.

Returns

position
number – Current position, from 0 (start) to 1 (end).

Errors

  • Error in function call 'SliderBarGetCurrentPosition': Window %s does not exist.
  • Error in function call 'SliderBarGetCurrentPosition': Window %s is not a SliderBar.

Example

From default/ea_chatwindow/source/chatoptionswindow.lua:

colorRatio = SliderBarGetCurrentPosition("ChatOptionsWindowCustomColorRedSlider")
color.r = colorRatio * 255

See also