/
--[[ $Id: AceConsole-3.0.lua 629 2008-04-22 08:26:12Z ammo $ ]] |
--[[ $Id: AceConsole-3.0.lua 74633 2008-05-21 08:20:50Z nevcairiel $ ]] |
local MAJOR,MINOR = "AceConsole-3.0", 6 |
local AceConsole, oldminor = LibStub:NewLibrary(MAJOR, MINOR) |
--[[ $Id: AceGUI-3.0.lua 681 2008-09-06 13:01:59Z nargiddley $ ]] |
local ACEGUI_MAJOR, ACEGUI_MINOR = "AceGUI-3.0", 16 |
--[[ $Id: AceGUI-3.0.lua 74633 2008-05-21 08:20:50Z nevcairiel $ ]] |
local ACEGUI_MAJOR, ACEGUI_MINOR = "AceGUI-3.0", 13 |
local AceGUI, oldminor = LibStub:NewLibrary(ACEGUI_MAJOR, ACEGUI_MINOR) |
if not AceGUI then return end -- No upgrade needed |
--local con = LibStub("AceConsole-3.0",true) |
local con = LibStub("AceConsole-3.0",true) |
AceGUI.WidgetRegistry = AceGUI.WidgetRegistry or {} |
AceGUI.LayoutRegistry = AceGUI.LayoutRegistry or {} |
if not objPools[type] then |
objPools[type] = {} |
end |
for i,v in ipairs(objPools[type]) do |
if v == obj then |
error("Attempt to Release Widget that is already released") |
return |
end |
end |
tinsert(objPools[type],obj) |
end |
end |
if reg[type] then |
local widget = new(type,reg[type]) |
if rawget(widget,'Acquire') then |
if widget.Acquire then |
widget.OnAcquire = widget.Acquire |
widget.Acquire = nil |
elseif rawget(widget,'Aquire') then |
elseif widget.Aquire then |
widget.OnAcquire = widget.Aquire |
widget.Aquire = nil |
end |
if rawget(widget,'Release') then |
widget.OnRelease = rawget(widget,'Release') |
widget.Release = nil |
end |
if widget.OnAcquire then |
widget:OnAcquire() |
else |
safecall( widget.PauseLayout, widget ) |
widget:Fire("OnRelease") |
safecall( widget.ReleaseChildren, widget ) |
if widget.OnRelease then |
widget:OnRelease() |
else |
error(("Widget type %s doesn't supply an OnRelease Function"):format(type)) |
end |
for k in pairs(widget.userdata) do |
widget.userdata[k] = nil |
end |
for k in pairs(widget.events) do |
widget.events[k] = nil |
end |
widget.width = nil |
widget.width = nil |
if widget.Release then |
widget.OnRelease = widget.Release |
widget.Release = nil |
end |
if widget.OnRelease then |
widget:OnRelease() |
else |
error(("Widget type %s doesn't supply an OnRelease Function"):format(type)) |
end |
--widget.frame:SetParent(nil) |
widget.frame:ClearAllPoints() |
widget.frame:Hide() |
return self.frame:IsShown() |
end |
WidgetBase.Release = function(self) |
AceGUI:Release(self) |
end |
WidgetBase.SetPoint = function(self, ...) |
return self.frame:SetPoint(...) |
end |
WidgetBase.ClearAllPoints = function(self) |
return self.frame:ClearAllPoints() |
end |
WidgetBase.GetNumPoints = function(self) |
return self.frame:GetNumPoints() |
end |
WidgetBase.GetPoint = function(self, ...) |
return self.frame:GetPoint(...) |
end |
WidgetBase.GetUserDataTable = function(self) |
return self.userdata |
end |
WidgetBase.SetUserData = function(self, key, value) |
self.userdata[key] = value |
end |
WidgetBase.GetUserData = function(self, key) |
return self.userdata[key] |
end |
WidgetBase.IsFullHeight = function(self) |
return self.height == "fill" |
end |
WidgetBase.SetFullHeight = function(self, isFull) |
if isFull then |
self.height = "fill" |
else |
self.height = nil |
end |
end |
WidgetBase.IsFullWidth = function(self) |
return self.width == "fill" |
end |
WidgetBase.SetFullWidth = function(self, isFull) |
if isFull then |
self.width = "fill" |
else |
self.width = nil |
end |
end |
-- local function LayoutOnUpdate(this) |
-- this:SetScript("OnUpdate",nil) |
-- this.obj:PerformLayout() |
--[[ $Id: AceGUIWidget-DropDown-Items.lua 656 2008-05-31 11:47:08Z nargiddley $ ]]-- |
--[[ $Id: AceGUIWidget-DropDown-Items.lua 76326 2008-06-09 09:29:17Z nevcairiel $ ]]-- |
local AceGUI = LibStub("AceGUI-3.0") |
do |
local Type = "TreeGroup" |
local Version = 16 |
local Version = 13 |
local DEFAULT_TREE_WIDTH = 175 |
local DEFAULT_TREE_SIZABLE = true |
local buttoncount = 1 |
local function CreateButton(self) |
local button = CreateFrame("Button",("AceGUI30TreeButton%d"):format(buttoncount),self.treeframe, "OptionsListButtonTemplate") |
local button = CreateFrame("Button",("AceGUI30TreeButton%d"):format(buttoncount),self.treeframe, "InterfaceOptionsButtonTemplate") |
buttoncount = buttoncount + 1 |
button.obj = self |
local line = button.line |
button.level = level |
if ( level == 1 ) then |
button:SetNormalFontObject("GameFontNormal") |
button:SetTextFontObject("GameFontNormal") |
button:SetHighlightFontObject("GameFontHighlight") |
button.text:SetPoint("LEFT", 8, 2) |
else |
button:SetNormalFontObject("GameFontHighlightSmall") |
button:SetTextFontObject("GameFontHighlightSmall") |
button:SetHighlightFontObject("GameFontHighlightSmall") |
button.text:SetPoint("LEFT", 8 * level, 2) |
end |
} |
]] |
local function SetTree(self, tree) |
if tree then |
assert(type(tree) == "table") |
end |
assert(type(tree) == "table") |
self.tree = tree |
self:RefreshTree() |
end |
end |
local function RefreshTree(self) |
if not self.tree then return end |
--Build the list of visible entries from the tree and status tables |
local status = self.status or self.localstatus |
local groupstatus = status.groups |
local tree = self.tree |
local lines = self.lines |
local buttons = self.buttons |
local lines = self.lines |
local treeframe = self.treeframe |
for i, v in ipairs(buttons) do |
v:Hide() |
end |
while lines[1] do |
local t = tremove(lines) |
for k in pairs(t) do |
t[k] = nil |
end |
del(t) |
end |
end |
if not self.tree then return end |
--Build the list of visible entries from the tree and status tables |
local status = self.status or self.localstatus |
local groupstatus = status.groups |
local tree = self.tree |
local treeframe = self.treeframe |
self:BuildLevel(tree, 1) |
for i, v in ipairs(buttons) do |
v:Hide() |
end |
local numlines = #lines |
local maxlines = (math.floor(((self.treeframe:GetHeight()or 0) - 20 ) / 18)) |
end |
local function OnWidthSet(self, width) |
local content = self.content |
local treeframe = self.treeframe |
local status = self.status or self.localstatus |
local contentwidth = width - status.treewidth - 20 |
if contentwidth < 0 then |
contentwidth = 0 |
end |
end |
local function SetTreeWidth(self, treewidth, resizable) |
if not resizable then |
if type(treewidth) == 'number' then |
resizable = false |
elseif type(treewidth) == 'boolean' then |
resizable = treewidth |
treewidth = DEFAULT_TREE_WIDTH |
else |
resizable = false |
treewidth = DEFAULT_TREE_WIDTH |
end |
end |
self.treeframe:SetWidth(treewidth) |
local function SetTreeWidth(self, treewidth, resizable) |
if not resizable then |
if type(treewidth) == 'number' then |
resizable = false |
elseif type(treewidth) == 'boolean' then |
resizable = treewidth |
treewidth = DEFAULT_TREE_WIDTH |
else |
resizable = false |
treewidth = DEFAULT_TREE_WIDTH |
end |
end |
self.treeframe:SetWidth(treewidth) |
self.dragger:EnableMouse(resizable) |
local status = self.status or self.localstatus |
status.treewidth = treewidth |
status.treesizable = resizable |
end |
status.treewidth = treewidth |
status.treesizable = resizable |
end |
local function draggerLeave(this) |
this:SetBackdropColor(1, 1, 1, 0) |
end |
treeframe:SetHeight(0) |
treeframe:SetPoint("TOPLEFT",frame,"TOPLEFT",0,0) |
treeframe:SetPoint("BOTTOMLEFT",frame,"BOTTOMLEFT",0,0) |
treeframe.obj:Fire("OnTreeResize",treeframe:GetWidth()) |
local status = self.status or self.localstatus |
status.treewidth = treeframe:GetWidth() |
treeframe.obj:Fire("OnTreeResize",treeframe:GetWidth()) |
local status = self.status or self.localstatus |
status.treewidth = treeframe:GetWidth() |
end |
local createdcount = 0 |
treeframe:SetBackdropColor(0.1,0.1,0.1,0.5) |
treeframe:SetBackdropBorderColor(0.4,0.4,0.4) |
treeframe:SetResizable(true) |
treeframe:SetResizable(true) |
treeframe:SetMinResize(100, 1) |
treeframe:SetMaxResize(400,1600) |
local dragger = CreateFrame("Frame", nil, treeframe) |
dragger:SetScript("OnEnter", draggerEnter) |
dragger:SetScript("OnLeave", draggerLeave) |
self.dragger = dragger |
self.dragger = dragger |
self.treeframe = treeframe |
self.OnRelease = OnRelease |
self.OnAcquire = OnAcquire |
self.SetTree = SetTree |
self.SetTreeWidth = SetTreeWidth |
self.SetTreeWidth = SetTreeWidth |
self.RefreshTree = RefreshTree |
self.SetStatusTable = SetStatusTable |
self.BuildLevel = BuildLevel |
local AceGUI = LibStub("AceGUI-3.0") |
local Version = 7 |
local Version = 6 |
--------------------- |
-- Common Elements -- |
--------------------- |
self.disabled = disabled |
if disabled then |
self.editbox:EnableMouse(false) |
self.scrollframe:EnableMouse(false) |
self.editbox:ClearFocus() |
self.editbox:SetTextColor(0.5, 0.5, 0.5) |
self.label:SetTextColor(0.5,0.5,0.5) |
else |
self.editbox:EnableMouse(true) |
self.scrollframe:EnableMouse(true) |
self.editbox:SetTextColor(1, 1, 1) |
self.label:SetTextColor(1,.82,0) |
end |
end |
scrollframe:SetPoint("TOPLEFT", 5, -6) |
scrollframe:SetPoint("BOTTOMRIGHT", -28, 6) |
scrollframe.obj = self |
self.scrollframe = scrollframe |
local scrollchild = CreateFrame("Frame", nil, scrollframe) |
scrollframe:SetScrollChild(scrollchild) |
scrollchild:SetHeight(2) |
scrollchild:SetWidth(2) |
local label = frame:CreateFontString(nil,"OVERLAY","GameFontNormalSmall") |
label:SetPoint("TOPLEFT",frame,"TOPLEFT",0,-2) |
label:SetPoint("TOPRIGHT",frame,"TOPRIGHT",0,-2) |
local label = frame:CreateFontString(nil,"OVERLAY","GameFontHighlight") |
label:SetPoint("TOPLEFT",frame,"TOPLEFT",14,0) |
label:SetPoint("TOPRIGHT",frame,"TOPRIGHT",-14,0) |
label:SetJustifyH("LEFT") |
label:SetHeight(18) |
self.label = label |
do |
local Type = "TabGroup" |
local Version = 15 |
local Version = 14 |
local PaneBackdrop = { |
bgFile = "Interface\\ChatFrame\\ChatFrameBackground", |
local function Tab_SetText(self, text) |
self:_SetText(text) |
PanelTemplates_TabResize(self, 0) |
PanelTemplates_TabResize(0, self) |
end |
local function UpdateTabLook(self) |
--equal padding for each tab to fill the available width |
local padding = (width - rowwidths[row]) / (endtab - starttab+1) |
for i = starttab, endtab do |
PanelTemplates_TabResize(tabs[i], padding) |
end |
PanelTemplates_TabResize(padding, tabs[i]) |
end |
starttab = endtab + 1 |
end |
-------------------------- |
-- Keybinding -- |
-------------------------- |
do |
local Type = "Keybinding" |
local Version = 11 |
local Version = 8 |
local ControlBackdrop = { |
bgFile = "Interface\\Tooltips\\UI-Tooltip-Background", |
end |
end |
this:EnableKeyboard(false) |
self.msgframe:Hide() |
this:UnlockHighlight() |
self.waitingForKey = nil |
if not self.disabled then |
self:SetKey(keyPressed) |
self:Fire("OnKeyChanged",keyPressed) |
end |
this:EnableKeyboard(false) |
self.msgframe:Hide() |
this:UnlockHighlight() |
self.waitingForKey = nil |
end |
end |
end |
local function OnAcquire(self) |
self:SetLabel("") |
self:SetKey("") |
end |
local function OnRelease(self) |
end |
local function SetKey(self, key) |
if (key or "") == "" then |
self.button:SetText(NOT_BOUND) |
self.button:SetNormalFontObject("GameFontNormal") |
else |
self.button:SetText(key) |
self.button:SetNormalFontObject("GameFontHighlight") |
end |
self.button:SetText(key or "") |
end |
local function SetLabel(self, label) |
self.label:SetText(label or "") |
if (label or "") == "" then |
self.alignoffset = nil |
self:SetHeight(24) |
else |
self.alignoffset = 30 |
self:SetHeight(44) |
end |
end |
local function Constructor() |
local num = AceGUI:GetNextWidgetNum(Type) |
local frame = CreateFrame("Frame",nil,UIParent) |
--[[ $Id: AceGUIWidget-DropDown.lua 679 2008-09-06 12:51:18Z nargiddley $ ]]-- |
--[[ $Id: AceGUIWidget-DropDown.lua 76326 2008-06-09 09:29:17Z nevcairiel $ ]]-- |
local min, max, floor = math.min, math.max, math.floor |
local AceGUI = LibStub("AceGUI-3.0") |
do |
local widgetType = "Dropdown" |
local widgetVersion = 18 |
local widgetVersion = 17 |
--[[ Static data ]]-- |
end |
local function Dropdown_OnHide(this) |
local self = this.obj |
if self.open then |
self.pullout:Close() |
end |
this.obj.pullout:Close() |
end |
local function Dropdown_TogglePullout(this) |
self:Fire("OnValueChanged", this.userdata.value) |
else |
this:SetValue(true) |
end |
if self.open then |
self.pullout:Close() |
end |
end |
self.pullout:Close() |
end |
end |
-- exported, AceGUI callback |
local function OnRelease(self) |
if self.open then |
self.pullout:Close() |
end |
self.pullout:Close() |
AceGUI:Release(self.pullout) |
self:SetText("") |
-- exported |
local function ClearFocus(self) |
if self.open then |
self.pullout:Close() |
end |
self.pullout:Close() |
end |
-- exported |
self.list = list |
self.pullout:Clear() |
self.hasClose = nil |
if not list then return end |
for v in pairs(list) do |
sortlist[#sortlist + 1] = v |
--[[ $Id: AceAddon-3.0.lua 654 2008-05-21 13:43:29Z ammo $ ]] |
--[[ $Id: AceAddon-3.0.lua 76326 2008-06-09 09:29:17Z nevcairiel $ ]] |
local MAJOR, MINOR = "AceAddon-3.0", 5 |
local AceAddon, oldminor = LibStub:NewLibrary(MAJOR, MINOR) |
--[[ $Id: AceConfig-3.0.lua 494 2008-02-03 13:03:56Z nevcairiel $ ]] |
--[[ $Id: AceConfig-3.0.lua 60131 2008-02-03 13:03:56Z nevcairiel $ ]] |
--[[ |
AceConfig-3.0 |
]] |
local LibStub = LibStub |
local MAJOR, MINOR = "AceConfigDialog-3.0", 25 |
local MAJOR, MINOR = "AceConfigDialog-3.0", 22 |
local lib = LibStub:NewLibrary(MAJOR, MINOR) |
if not lib then return end |
lib.Status = lib.Status or {} |
lib.frame = lib.frame or CreateFrame("Frame") |
lib.frame.apps = lib.frame.apps or {} |
lib.frame.closing = lib.frame.closing or {} |
local gui = LibStub("AceGUI-3.0") |
local reg = LibStub("AceConfigRegistry-3.0") |
end |
local function CleanUserData(widget, event) |
local user = widget:GetUserDataTable() |
local user = widget.userdata |
if user.path then |
del(user.path) |
end |
if widget.type == "TreeGroup" then |
local tree = user.tree |
widget:SetTree(nil) |
local tree = widget.tree |
if tree then |
for i = 1, #tree do |
DelTree(tree[i]) |
del(tree[i]) |
end |
del(tree) |
widget.tree = nil |
end |
end |
if widget.type == "TabGroup" then |
widget:SetTabs(nil) |
if user.tablist then |
del(user.tablist) |
end |
del(widget.tablist) |
widget.tablist = nil |
end |
if widget.type == "DropdownGroup" then |
widget:SetGroupList(nil) |
if user.grouplist then |
del(user.grouplist) |
if widget.dropdown.list then |
del(widget.dropdown.list) |
widget.dropdown.list = nil |
end |
end |
end |
local function OptionOnMouseOver(widget, event) |
--show a tooltip/set the status bar to the desc text |
local user = widget:GetUserDataTable() |
local user = widget.userdata |
local opt = user.option |
local options = user.options |
local path = user.path |
local function ActivateControl(widget, event, ...) |
--This function will call the set / execute handler for the widget |
--widget:GetUserDataTable() contains the needed info |
local user = widget:GetUserDataTable() |
--widget.userdata contains the needed info |
local user = widget.userdata |
local option = user.option |
local options = user.options |
local path = user.path |
--call confirm func/method |
if type(confirm) == "string" then |
if handler and handler[confirm] then |
success, confirm = safecall(handler[confirm], handler, info, ...) |
success, confirm = safecall(handler[confirm],handler, info) |
if success and type(confirm) == "string" then |
confirmText = confirm |
confirm = true |
error(string.format("Method %s doesn't exist in handler for type confirm", confirm)) |
end |
elseif type(confirm) == "function" then |
success, confirm = safecall(confirm, info, ...) |
success, confirm = safecall(confirm,info) |
if success and type(confirm) == "string" then |
confirmText = confirm |
confirm = true |
end |
end |
local iscustom = user.rootframe:GetUserData('iscustom') |
local iscustom = user.rootframe.userdata.iscustom |
local rootframe |
if iscustom then |
rootframe = user.rootframe |
end |
local basepath = user.rootframe:GetUserData('basepath') |
local basepath = user.rootframe.userdata.basepath |
if type(func) == "string" then |
if handler and handler[func] then |
confirmPopup(user.appName, rootframe, basepath, info, confirmText, handler[func], handler, info, ...) |
local iscustom = user.rootframe:GetUserData('iscustom') |
local basepath = user.rootframe:GetUserData('basepath') |
local iscustom = user.rootframe.userdata.iscustom |
local basepath = user.rootframe.userdata.basepath |
--full refresh of the frame, some controls dont cause this on all events |
if option.type == "color" then |
if event == "OnValueConfirmed" then |
end |
local function ActivateSlider(widget, event, value) |
local option = widget:GetUserData('option') |
local option = widget.userdata.option |
local min, max, step = option.min or 0, option.max or 100, option.step |
if step then |
value = math.floor((value - min) / step + 0.5) * step + min |
--called from a checkbox that is part of an internally created multiselect group |
--this type is safe to refresh on activation of one control |
local function ActivateMultiControl(widget, event, ...) |
ActivateControl(widget, event, widget:GetUserData('value'), ...) |
local user = widget:GetUserDataTable() |
local iscustom = user.rootframe:GetUserData('iscustom') |
local basepath = user.rootframe:GetUserData('basepath') |
ActivateControl(widget, event, widget.userdata.value, ...) |
local user = widget.userdata |
local iscustom = user.rootframe.userdata.iscustom |
local basepath = user.rootframe.userdata.basepath |
if iscustom then |
lib:Open(user.appName, user.rootframe, basepath and unpack(basepath)) |
else |
end |
local function MultiControlOnClosed(widget, event, ...) |
local user = widget:GetUserDataTable() |
local user = widget.userdata |
if user.valuechanged then |
local iscustom = user.rootframe:GetUserData('iscustom') |
local basepath = user.rootframe:GetUserData('basepath') |
local iscustom = user.rootframe.userdata.iscustom |
local basepath = user.rootframe.userdata.basepath |
if iscustom then |
lib:Open(user.appName, user.rootframe, basepath and unpack(basepath)) |
else |
end |
local function FrameOnClose(widget, event) |
local appName = widget:GetUserData('appName') |
local appName = widget.userdata.appName |
lib.OpenFrames[appName] = nil |
gui:Release(widget) |
end |
end |
local function InjectInfo(control, options, option, path, rootframe, appName) |
local user = control:GetUserDataTable() |
local user = control.userdata |
for i = 1, #path do |
user[i] = path[i] |
end |
local text = values[value] |
local check = gui:Create("CheckBox") |
check:SetLabel(text) |
check:SetUserData('value', value) |
check:SetUserData('text', text) |
check.userdata.value = value |
check.userdata.text = text |
check:SetDisabled(disabled) |
check:SetTriState(v.tristate) |
check:SetValue(GetOptionsMemberValue("get",v, options, path, appName, value)) |
local function TreeOnButtonEnter(widget, event, uniquevalue, button) |
local user = widget:GetUserDataTable() |
local user = widget.userdata |
if not user then return end |
local options = user.options |
local option = user.option |
local function GroupSelected(widget, event, uniquevalue) |
local user = widget:GetUserDataTable() |
local user = widget.userdata |
local options = user.options |
local option = user.option |
for i = 1, #feedpath do |
group = GetSubOption(group, feedpath[i]) |
end |
widget:ReleaseChildren() |
lib:FeedGroup(user.appName,options,widget,rootframe,feedpath) |
local tabs = BuildGroups(group, options, path, appName) |
tab:SetTabs(tabs) |
tab:SetUserData("tablist", tabs) |
for i = 1, #tabs do |
local entry = tabs[i] |
select:SetStatusTable(status.groups) |
local grouplist = BuildSelect(group, options, path, appName) |
select:SetGroupList(grouplist) |
select:SetUserData("grouplist", grouplist) |
local firstgroup |
for k, v in pairs(grouplist) do |
if not firstgroup or k < firstgroup then |
tree:SetStatusTable(status.groups) |
tree:SetTree(treedefinition) |
tree:SetUserData("tree",treedefinition) |
for i = 1, #treedefinition do |
local entry = treedefinition[i] |
local old_CloseSpecialWindows |
function lib:CloseAll() |
local closed |
for k, v in pairs(self.OpenFrames) do |
v:Hide() |
closed = true |
end |
return closed |
end |
local function RefreshOnUpdate(this) |
for appName in pairs(this.closing) do |
if lib.OpenFrames[appName] then |
lib.OpenFrames[appName]:Hide() |
end |
this.closing[appName] = nil |
function lib:Close(appName) |
if self.OpenFrames[appName] then |
self.OpenFrames[appName]:Hide() |
return true |
end |
if this.closeAll then |
for k, v in pairs(lib.OpenFrames) do |
v:Hide() |
end |
this.closeAll = nil |
end |
end |
local function RefreshOnUpdate(this) |
for appName in pairs(this.apps) do |
if lib.OpenFrames[appName] then |
local user = lib.OpenFrames[appName]:GetUserDataTable() |
local user = lib.OpenFrames[appName].userdata |
lib:Open(appName, user.basepath and unpack(user.basepath)) |
end |
if lib.BlizOptions and lib.BlizOptions[appName] then |
local widget = lib.BlizOptions[appName] |
local user = widget:GetUserDataTable() |
if widget:IsVisible() then |
lib:Open(widget:GetUserData('appName'), widget, user.basepath and unpack(user.basepath)) |
local user = widget.userdata |
if widget.frame:IsVisible() then |
lib:Open(widget.userdata.appName, widget, user.basepath and unpack(user.basepath)) |
end |
end |
this.apps[appName] = nil |
this:SetScript("OnUpdate", nil) |
end |
function lib:CloseAll() |
lib.frame.closeAll = true |
lib.frame:SetScript("OnUpdate", RefreshOnUpdate) |
if next(self.OpenFrames) then |
return true |
end |
end |
function lib:Close(appName) |
if self.OpenFrames[appName] then |
lib.frame.closing[appName] = true |
lib.frame:SetScript("OnUpdate", RefreshOnUpdate) |
return true |
end |
end |
function lib:ConfigTableChanged(event, appName) |
if not lib.frame.apps then |
lib.frame.apps = {} |
end |
lib.frame.apps[appName] = true |
lib.frame:SetScript("OnUpdate", RefreshOnUpdate) |
end |
if container then |
f = container |
f:ReleaseChildren() |
f:SetUserData('appName', appName) |
f:SetUserData('iscustom', true) |
f.userdata.appName = appName |
f.userdata.iscustom = true |
if #path > 0 then |
f:SetUserData('basepath', copy(path)) |
f.userdata.basepath = copy(path) |
end |
local status = lib:GetStatusTable(appName) |
if not status.width then |
end |
f:ReleaseChildren() |
f:SetCallback("OnClose", FrameOnClose) |
f:SetUserData('appName', appName) |
f.userdata.appName = appName |
if #path > 0 then |
f:SetUserData('basepath', copy(path)) |
f.userdata.basepath = copy(path) |
end |
f:SetTitle(name or "") |
local status = lib:GetStatusTable(appName) |
lib.BlizOptions = lib.BlizOptions or {} |
local function FeedToBlizPanel(widget, event) |
local path = widget:GetUserData('path') |
lib:Open(widget:GetUserData('appName'), widget, path and unpack(path)) |
local path = widget.userdata.path |
lib:Open(widget.userdata.appName, widget, path and unpack(path)) |
end |
local function ClearBlizPanel(widget, event) |
group:SetName(name or appName, parent) |
group:SetTitle(name or appName) |
group:SetUserData('appName', appName) |
group.userdata.appName = appName |
if select('#', ...) > 0 then |
local path = {} |
for n = 1, select('#',...) do |
tinsert(path, (select(n, ...))) |
end |
group:SetUserData('path', path) |
group.userdata.path = path |
end |
group:SetCallback("OnShow", FeedToBlizPanel) |
group:SetCallback("OnHide", ClearBlizPanel) |
--[[ $Id: AceDB-3.0.lua 667 2008-06-11 14:34:58Z nevcairiel $ ]] |
local ACEDB_MAJOR, ACEDB_MINOR = "AceDB-3.0", 8 |
--[[ $Id: AceDB-3.0.lua 69511 2008-04-13 10:10:53Z nevcairiel $ ]] |
local ACEDB_MAJOR, ACEDB_MINOR = "AceDB-3.0", 7 |
local AceDB, oldminor = LibStub:NewLibrary(ACEDB_MAJOR, ACEDB_MINOR) |
if not AceDB then return end -- No upgrade needed |
for key, value in pairs(db) do |
if type(value) == "table" then |
-- if the key was not explicitly specified in the defaults table, just strip everything from * and ** tables |
if defaults[key] == nil and (not blocker or blocker[key] == nil) then |
if defaults[key] == nil then |
removeDefaults(value, v) |
-- if the table is empty afterwards, remove it |
if not next(value) then |
<Ui xmlns="http://www.blizzard.com/wow/ui/" xmlns:xsi="http://www.w3.org/2001/XMLSchema-instance" xsi:schemaLocation="http://www.blizzard.com/wow/ui/ |
..\FrameXML\UI.xsd"> |
<Script file="SharedFunctions.lua" /> |
<Script file="FontWidget.lua" /> |
<Script file="SoundWidget.lua" /> |
<Script file="StatusbarWidget.lua" /> |
<Script file="BorderWidget.lua" /> |
<Script file="BackgroundWidget.lua" /> |
<Include file="AceGUI-3.0-SharedMediaWidgets\widget.xml" /> |
</Ui> |
<Ui xmlns="http://www.blizzard.com/wow/ui/" xmlns:xsi="http://www.w3.org/2001/XMLSchema-instance" xsi:schemaLocation="http://www.blizzard.com/wow/ui/ |
..\FrameXML\UI.xsd"> |
<Script file="AceGUI-3.0-SharedMediaWidgets.lua" /> |
</Ui> |
-- Widget is based on the AceGUIWidget-DropDown.lua supplied with AceGUI-3.0 |
-- Widget created by Yssaril |
local AceGUI = LibStub("AceGUI-3.0") |
local Media = LibStub("LibSharedMedia-3.0") |
do |
local lists = {} |
lists.font = {} |
lists.sound = {} |
lists.statusbar = {} |
lists.border = {} |
lists.background = {} |
for k, v in pairs(Media:List("font")) do |
lists.font[v] = v |
end |
for k, v in pairs(Media:List("sound")) do |
lists.sound[v] = v |
end |
for k, v in pairs(Media:List("statusbar")) do |
lists.statusbar[v] = v |
end |
for k, v in pairs(Media:List("border")) do |
lists.border[v] = v |
end |
for k, v in pairs(Media:List("background")) do |
lists.background[v] = v |
end |
Media:RegisterCallback("LibSharedMedia_Registered", function(event, mediatype, key) |
if lists[mediatype] then |
lists[mediatype][key] = key |
end |
end) |
local min, max, floor = math.min, math.max, math.floor |
local function fixlevels(parent,...) |
local i = 1 |
local child = select(i, ...) |
while child do |
child:SetFrameLevel(parent:GetFrameLevel()+1) |
fixlevels(child, child:GetChildren()) |
i = i + 1 |
child = select(i, ...) |
end |
end |
local function OnItemValueChanged(this, event, checked) |
local self = this.userdata.obj |
if self.multiselect then |
self:Fire("OnValueChanged", this.userdata.value, checked) |
else |
if checked then |
self:SetValue(this.userdata.value) |
self:Fire("OnValueChanged", this.userdata.value) |
else |
this:SetValue(true) |
end |
self.pullout:Close() |
end |
end |
do |
local widgetType = "LSM30_Font_Item_Select" |
local widgetVersion = 1 |
local function SetText(self, text) |
if text and text ~= '' then |
local _, size, outline= self.text:GetFont() |
self.text:SetFont(Media:Fetch('font',text),size,outline) |
end |
self.text:SetText(text or "") |
end |
local function Constructor() |
local self = AceGUI:Create("Dropdown-Item-Toggle") |
self.type = widgetType |
self.SetText = SetText |
return self |
end |
AceGUI:RegisterWidgetType(widgetType, Constructor, widgetVersion) |
end |
do |
local widgetType = "LSM30_Statusbar_Item_Select" |
local widgetVersion = 1 |
local function SetText(self, text) |
if text and text ~= '' then |
self.texture:SetTexture(Media:Fetch('statusbar',text)) |
self.texture:SetVertexColor(.5,.5,.5) |
end |
self.text:SetText(text or "") |
end |
local function Constructor() |
local self = AceGUI:Create("Dropdown-Item-Toggle") |
self.type = widgetType |
self.SetText = SetText |
local texture = self.frame:CreateTexture(nil, "BACKGROUND") |
texture:SetTexture(0,0,0,0) |
texture:SetPoint("BOTTOMRIGHT",self.frame,"BOTTOMRIGHT",-4,1) |
texture:SetPoint("TOPLEFT",self.frame,"TOPLEFT",6,-1) |
self.texture = texture |
return self |
end |
AceGUI:RegisterWidgetType(widgetType, Constructor, widgetVersion) |
end |
do |
local widgetType = "LSM30_Background_Item_Select" |
local widgetVersion = 1 |
local function Frame_OnEnter(this) |
local self = this.obj |
if self.useHighlight then |
self.highlight:Show() |
self.texture:Show() |
end |
self:Fire("OnEnter") |
if self.specialOnEnter then |
self.specialOnEnter(self) |
end |
end |
local function Frame_OnLeave(this) |
local self = this.obj |
self.texture:Hide() |
self.highlight:Hide() |
self:Fire("OnLeave") |
if self.specialOnLeave then |
self.specialOnLeave(self) |
end |
end |
local function SetText(self, text) |
if text and text ~= '' then |
self.texture:SetTexture(Media:Fetch('background',text)) |
end |
self.text:SetText(text or "") |
end |
local function Constructor() |
local self = AceGUI:Create("Dropdown-Item-Toggle") |
self.type = widgetType |
self.SetText = SetText |
local textureframe = CreateFrame('Frame') |
textureframe:SetFrameStrata("TOOLTIP") |
textureframe:SetWidth(128) |
textureframe:SetHeight(128) |
textureframe:SetPoint("LEFT",self.frame,"RIGHT",5,0) |
self.textureframe = textureframe |
local texture = textureframe:CreateTexture(nil, "OVERLAY") |
texture:SetTexture(0,0,0,0) |
texture:SetAllPoints(textureframe) |
texture:Hide() |
self.texture = texture |
self.frame:SetScript("OnEnter", Frame_OnEnter) |
self.frame:SetScript("OnLeave", Frame_OnLeave) |
return self |
end |
AceGUI:RegisterWidgetType(widgetType, Constructor, widgetVersion) |
end |
do |
local widgetType = "LSM30_Sound_Item_Select" |
local widgetVersion = 1 |
local function Frame_OnEnter(this) |
local self = this.obj |
if self.useHighlight then |
self.highlight:Show() |
end |
self:Fire("OnEnter") |
if self.specialOnEnter then |
self.specialOnEnter(self) |
end |
end |
local function Frame_OnLeave(this) |
local self = this.obj |
self.highlight:Hide() |
self:Fire("OnLeave") |
if self.specialOnLeave then |
self.specialOnLeave(self) |
end |
end |
local function OnAcquire(self) |
self.frame:SetToplevel(true) |
self.frame:SetFrameStrata("FULLSCREEN_DIALOG") |
end |
local function OnRelease(self) |
self.pullout = nil |
self.frame:SetParent(nil) |
self.frame:ClearAllPoints() |
self.frame:Hide() |
end |
local function SetPullout(self, pullout) |
self.pullout = pullout |
self.frame:SetParent(nil) |
self.frame:SetParent(pullout.itemFrame) |
self.parent = pullout.itemFrame |
fixlevels(pullout.itemFrame, pullout.itemFrame:GetChildren()) |
end |
local function SetText(self, text) |
self.sound = text or '' |
self.text:SetText(text or "") |
end |
local function GetText(self) |
return self.text:GetText() |
end |
local function SetPoint(self, ...) |
self.frame:SetPoint(...) |
end |
local function Show(self) |
self.frame:Show() |
end |
local function Hide(self) |
self.frame:Hide() |
end |
local function SetDisabled(self, disabled) |
self.disabled = disabled |
if disabled then |
self.useHighlight = false |
self.text:SetTextColor(.5, .5, .5) |
else |
self.useHighlight = true |
self.text:SetTextColor(1, 1, 1) |
end |
end |
local function SetOnLeave(self, func) |
self.specialOnLeave = func |
end |
local function SetOnEnter(self, func) |
self.specialOnEnter = func |
end |
local function UpdateToggle(self) |
if self.value then |
self.check:Show() |
else |
self.check:Hide() |
end |
end |
local function Frame_OnClick(this, button) |
local self = this.obj |
self.value = not self.value |
UpdateToggle(self) |
self:Fire("OnValueChanged", self.value) |
end |
local function Speaker_OnClick(this, button) |
local self = this.obj |
PlaySoundFile(Media:Fetch('sound',self.sound)) |
end |
local function SetValue(self, value) |
self.value = value |
UpdateToggle(self) |
end |
local function Constructor() |
local count = AceGUI:GetNextWidgetNum(type) |
local frame = CreateFrame("Frame", "LSM30_Sound_DropDownItem"..count) |
local self = {} |
self.frame = frame |
frame.obj = self |
self.type = type |
self.useHighlight = true |
frame:SetHeight(17) |
frame:SetFrameStrata("FULLSCREEN_DIALOG") |
local button = CreateFrame("Button", nil, frame) |
button:SetPoint("BOTTOMRIGHT",frame,"BOTTOMRIGHT",-22,0) |
button:SetPoint("TOPLEFT",frame,"TOPLEFT",0,0) |
self.button = button |
button.obj = self |
local speakerbutton = CreateFrame("Button", nil, frame) |
speakerbutton:SetWidth(16) |
speakerbutton:SetHeight(16) |
speakerbutton:SetPoint("RIGHT",frame,"RIGHT",-6,0) |
self.speakerbutton = speakerbutton |
speakerbutton.obj = self |
local speaker = frame:CreateTexture(nil, "BACKGROUND") |
speaker:SetTexture("Interface\\Common\\VoiceChat-Speaker") |
speaker:SetAllPoints(speakerbutton) |
self.speaker = speaker |
local speakeron = speakerbutton:CreateTexture(nil, "HIGHLIGHT") |
speakeron:SetTexture("Interface\\Common\\VoiceChat-On") |
speakeron:SetAllPoints(speakerbutton) |
self.speakeron = speakeron |
local text = frame:CreateFontString(nil,"OVERLAY","GameFontNormalSmall") |
text:SetTextColor(1,1,1) |
text:SetJustifyH("LEFT") |
text:SetPoint("TOPLEFT",frame,"TOPLEFT",18,0) |
text:SetPoint("BOTTOMRIGHT",frame,"BOTTOMRIGHT",-24,0) |
self.text = text |
local highlight = button:CreateTexture(nil, "OVERLAY") |
highlight:SetTexture("Interface\\QuestFrame\\UI-QuestTitleHighlight") |
highlight:SetBlendMode("ADD") |
highlight:SetHeight(14) |
highlight:ClearAllPoints() |
highlight:SetPoint("RIGHT",frame,"RIGHT",-19,0) |
highlight:SetPoint("LEFT",frame,"LEFT",5,0) |
highlight:Hide() |
self.highlight = highlight |
local check = frame:CreateTexture("OVERLAY") |
check:SetWidth(16) |
check:SetHeight(16) |
check:SetPoint("LEFT",frame,"LEFT",3,-1) |
check:SetTexture("Interface\\Buttons\\UI-CheckBox-Check") |
check:Hide() |
self.check = check |
local sub = frame:CreateTexture("OVERLAY") |
sub:SetWidth(16) |
sub:SetHeight(16) |
sub:SetPoint("RIGHT",frame,"RIGHT",-3,-1) |
sub:SetTexture("Interface\\ChatFrame\\ChatFrameExpandArrow") |
sub:Hide() |
self.sub = sub |
button:SetScript("OnEnter", Frame_OnEnter) |
button:SetScript("OnLeave", Frame_OnLeave) |
self.OnAcquire = OnAcquire |
self.OnRelease = OnRelease |
self.SetPullout = SetPullout |
self.GetText = GetText |
self.SetText = SetText |
self.SetDisabled = SetDisabled |
self.SetPoint = SetPoint |
self.Show = Show |
self.Hide = Hide |
self.SetOnLeave = SetOnLeave |
self.SetOnEnter = SetOnEnter |
self.button:SetScript("OnClick", Frame_OnClick) |
self.speakerbutton:SetScript("OnClick", Speaker_OnClick) |
self.SetValue = SetValue |
AceGUI:RegisterAsWidget(self) |
return self |
end |
AceGUI:RegisterWidgetType(widgetType, Constructor, widgetVersion) |
end |
do |
local widgetType = "LSM30_Border_Item_Select" |
local widgetVersion = 1 |
local function Frame_OnEnter(this) |
local self = this.obj |
if self.useHighlight then |
self.highlight:Show() |
self.border:Show() |
end |
self:Fire("OnEnter") |
if self.specialOnEnter then |
self.specialOnEnter(self) |
end |
end |
local function Frame_OnLeave(this) |
local self = this.obj |
self.border:Hide() |
self.highlight:Hide() |
self:Fire("OnLeave") |
if self.specialOnLeave then |
self.specialOnLeave(self) |
end |
end |
local function SetText(self, text) |
if text and text ~= '' then |
local backdropTable = self.border:GetBackdrop() |
backdropTable.edgeFile = Media:Fetch('border',text) |
self.border:SetBackdrop(backdropTable) |
end |
self.text:SetText(text or "") |
end |
local function Constructor() |
local self = AceGUI:Create("Dropdown-Item-Toggle") |
self.type = widgetType |
self.SetText = SetText |
local border = CreateFrame('Frame') |
border:SetFrameStrata("TOOLTIP") |
border:SetWidth(64) |
border:SetHeight(32) |
border:SetPoint("LEFT",self.frame,"RIGHT",5,0) |
border:SetBackdrop({bgFile = "Interface/Tooltips/UI-Tooltip-Background", |
tile = true, tileSize = 16, edgeSize = 16, |
insets = { left = 4, right = 4, top = 4, bottom = 4 }}) |
self.border = border |
border:Hide() |
self.frame:SetScript("OnEnter", Frame_OnEnter) |
self.frame:SetScript("OnLeave", Frame_OnLeave) |
return self |
end |
AceGUI:RegisterWidgetType(widgetType, Constructor, widgetVersion) |
end |
do |
local widgetType = "LSM30_Font" |
local widgetVersion = 1 |
local function SetText(self, text) |
if text and text ~= '' then |
local _, size, outline= self.text:GetFont() |
self.text:SetFont(Media:Fetch('font',text),size,outline) |
end |
self.text:SetText(text or "") |
end |
local function SetValue(self, value) |
if value then |
if value ~= '' then |
local _, size, outline= self.text:GetFont() |
self.text:SetFont(Media:Fetch('font',value),size,outline) |
end |
self:SetText(value or "") |
end |
self.value = value |
end |
local function AddListItem(self, value, text) |
local item = AceGUI:Create("LSM30_Font_Item_Select") |
item:SetText(text) |
item.userdata.obj = self |
item.userdata.value = value |
item:SetCallback("OnValueChanged", OnItemValueChanged) |
self.pullout:AddItem(item) |
end |
local sortlist = {} |
local function SetList(self, list) |
self.list = list or lists.font |
self.pullout:Clear() |
for v in pairs(self.list) do |
sortlist[#sortlist + 1] = v |
end |
table.sort(sortlist) |
for i, value in pairs(sortlist) do |
AddListItem(self, value, self.list[value]) |
sortlist[i] = nil |
end |
if self.multiselect then |
AddCloseButton() |
end |
end |
local function Constructor() |
local self = AceGUI:Create("Dropdown") |
self.type = widgetType |
self.SetText = SetText |
self.SetValue = SetValue |
self.SetList = SetList |
return self |
end |
AceGUI:RegisterWidgetType(widgetType, Constructor, widgetVersion) |
end |
do |
local widgetType = "LSM30_Statusbar" |
local widgetVersion = 1 |
local function SetText(self, text) |
if text and text ~= '' then |
self.texture:SetTexture(Media:Fetch('statusbar',text)) |
self.texture:SetVertexColor(.5,.5,.5) |
end |
self.text:SetText(text or "") |
end |
local function AddListItem(self, value, text) |
local item = AceGUI:Create("LSM30_Statusbar_Item_Select") |
item:SetText(text) |
item.userdata.obj = self |
item.userdata.value = value |
item:SetCallback("OnValueChanged", OnItemValueChanged) |
self.pullout:AddItem(item) |
end |
local sortlist = {} |
local function SetList(self, list) |
self.list = list or lists.statusbar |
self.pullout:Clear() |
for v in pairs(self.list) do |
sortlist[#sortlist + 1] = v |
end |
table.sort(sortlist) |
for i, value in pairs(sortlist) do |
AddListItem(self, value, self.list[value]) |
sortlist[i] = nil |
end |
if self.multiselect then |
AddCloseButton() |
end |
end |
local function Constructor() |
local self = AceGUI:Create("Dropdown") |
self.type = widgetType |
self.SetText = SetText |
self.SetList = SetList |
local left = _G[self.dropdown:GetName() .. "Left"] |
local middle = _G[self.dropdown:GetName() .. "Middle"] |
local right = _G[self.dropdown:GetName() .. "Right"] |
local texture = self.dropdown:CreateTexture(nil, "ARTWORK") |
texture:SetPoint("BOTTOMRIGHT", right, "BOTTOMRIGHT" ,-39, 26) |
texture:SetPoint("TOPLEFT", left, "TOPLEFT", 24, -24) |
self.texture = texture |
return self |
end |
AceGUI:RegisterWidgetType(widgetType, Constructor, widgetVersion) |
end |
do |
local widgetType = "LSM30_Background" |
local widgetVersion = 1 |
local function Frame_OnEnter(this) |
local self = this.obj |
local text = self.text:GetText() |
if text ~= nil and text ~= '' then |
self.textureframe:Show() |
end |
end |
local function Frame_OnLeave(this) |
local self = this.obj |
self.textureframe:Hide() |
end |
local function SetText(self, text) |
if text and text ~= '' then |
self.texture:SetTexture(Media:Fetch('background',text)) |
end |
self.text:SetText(text or "") |
end |
local function AddListItem(self, value, text) |
local item = AceGUI:Create("LSM30_Background_Item_Select") |
item:SetText(text) |
item.userdata.obj = self |
item.userdata.value = value |
item:SetCallback("OnValueChanged", OnItemValueChanged) |
self.pullout:AddItem(item) |
end |
local sortlist = {} |
local function SetList(self, list) |
self.list = list or lists.background |
self.pullout:Clear() |
for v in pairs(self.list) do |
sortlist[#sortlist + 1] = v |
end |
table.sort(sortlist) |
for i, value in pairs(sortlist) do |
AddListItem(self, value, self.list[value]) |
sortlist[i] = nil |
end |
if self.multiselect then |
AddCloseButton() |
end |
end |
local function Constructor() |
local self = AceGUI:Create("Dropdown") |
self.type = widgetType |
self.SetText = SetText |
self.SetList = SetList |
local left = _G[self.dropdown:GetName() .. "Left"] |
local middle = _G[self.dropdown:GetName() .. "Middle"] |
local right = _G[self.dropdown:GetName() .. "Right"] |
local textureframe = CreateFrame('Frame') |
textureframe:SetFrameStrata("TOOLTIP") |
textureframe:SetWidth(128) |
textureframe:SetHeight(128) |
textureframe:SetPoint("LEFT",right,"RIGHT",-15,0) |
self.textureframe = textureframe |
local texture = textureframe:CreateTexture(nil, "OVERLAY") |
texture:SetTexture(0,0,0,0) |
texture:SetAllPoints(textureframe) |
textureframe:Hide() |
self.texture = texture |
self.dropdown:EnableMouse(true) |
self.dropdown:SetScript("OnEnter", Frame_OnEnter) |
self.dropdown:SetScript("OnLeave", Frame_OnLeave) |
return self |
end |
AceGUI:RegisterWidgetType(widgetType, Constructor, widgetVersion) |
end |
do |
local widgetType = "LSM30_Sound" |
local widgetVersion = 1 |
local function AddListItem(self, value, text) |
local item = AceGUI:Create("LSM30_Sound_Item_Select") |
item:SetText(text) |
item.userdata.obj = self |
item.userdata.value = value |
item:SetCallback("OnValueChanged", OnItemValueChanged) |
self.pullout:AddItem(item) |
end |
local sortlist = {} |
local function SetList(self, list) |
self.list = list or lists.sound |
self.pullout:Clear() |
for v in pairs(self.list) do |
sortlist[#sortlist + 1] = v |
end |
table.sort(sortlist) |
for i, value in pairs(sortlist) do |
AddListItem(self, value, self.list[value]) |
sortlist[i] = nil |
end |
if self.multiselect then |
AddCloseButton() |
end |
end |
local function Constructor() |
local self = AceGUI:Create("Dropdown") |
self.type = widgetType |
self.SetList = SetList |
return self |
end |
AceGUI:RegisterWidgetType(widgetType, Constructor, widgetVersion) |
end |
do |
local widgetType = "LSM30_Border" |
local widgetVersion = 1 |
local function Frame_OnEnter(this) |
local self = this.obj |
local text = self.text:GetText() |
if text ~= nil and text ~= '' then |
self.borderframe:Show() |
end |
end |
local function Frame_OnLeave(this) |
local self = this.obj |
self.borderframe:Hide() |
end |
local function AddListItem(self, value, text) |
local item = AceGUI:Create("LSM30_Border_Item_Select") |
item:SetText(text) |
item.userdata.obj = self |
item.userdata.value = value |
item:SetCallback("OnValueChanged", OnItemValueChanged) |
self.pullout:AddItem(item) |
end |
local sortlist = {} |
local function SetList(self, list) |
self.list = list or lists.border |
self.pullout:Clear() |
for v in pairs(self.list) do |
sortlist[#sortlist + 1] = v |
end |
table.sort(sortlist) |
for i, value in pairs(sortlist) do |
AddListItem(self, value, self.list[value]) |
sortlist[i] = nil |
end |
if self.multiselect then |
AddCloseButton() |
end |
end |
local function SetText(self, text) |
if text and text ~= '' then |
local backdropTable = self.borderframe:GetBackdrop() |
backdropTable.edgeFile = Media:Fetch('border',text) |
self.borderframe:SetBackdrop(backdropTable) |
end |
self.text:SetText(text or "") |
end |
local function Constructor() |
local self = AceGUI:Create("Dropdown") |
self.type = widgetType |
self.SetList = SetList |
self.SetText = SetText |
local left = _G[self.dropdown:GetName() .. "Left"] |
local middle = _G[self.dropdown:GetName() .. "Middle"] |
local right = _G[self.dropdown:GetName() .. "Right"] |
local borderframe = CreateFrame('Frame') |
borderframe:SetFrameStrata("TOOLTIP") |
borderframe:SetWidth(64) |
borderframe:SetHeight(32) |
borderframe:SetPoint("LEFT",right,"RIGHT",-15,0) |
borderframe:SetBackdrop({bgFile = "Interface/Tooltips/UI-Tooltip-Background", |
tile = true, tileSize = 16, edgeSize = 16, |
insets = { left = 4, right = 4, top = 4, bottom = 4 }}) |
self.borderframe = borderframe |
borderframe:Hide() |
self.dropdown:EnableMouse(true) |
self.dropdown:SetScript("OnEnter", Frame_OnEnter) |
self.dropdown:SetScript("OnLeave", Frame_OnLeave) |
return self |
end |
AceGUI:RegisterWidgetType(widgetType, Constructor, widgetVersion) |
end |
--DEFAULT_CHAT_FRAME:AddMessage('LSM30_widgets')--lets make sure this loads properly :P |
end |
## Interface: 20400 |
## Title: AceGUI-3.0-SharedMediaWidgets |
## Notes: Enables AceGUI-3.0 widgets for the 5 basic SharedMedia-3.0 types |
## Version: 3.0 |
## Author: Yssaril |
## OptionalDeps: Ace3, LibSharedMedia-3.0 |
## X-Category: Interface Enhancements |
widget.xml |
--[[ $Id: CallbackHandler-1.0.lua 504 2008-02-07 11:04:06Z nevcairiel $ ]] |
--[[ $Id: CallbackHandler-1.0.lua 60697 2008-02-09 16:51:20Z nevcairiel $ ]] |
local MAJOR, MINOR = "CallbackHandler-1.0", 3 |
local CallbackHandler = LibStub:NewLibrary(MAJOR, MINOR) |
--[[ $Id: AceEvent-3.0.lua 494 2008-02-03 13:03:56Z nevcairiel $ ]] |
--[[ $Id: AceEvent-3.0.lua 60131 2008-02-03 13:03:56Z nevcairiel $ ]] |
local MAJOR, MINOR = "AceEvent-3.0", 3 |
local AceEvent = LibStub:NewLibrary(MAJOR, MINOR) |
end |
local reflect = 23920 --Spell Reflect buff ID |
local dur = 4.9 --Spell Reflect duration |
local dur = 4.8 --Spell Reflect duration |
local counter = 0 --timer var |
local player = UnitName("player") |
local timerFrame = CreateFrame("Frame") |
name = "Standby", |
desc = "Puts the addon into standby mode, so no sounds are heard.", |
type = "toggle", |
get = function() |
return Plink.db.profile.standby |
end, |
set = function() |
Plink.db.profile.standby = not Plink.db.profile.standby |
Plink:AddMessage("Standby mode is now set to: "..Plink.db.profile.standby) |
end |
get = function() return Plink.db.profile.standby end, |
set = function() Plink.db.profile.standby = not Plink.db.profile.standby end |
}, |
config = { |
name = "Config", |
## Interface: 30000 |
## Interface: 20400 |
## Title: Plink! |
## Version: 1.1 |
## Version: 1.0 |
## Author: Seerah |
## Notes: Plays a sound when your Spell Reflect buff gets used |
## OptionalDeps: Ace3, LibSharedMedia-3.0, AceGUI-3.0-SharedMediaWidgets |