-
-
Notifications
You must be signed in to change notification settings - Fork 8
TextureButton
Jaliborc edited this page Jul 16, 2012
·
3 revisions
TextureButton is a button class which inherits from ButtonBase and provides buttons with texture or backdrop backgrounds.
| Name | Description |
|---|---|
| SetTexture (file) | Sets the texture file path (string) or backdrop (table) to be displayed by the widget. |
| GetTexture () | Returns the texture file path or backdrop displayed by the widget. |
This class uses the same structure for backdrop tables as in the standard definition, but with the following extra members:
| Name | Description |
|---|---|
| bgColor | Optional table with 4 values representing the RGBA code for the color and alpha of the background. All values from 0 to 1. |
| edgeColor | Optional table with 4 values representing the RGBA code for the color and alpha of the border. All values from 0 to 1. |
myButton = SushiIconCheck()
myButton:SetIcon('Interface/Addons/MyAddon/NorrisPic.tga')
myButton:SetLabel('Chuck Norris')
myButton:SetCall('OnClick', function(myButton, checked)
if checked then
print("You cannot enable Chuck Norris, Chuck Norris never disables.")
else
print("You cannot disable Chuck Norris, Chuck Norris disables you.")
end
end)
This is the Sushi-3.1 wiki. Wiki Home