Mercurial > wow > askmrrobot
comparison Libs/AceGUI-3.0/widgets/AceGUIWidget-DropDown-Items.lua @ 124:e31b02b24488
Updated for 8.0 pre-patch and BfA.
author | yellowfive |
---|---|
date | Tue, 17 Jul 2018 09:57:39 -0700 |
parents | e635cd648e01 |
children |
comparison
equal
deleted
inserted
replaced
123:7a6364917f86 | 124:e31b02b24488 |
---|---|
1 --[[ $Id: AceGUIWidget-DropDown-Items.lua 1153 2016-11-20 09:57:15Z nevcairiel $ ]]-- | 1 --[[ $Id: AceGUIWidget-DropDown-Items.lua 1167 2017-08-29 22:08:48Z funkydude $ ]]-- |
2 | 2 |
3 local AceGUI = LibStub("AceGUI-3.0") | 3 local AceGUI = LibStub("AceGUI-3.0") |
4 | 4 |
5 -- Lua APIs | 5 -- Lua APIs |
6 local select, assert = select, assert | 6 local select, assert = select, assert |
321 -- Item: Toggle | 321 -- Item: Toggle |
322 -- Some sort of checkbox for dropdown menus. | 322 -- Some sort of checkbox for dropdown menus. |
323 -- Does not close the pullout on click. | 323 -- Does not close the pullout on click. |
324 do | 324 do |
325 local widgetType = "Dropdown-Item-Toggle" | 325 local widgetType = "Dropdown-Item-Toggle" |
326 local widgetVersion = 3 | 326 local widgetVersion = 4 |
327 | 327 |
328 local function UpdateToggle(self) | 328 local function UpdateToggle(self) |
329 if self.value then | 329 if self.value then |
330 self.check:Show() | 330 self.check:Show() |
331 else | 331 else |
341 local function Frame_OnClick(this, button) | 341 local function Frame_OnClick(this, button) |
342 local self = this.obj | 342 local self = this.obj |
343 if self.disabled then return end | 343 if self.disabled then return end |
344 self.value = not self.value | 344 self.value = not self.value |
345 if self.value then | 345 if self.value then |
346 PlaySound("igMainMenuOptionCheckBoxOn") | 346 PlaySound(856) -- SOUNDKIT.IG_MAINMENU_OPTION_CHECKBOX_ON |
347 else | 347 else |
348 PlaySound("igMainMenuOptionCheckBoxOff") | 348 PlaySound(857) -- SOUNDKIT.IG_MAINMENU_OPTION_CHECKBOX_OFF |
349 end | 349 end |
350 UpdateToggle(self) | 350 UpdateToggle(self) |
351 self:Fire("OnValueChanged", self.value) | 351 self:Fire("OnValueChanged", self.value) |
352 end | 352 end |
353 | 353 |