-
Notifications
You must be signed in to change notification settings - Fork 3
Home
Phanx edited this page Nov 26, 2014
·
1 revision
Simple slider widget generator for GUI configuration. Requires LibStub.
lib = LibStub("PhanxConfig-Slider")
Create a slider widget:
slider = lib:New(parentFrame, labelText[, tooltipText], minValue, maxValue[, valueStep][, isPercent][, noEditBox])
-
parentFrame
- frame reference -
labelText
- string; text to be displayed on the color picker -
tooltipText
- string; text to be be displayed in a tooltip when moving the cursor over the color picker (optional) -
minValue
- number: the minimum allowed value -
maxValue
- number: the maximum allowed value -
valueStep
- number: the value granularity within the allowed range (optional; default: 1) -
isPercent
- boolean: whether to display the range using percentages, eg. 1 = 100% (optional) -
noEditBox
- boolean: whether to prevent adding a text input box underneath the slider for manual value entry (optional)
Note that PhanxConfig-EditBox must also be present to add a text input box, even if noEditBox
is not set.
slider = lib.CreateSlider(parentFrame, labelText[, tooltipText], minValue, maxValue[, valueStep][, isPercent][, noEditBox])
Set a function to be run when the slider value is changed.
slider.OnValueChanged = function(slider, value) ... end
Copyright © 2009–2014 Phanx. All rights reserved. You MAY distribute this library WITHOUT CHANGES inside addons that make use of it. You MAY NOT distribute this library by itself or with changes. You MAY use any or all of the source code from this library in your own library or addon, as long as you do not use the name of this library or the name of its author anywhere in your work outside of an optional attribution. See the comment header in the library file for more details.