Skip to content

Return of Reckoning

Wiki

RoR Wiki

API:SliderBarGetCurrentPosition

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 · 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