/trunk/TipTop/libs/AceGUI-3.0/widgets
]] |
do |
local Type = "Window" |
local Version = 5 |
local Version = 6 |
local function frameOnShow(this) |
this.obj:Fire("OnShow") |
end |
local function closeOnClick(this) |
PlaySound("gsTitleOptionExit") |
PlaySound(PlaySoundKitID and "gsTitleOptionExit" or 799) -- SOUNDKIT.GS_TITLE_OPTION_EXIT |
this.obj:Hide() |
end |
Button Widget |
Graphical Button. |
-------------------------------------------------------------------------------]] |
local Type, Version = "Button", 23 |
local Type, Version = "Button", 24 |
local AceGUI = LibStub and LibStub("AceGUI-3.0", true) |
if not AceGUI or (AceGUI:GetWidgetVersion(Type) or 0) >= Version then return end |
-------------------------------------------------------------------------------]] |
local function Button_OnClick(frame, ...) |
AceGUI:ClearFocus() |
PlaySound("igMainMenuOption") |
PlaySound(PlaySoundKitID and "igMainMenuOption" or 852) -- SOUNDKIT.IG_MAINMENU_OPTION |
frame.obj:Fire("OnClick", ...) |
end |
--[[ $Id: AceGUIWidget-DropDown-Items.lua 1153 2016-11-20 09:57:15Z nevcairiel $ ]]-- |
--[[ $Id: AceGUIWidget-DropDown-Items.lua 1161 2017-08-12 14:30:16Z funkydude $ ]]-- |
local AceGUI = LibStub("AceGUI-3.0") |
-- Does not close the pullout on click. |
do |
local widgetType = "Dropdown-Item-Toggle" |
local widgetVersion = 3 |
local widgetVersion = 4 |
local function UpdateToggle(self) |
if self.value then |
if self.disabled then return end |
self.value = not self.value |
if self.value then |
PlaySound("igMainMenuOptionCheckBoxOn") |
PlaySound(PlaySoundKitID and "igMainMenuOptionCheckBoxOn" or 856) -- SOUNDKIT.IG_MAINMENU_OPTION_CHECKBOX_ON |
else |
PlaySound("igMainMenuOptionCheckBoxOff") |
PlaySound(PlaySoundKitID and "igMainMenuOptionCheckBoxOff" or 857) -- SOUNDKIT.IG_MAINMENU_OPTION_CHECKBOX_OFF |
end |
UpdateToggle(self) |
self:Fire("OnValueChanged", self.value) |
Slider Widget |
Graphical Slider, like, for Range values. |
-------------------------------------------------------------------------------]] |
local Type, Version = "Slider", 21 |
local Type, Version = "Slider", 22 |
local AceGUI = LibStub and LibStub("AceGUI-3.0", true) |
if not AceGUI or (AceGUI:GetWidgetVersion(Type) or 0) >= Version then return end |
end |
if value then |
PlaySound("igMainMenuOptionCheckBoxOn") |
PlaySound(PlaySoundKitID and "igMainMenuOptionCheckBoxOn" or 856) -- SOUNDKIT.IG_MAINMENU_OPTION_CHECKBOX_ON |
self.slider:SetValue(value) |
self:Fire("OnMouseUp", value) |
end |
TabGroup Container |
Container that uses tabs on top to switch between groups. |
-------------------------------------------------------------------------------]] |
local Type, Version = "TabGroup", 35 |
local Type, Version = "TabGroup", 36 |
local AceGUI = LibStub and LibStub("AceGUI-3.0", true) |
if not AceGUI or (AceGUI:GetWidgetVersion(Type) or 0) >= Version then return end |
-------------------------------------------------------------------------------]] |
local function Tab_OnClick(frame) |
if not (frame.selected or frame.disabled) then |
PlaySound("igCharacterInfoTab") |
PlaySound(PlaySoundKitID and "igCharacterInfoTab" or 841) -- SOUNDKIT.IG_CHARACTER_INFO_TAB |
frame.obj:SelectTab(frame.value) |
end |
end |
--[[----------------------------------------------------------------------------- |
Checkbox Widget |
-------------------------------------------------------------------------------]] |
local Type, Version = "CheckBox", 22 |
local Type, Version = "CheckBox", 23 |
local AceGUI = LibStub and LibStub("AceGUI-3.0", true) |
if not AceGUI or (AceGUI:GetWidgetVersion(Type) or 0) >= Version then return end |
self:ToggleChecked() |
if self.checked then |
PlaySound("igMainMenuOptionCheckBoxOn") |
PlaySound(PlaySoundKitID and "igMainMenuOptionCheckBoxOn" or 856) -- SOUNDKIT.IG_MAINMENU_OPTION_CHECKBOX_ON |
else -- for both nil and false (tristate) |
PlaySound("igMainMenuOptionCheckBoxOff") |
PlaySound(PlaySoundKitID and "igMainMenuOptionCheckBoxOff" or 857) -- SOUNDKIT.IG_MAINMENU_OPTION_CHECKBOX_OFF |
end |
self:Fire("OnValueChanged", self.checked) |
--[[----------------------------------------------------------------------------- |
Frame Container |
-------------------------------------------------------------------------------]] |
local Type, Version = "Frame", 25 |
local Type, Version = "Frame", 26 |
local AceGUI = LibStub and LibStub("AceGUI-3.0", true) |
if not AceGUI or (AceGUI:GetWidgetVersion(Type) or 0) >= Version then return end |
Scripts |
-------------------------------------------------------------------------------]] |
local function Button_OnClick(frame) |
PlaySound("gsTitleOptionExit") |
PlaySound(PlaySoundKitID and "gsTitleOptionExit" or 799) -- SOUNDKIT.GS_TITLE_OPTION_EXIT |
frame.obj:Hide() |
end |
--[[ $Id: AceGUIWidget-DropDown.lua 1116 2014-10-12 08:15:46Z nevcairiel $ ]]-- |
--[[ $Id: AceGUIWidget-DropDown.lua 1161 2017-08-12 14:30:16Z funkydude $ ]]-- |
local AceGUI = LibStub("AceGUI-3.0") |
-- Lua APIs |
do |
local widgetType = "Dropdown" |
local widgetVersion = 30 |
local widgetVersion = 31 |
--[[ Static data ]]-- |
local function Dropdown_TogglePullout(this) |
local self = this.obj |
PlaySound("igMainMenuOptionCheckBoxOn") -- missleading name, but the Blizzard code uses this sound |
PlaySound(PlaySoundKitID and "igMainMenuOptionCheckBoxOn" or 856) -- SOUNDKIT.IG_MAINMENU_OPTION_CHECKBOX_ON |
if self.open then |
self.open = nil |
self.pullout:Close() |
--[[----------------------------------------------------------------------------- |
EditBox Widget |
-------------------------------------------------------------------------------]] |
local Type, Version = "EditBox", 26 |
local Type, Version = "EditBox", 27 |
local AceGUI = LibStub and LibStub("AceGUI-3.0", true) |
if not AceGUI or (AceGUI:GetWidgetVersion(Type) or 0) >= Version then return end |
local value = frame:GetText() |
local cancel = self:Fire("OnEnterPressed", value) |
if not cancel then |
PlaySound("igMainMenuOptionCheckBoxOn") |
PlaySound(PlaySoundKitID and "igMainMenuOptionCheckBoxOn" or 856) -- SOUNDKIT.IG_MAINMENU_OPTION_CHECKBOX_ON |
HideButton(self) |
end |
end |