Skip to content
João Cardoso edited this page Dec 5, 2019 · 6 revisions

IconCheck is a class which inherits from Check and provides checkbuttons with illustrative icons.

Methods

Name Description
SetIcon (icon) Sets the texture file to be displayed by the widget.
GetIcon Returns the current texture file being displayed by the widget.

Example

local check = LibStub('Sushi-3.1').IconCheck()
check:SetIcon('Interface/Addons/MyAddon/NorrisPic.tga')
check:SetLabel('Chuck Norris')
check:SetCall('OnClick', function(check, mouseButton, 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)

Sushi-3.1 🍣

Documentation
Class Reference
Best Practices

Feedback
Post an issue

Clone this wiki locally