Mercurial > wow > askmrrobot
comparison Libs/AceGUI-3.0/widgets/AceGUIWidget-CheckBox.lua @ 124:e31b02b24488
Updated for 8.0 pre-patch and BfA.
author | yellowfive |
---|---|
date | Tue, 17 Jul 2018 09:57:39 -0700 |
parents | 01b63b8ed811 |
children |
comparison
equal
deleted
inserted
replaced
123:7a6364917f86 | 124:e31b02b24488 |
---|---|
1 --[[----------------------------------------------------------------------------- | 1 --[[----------------------------------------------------------------------------- |
2 Checkbox Widget | 2 Checkbox Widget |
3 -------------------------------------------------------------------------------]] | 3 -------------------------------------------------------------------------------]] |
4 local Type, Version = "CheckBox", 22 | 4 local Type, Version = "CheckBox", 23 |
5 local AceGUI = LibStub and LibStub("AceGUI-3.0", true) | 5 local AceGUI = LibStub and LibStub("AceGUI-3.0", true) |
6 if not AceGUI or (AceGUI:GetWidgetVersion(Type) or 0) >= Version then return end | 6 if not AceGUI or (AceGUI:GetWidgetVersion(Type) or 0) >= Version then return end |
7 | 7 |
8 -- Lua APIs | 8 -- Lua APIs |
9 local select, pairs = select, pairs | 9 local select, pairs = select, pairs |
58 local self = frame.obj | 58 local self = frame.obj |
59 if not self.disabled then | 59 if not self.disabled then |
60 self:ToggleChecked() | 60 self:ToggleChecked() |
61 | 61 |
62 if self.checked then | 62 if self.checked then |
63 PlaySound("igMainMenuOptionCheckBoxOn") | 63 PlaySound(856) -- SOUNDKIT.IG_MAINMENU_OPTION_CHECKBOX_ON |
64 else -- for both nil and false (tristate) | 64 else -- for both nil and false (tristate) |
65 PlaySound("igMainMenuOptionCheckBoxOff") | 65 PlaySound(857) -- SOUNDKIT.IG_MAINMENU_OPTION_CHECKBOX_OFF |
66 end | 66 end |
67 | 67 |
68 self:Fire("OnValueChanged", self.checked) | 68 self:Fire("OnValueChanged", self.checked) |
69 AlignImage(self) | 69 AlignImage(self) |
70 end | 70 end |