Button
widget type42 methodsavailable in: camelot
CreateFrame("Button", …) makes one. It has every method of Frame, plus 42 of its own.
Inherits from
- Button · 42
- Frame · 126
- Region · 16
- ScriptRegion · 55
- ScriptRegionResizing · 13
- AnimatableObject · 3
- Object · 5
- FrameScriptObject · 21
The number is each type's own documented methods. A Button has all of them.
Methods
In the emulator: 35 implemented, 7 guessed.
| method | what it does | status |
|---|---|---|
ClearDisabledTexture | Removes the button's disabled texture. · by wowlua() | implemented |
ClearHighlightTexture | Removes the button's highlight texture. · by wowlua() | implemented |
ClearNormalTexture | Removes the button's normal texture. · by wowlua() | implemented |
ClearPushedTexture | Removes the button's pushed texture. · by wowlua() | implemented |
Click | Performs a virtual mouse click on the button. · warcraft.wiki.gg ↗(button: string, isDown: boolean) | implemented |
Disable | Disables the button, so it no longer responds to clicks. · by wowlua() | implemented |
Enable | Enables the button, so it responds to clicks. · by wowlua() | implemented |
GetButtonState | Returns the button's state: NORMAL, PUSHED or DISABLED. · by wowlua(): ButtonStateToken | implemented |
GetDisabledFontObject | Returns the font the button's text uses while disabled. · by wowlua(): Font | guessed |
GetDisabledTexture | Returns the texture the button shows while disabled. · by wowlua(): Texture | implemented |
GetFontString | Returns the font string that shows the button's text. · by wowlua(): FontString | implemented |
GetHighlightFontObject | Returns the font the button's text uses while highlighted. · by wowlua(): Font | guessed |
GetHighlightTexture | Returns the highlight texture for the button. · warcraft.wiki.gg ↗(): Texture | implemented |
GetMotionScriptsWhileDisabled | Whether the button runs OnEnter and OnLeave while disabled. · by wowlua(): boolean | guessed |
GetNormalFontObject | Returns the font object for the button's normal state. · warcraft.wiki.gg ↗(): Font | guessed |
GetNormalTexture | Returns the texture the button shows in its normal state. · by wowlua(): Texture | implemented |
GetPushedTextOffset | Returns how far the button's text moves while pushed, as x and y offsets. · by wowlua(): (number, number) | guessed |
GetPushedTexture | Returns the texture the button shows while pushed. · by wowlua(): Texture | implemented |
GetText | Returns the text on the button. · warcraft.wiki.gg ↗(): string | implemented |
GetTextHeight | Returns the height of the button's text. · by wowlua(): number | guessed |
GetTextWidth | Returns the width of the button's text. · by wowlua(): number | implemented |
IsEnabled | Returns true if the button is enabled. · warcraft.wiki.gg ↗(): boolean | implemented |
RegisterForClicks | Registers the button widget to receive OnClick script events. · warcraft.wiki.gg ↗(buttons: ClickButton) | implemented |
RegisterForMouse | Registers the button widget to receive OnMouse script events. · warcraft.wiki.gg ↗(buttons: ClickButton) | guessed |
SetButtonState | Sets the button's state: NORMAL, PUSHED or DISABLED. · by wowlua(buttonState: ButtonStateToken, lock: boolean) | implemented |
SetDisabledAtlas | Sets the button's disabled texture from an atlas. · by wowlua(atlas: string) | implemented |
SetDisabledFontObject | Sets the font the button's text uses while disabled. · by wowlua(font: Font) | implemented |
SetDisabledTexture | Sets the texture the button shows while disabled. · by wowlua(asset: TextureAsset) | implemented |
SetEnabled | Enables or disables the button, allowing or preventing user interaction. · warcraft.wiki.gg ↗(enabled: boolean) | implemented |
SetFontString | Sets the font string that shows the button's text. · by wowlua(fontString: FontString) | implemented |
SetFormattedText | Sets the button text with format specifiers. · warcraft.wiki.gg ↗(text: string) | implemented |
SetHighlightAtlas | Sets the button's highlight texture from an atlas. · by wowlua(atlas: string, blendMode: BlendMode?) | implemented |
SetHighlightFontObject | Sets the font the button's text uses while highlighted. · by wowlua(font: Font) | implemented |
SetHighlightTexture | Sets the texture the button shows while the mouse is over it. · by wowlua(asset: TextureAsset, blendMode: BlendMode?) | implemented |
SetMotionScriptsWhileDisabled | Sets whether the button runs OnEnter and OnLeave while disabled. · by wowlua(motionScriptsWhileDisabled: boolean) | implemented |
SetNormalAtlas | Sets the button's normal texture from an atlas. · by wowlua(atlas: string) | implemented |
SetNormalFontObject | Sets the font object used for the button's normal state. · warcraft.wiki.gg ↗(font: Font) | implemented |
SetNormalTexture | Sets the normal texture for a button. · warcraft.wiki.gg ↗(asset: TextureAsset) | implemented |
SetPushedAtlas | Sets the button's pushed texture from an atlas. · by wowlua(atlas: string) | implemented |
SetPushedTextOffset | Sets how far the button's text moves while pushed. · by wowlua(offsetX: number, offsetY: number) | implemented |
SetPushedTexture | Sets the texture the button shows while pushed. · by wowlua(asset: TextureAsset) | implemented |
SetText | Sets the text of the button. · warcraft.wiki.gg ↗(text: string) | implemented |
sources
Methods and inheritance: Blizzard's API documentation (Blizzard_APIDocumentationGenerated) (camelot 1.60.1). Descriptions: warcraft.wiki.gg's API pages, by its contributors, CC BY-SA 4.0 ↗; written by wowlua where no documentation describes the entry.