Navigation menu
Personal tools
Not logged in
Talk
Contributions
Create account
Log in
Namespaces
WoW
Talk
English
Views
Read
Edit
History
More
Search
Navigation
Home
Random page
Help using wiki
Editions
for WoW
for WildStar
for Solar2D
Documentation
for WoW
for WildStar
Reference
WoW
⦁ FrameXML
⦁ AddOns
⦁ API
⦁ WoW Lua
WildStar
⦁ AddOns
⦁ API
⦁ WildStar Lua
Engine
Tools
What links here
Related changes
Special pages
Page information
Site
Recent Changes
Editing
WoW:XML/Slider
Jump to navigation
Jump to search
Warning:
You are not logged in. Your IP address will be publicly visible if you make any edits. If you
log in
or
create an account
, your edits will be attributed to your username, along with other benefits.
Anti-spam check. Do
not
fill this in!
{{uixmlelem}} [[XML/Slider|Slider]] is an element that acts as a traditional graphical slider control in the WoW UI. Like [[XML/ScrollFrame|ScrollFrame]], 'Slider' is a [[XML/Frame|Frame]] and is placed in a [[XML/Frames|Frames]] list in a [[XML/Frame|Frame]]. == Inheritance == Inherited by: none, Inherits: [[XML/Frame|Frame]]<br /> Widget API: [[UIOBJECT Slider|UIObject Slider]] == Elements == * ThumbTexture ([[XML/Texture|Texture]]) == Attributes == * drawLayer ([[XML/DRAWLAYER|DRAWLAYER]]) - Layer level in 'Z order'. Default is 'OVERLAY'. * minValue (float) - defines a minimum value for the slider * maxValue (float) - defines a maximum value for the slider * defaultValue (float) - starting value for an newly loaded slider * valueStep (float) - amount to increment value for a 'step' action, like when the slider 'thumb' is slid * orientation ([[XML/ORIENTATION|ORIENTATION]]) - Default is VERTICAL. * stepsPerPage (float) - number of 'valueSteps' to increment value for a 'page' action, like when slider 'bar' is clicked == Inherited == * name (string) - name of this layout frame * inherits (string) - a virtual [[XML/Frame|Frame]] to inherit properties from. * virtual (bool) - Default is 'false'. * ... (others from [[XML/Frame|Frame]]) == Xsd == <xs:extension base="FrameType"> <xs:sequence minOccurs="0"> <xs:choice maxOccurs="unbounded"> <xs:element name="ThumbTexture" type="TextureType"/> </xs:choice> </xs:sequence> <xs:attribute name="drawLayer" type="ui:DRAWLAYER" default="OVERLAY"/> <xs:attribute name="minValue" type="xs:float"/> <xs:attribute name="maxValue" type="xs:float"/> <xs:attribute name="defaultValue" type="xs:float"/> <xs:attribute name="valueStep" type="xs:float"/> <xs:attribute name="orientation" type="ui:ORIENTATION" default="VERTICAL"/> </xs:extension> == Summary == The Slider element is used to display graphical slider control in the user interface. The silder widget itself provides the behaviour, however the textures still need to be provided. === Example === <[[XML/Ui|Ui]] xmlns="http://www.blizzard.com/wow/ui/" xmlns:xsi="http://www.w3.org/2001/XMLSchema-instance"> <[[XML/Slider|Slider]] name="MySlider_Template" orientation="HORIZONTAL" enableMouse="true" virtual="true"> <[[XML/Dimension|Size]] x="144" y="17"/> <HitRectInsets left="0" right="0" top="-10" bottom="-10"/> <[[XML/Backdrop|Backdrop]] bgFile="Interface\Buttons\UI-SliderBar-Background" edgeFile="Interface\Buttons\UI-SliderBar-Border" tile="true"> <EdgeSize val="8"/> <TileSize val="8"/> <BackgroundInsets left="3" right="3" top="6" bottom="6"/> </Backdrop> <ThumbTexture name="$parentThumb" file="Interface\Buttons\UI-SliderBar-Button-Horizontal"> <Size x="32" y="32"/> </ThumbTexture> </Slider> <[[XML/Frame|Frame]] name="MyFrame"> <Size x="200" y="200"/> <Frames> <[[XML/Slider|Slider]] name="$parentSlider" inherits="MySlider_Template"> <Scripts> <OnValueChanged> MyFrameSlider_OnValueChanged(self, value, userInput) </OnValueChanged> </Scripts> </Slider> </Frames> </Frame> </Ui> This example creates a basic horizontal slider to be displayed in a frame. The slider is defined with textures in a template, and then used in "MyFrame" with an event hander for each slider value change. == Details == === Steps === The 'valueStep' and 'stepsPerPage' attributes control the value increments for actions on the slider bar, or any time the value for the slider is set. The 'valueStep' attribute along with 'minValue' and 'maxValue' controls the valid for the slider. If max/min are 1/10 with 'valueStep' as 1, SetValueStep(1.4) will actually set the value to 1. If max/min are 1.5/10.5 with 'valueStep' as 1, SetValueStep(1.9) will actually set the value to 1.5. When the slider 'thumb' is slid during user UI interaction, the 'thumb' will only move in 'step' increments. === Pages === The 'stepsPerPage' property in conjunction with 'valueStep' controls how much the value will change when a paging the slider, like when a user click on the 'bar' part of the slider. If 'valueStep' is 2 and 'stepsPerPage' is 3, then causing a 'page' increment action will increment the value 6 each time. == Notes == * 'stepsPerPage' was added in 5.4.0
Summary:
Please note that all contributions to AddOn Studio are considered to be released under the Creative Commons Attribution-NonCommercial-ShareAlike (see
AddOn Studio Wiki:Copyrights
for details).
Submissions must be written by you, or copied from a public domain or similar free resource (see
AddOn Studio Wiki:Copyrights
for details).
Cancel
Editing help
(opens in new window)
Templates used on this page:
Template:Apinav
(
edit
)
Template:Editlink
(
edit
)
Template:Tocright
(
edit
)
Template:Uixmlelem
(
edit
)