/branches/Ace3/Aloft/Libs/AceGUI-3.0
local pairs, assert, type = pairs, assert, type |
-- WoW APIs |
local PlaySound = PlaySound |
local CreateFrame, UIParent = CreateFrame, UIParent |
-- Global vars/functions that we don't upvalue since they might get hooked, or upgraded |
]] |
do |
local Type = "Frame" |
local Version = 9 |
local Version = 11 |
local FrameBackdrop = { |
bgFile="Interface\\DialogFrame\\UI-DialogBox-Background", |
end |
local function closeOnClick(this) |
PlaySound("gsTitleOptionExit") |
this.obj:Hide() |
end |
self.frame:SetParent(UIParent) |
self.frame:SetFrameStrata("FULLSCREEN_DIALOG") |
self:ApplyStatus() |
self:Show() |
end |
local function OnRelease(self) |
--[[ $Id: AceGUIWidget-DropDown.lua 877 2009-11-02 15:56:50Z nevcairiel $ ]]-- |
--[[ $Id: AceGUIWidget-DropDown.lua 916 2010-03-15 12:24:36Z nevcairiel $ ]]-- |
local AceGUI = LibStub("AceGUI-3.0") |
-- Lua APIs |
local tsort = table.sort |
-- WoW APIs |
local PlaySound = PlaySound |
local UIParent, CreateFrame = UIParent, CreateFrame |
local _G = _G |
do |
local widgetType = "Dropdown" |
local widgetVersion = 21 |
local widgetVersion = 22 |
--[[ Static data ]]-- |
local function Dropdown_TogglePullout(this) |
local self = this.obj |
PlaySound("igMainMenuOptionCheckBoxOn") -- missleading name, but the Blizzard code uses this sound |
if self.open then |
self.open = nil |
self.pullout:Close() |
local tostring = tostring |
-- WoW APIs |
local PlaySound = PlaySound |
local GetCursorInfo, ClearCursor, GetSpellName = GetCursorInfo, ClearCursor, GetSpellName |
local CreateFrame, UIParent = CreateFrame, UIParent |
local _G = _G |
-- GLOBALS: AceGUIEditBoxInsertLink, ChatFontNormal, OKAY |
local Type = "EditBox" |
local Version = 13 |
local Version = 14 |
if not AceGUIEditBoxInsertLink then |
-- upgradeable hook |
local value = this:GetText() |
local cancel = self:Fire("OnEnterPressed",value) |
if not cancel then |
PlaySound("igMainMenuOptionCheckBoxOn") |
HideButton(self) |
end |
end |
local pairs, assert, type = pairs, assert, type |
-- WoW APIs |
local PlaySound = PlaySound |
local CreateFrame, UIParent = CreateFrame, UIParent |
-- Global vars/functions that we don't upvalue since they might get hooked, or upgraded |
]] |
do |
local Type = "Window" |
local Version = 2 |
local Version = 4 |
local function frameOnClose(this) |
this.obj:Fire("OnClose") |
end |
local function closeOnClick(this) |
PlaySound("gsTitleOptionExit") |
this.obj:Hide() |
end |
self.frame:SetFrameStrata("FULLSCREEN_DIALOG") |
self:ApplyStatus() |
self:EnableResize(true) |
self:Show() |
end |
local function OnRelease(self) |
-- WoW APIs |
local _G = _G |
local PlaySound = PlaySound |
local CreateFrame, UIParent = CreateFrame, UIParent |
-------------------------- |
-------------------------- |
do |
local Type = "Button" |
local Version = 12 |
local Version = 13 |
local function OnAcquire(self) |
-- restore default values |
end |
local function Button_OnClick(this, ...) |
PlaySound("igMainMenuOption") |
this.obj:Fire("OnClick", ...) |
AceGUI:ClearFocus() |
end |
--[[ $Id: AceGUIWidget-DropDown-Items.lua 877 2009-11-02 15:56:50Z nevcairiel $ ]]-- |
--[[ $Id: AceGUIWidget-DropDown-Items.lua 916 2010-03-15 12:24:36Z nevcairiel $ ]]-- |
local AceGUI = LibStub("AceGUI-3.0") |
local select, assert = select, assert |
-- WoW APIs |
local PlaySound = PlaySound |
local CreateFrame = CreateFrame |
local function fixlevels(parent,...) |
-- Does not close the pullout on click. |
do |
local widgetType = "Dropdown-Item-Toggle" |
local widgetVersion = 2 |
local widgetVersion = 3 |
local function UpdateToggle(self) |
if self.value then |
local self = this.obj |
if self.disabled then return end |
self.value = not self.value |
if self.value then |
PlaySound("igMainMenuOptionCheckBoxOn") |
else |
PlaySound("igMainMenuOptionCheckBoxOff") |
end |
UpdateToggle(self) |
self:Fire("OnValueChanged", self.value) |
end |
-------------------------- |
do |
local Type = "Label" |
local Version = 11 |
local Version = 12 |
local function OnAcquire(self) |
self:SetHeight(18) |
self:SetWidth(200) |
self:SetText("") |
self:SetImage(nil) |
self:SetImageSize(16, 16) |
self:SetColor() |
self:SetFontObject() |
end |
local n = select('#', ...) |
if n == 4 or n == 8 then |
image:SetTexCoord(...) |
else |
image:SetTexCoord(0, 1, 0, 1) |
end |
else |
self.imageshown = nil |
local tonumber = tonumber |
-- WoW APIs |
local PlaySound = PlaySound |
local CreateFrame, UIParent = CreateFrame, UIParent |
-- Global vars/functions that we don't upvalue since they might get hooked, or upgraded |
-------------------------- |
do |
local Type = "Slider" |
local Version = 9 |
local Version = 10 |
local function OnAcquire(self) |
self:SetWidth(200) |
end |
if value then |
PlaySound("igMainMenuOptionCheckBoxOn") |
self:Fire("OnMouseUp",value) |
end |
end |
local pairs, ipairs, assert, type = pairs, ipairs, assert, type |
-- WoW APIs |
local PlaySound = PlaySound |
local CreateFrame, UIParent = CreateFrame, UIParent |
local _G = _G |
do |
local Type = "TabGroup" |
local Version = 24 |
local Version = 25 |
local PaneBackdrop = { |
bgFile = "Interface\\ChatFrame\\ChatFrameBackground", |
local function Tab_OnClick(self) |
if not (self.selected or self.disabled) then |
PlaySound("igCharacterInfoTab") |
self.obj:SelectTab(self.value) |
end |
end |
local select = select |
-- WoW APIs |
local PlaySound = PlaySound |
local CreateFrame, UIParent = CreateFrame, UIParent |
-- Global vars/functions that we don't upvalue since they might get hooked, or upgraded |
]] |
do |
local Type = "CheckBox" |
local Version = 13 |
local Version = 16 |
local function OnAcquire(self) |
self:SetValue(false) |
local self = this.obj |
if not self.disabled then |
self:ToggleChecked() |
if self.checked then |
PlaySound("igMainMenuOptionCheckBoxOn") |
else -- for both nil and false (tristate) |
PlaySound("igMainMenuOptionCheckBoxOff") |
end |
self:Fire("OnValueChanged",self.checked) |
self.text:SetPoint("LEFT",self.check,"RIGHT",0,0) |
end |
self.check:Hide() |
end |
end |
SetDisabled(self, self.disabled) |
end |
local function SetTriState(self, enabled) |
end |
local function OnWidthSet(self, width) |
if self.desc and self.desc:GetText() ~= "" then |
if self.desc and self.desc:GetText() ~= "" and self.desc:GetText() ~= nil then |
self.desc:SetWidth(width - 30) |
self:SetHeight(28 + self.desc:GetHeight()) |
end |
-------------------------- |
do |
local Type = "Icon" |
local Version = 11 |
local Version = 12 |
local function OnAcquire(self) |
self:SetHeight(110) |
if text and text ~= "" then |
self.label:Show() |
self.label:SetText(text) |
self.frame:SetHeight(self.image:GetHeight() + 25) |
self:SetHeight(self.image:GetHeight() + 25) |
else |
self.label:Hide() |
self.frame:SetHeight(self.image:GetHeight() + 10) |
self:SetHeight(self.image:GetHeight() + 10) |
end |
end |
self.image:SetHeight(height) |
--self.frame:SetWidth(width + 30) |
if self.label:IsShown() then |
self.frame:SetHeight(height + 25) |
self:SetHeight(height + 25) |
else |
self.frame:SetHeight(height + 10) |
self:SetHeight(height + 10) |
end |
end |