/
local sbars = AceGUIWidgetLSMlists.statusbar |
local bgs = AceGUIWidgetLSMlists.background |
local borders = AceGUIWidgetLSMlists.border |
local fontFlags = {"None", "Outline", "Monochrome Outline"} --, "Monochrome"} |
local fontFlags = {"None", "Outline", "Monochrome Outline", "Monochrome"} |
local _, class = UnitClass("player") |
local classColor, SBmover, moverShown, db |
local BuffFrame = BuffFrame |
cfsize = 14, |
size = 40, |
}, |
borAlpha = .4, --not added in options (yet) |
bg = "Solid", |
bgColor = {r = .32, g = .32, b = .32}, |
classbg = false, |
borColor = {r = .5, g = .5, b = .5}, |
classbor = false, |
debuffTypeBor = false, |
borderWidth = 16, |
debuffOverlayAlpha = .4, |
sbar = "Solid", |
sbarColor = {r = 0, g = 1, b = 0}, |
classbar = false, |
posX = -205, |
posY = -13, |
anchor1 = "TOPRIGHT", |
anchor2 = "TOPRIGHT", |
bprow = 8, |
} |
c:SetDrawLayer("OVERLAY", 3) |
end |
if bor then |
bor:SetAlpha(db.borAlpha) |
bor:SetAlpha(db.debuffOverlayAlpha) |
bor:ClearAllPoints() |
if db.debuffTypeBor then |
bor:SetAllPoints(btn.bg) |
btn.bg:SetPoint("BOTTOMRIGHT", btn, "BOTTOMRIGHT", 2, -max(db[svtable].size*.2, 5)) |
btn.bg:SetBackdrop({ bgFile = LSM:Fetch("background", db.bg), |
edgeFile = LSM:Fetch("border", db.border), |
edgeSize = 16, |
edgeSize = db.borderWidth, |
insets = {left=3,right=3,top=3,bottom=3} |
}) |
btn.bar:SetStatusBarTexture(LSM:Fetch("statusbar", db.sbar)) |
b.bar:SetScript("OnUpdate", function(self, elapsed) |
timer = timer + elapsed |
if timer >= .1 then |
_,_,_,_,_,dur,exps = UnitBuff("player",i) |
_,_,_,_,dur,exps = UnitBuff("player",i) |
if dur == 0 then |
self:SetValue(1) |
else |
d.bar:SetScript("OnUpdate", function(self, elapsed) |
timer = timer + elapsed |
if timer >= .1 then |
_,_,_,_,_,dur,exps = UnitDebuff("player",i) |
_,_,_,_,dur,exps = UnitDebuff("player",i) |
if dur == 0 then |
self:SetValue(1) |
else |
NEW_SetUnitAura = function(self, unit, id, filter) |
OLD_SetUnitAura(self, unit, id, filter) |
if filter == "HELPFUL" then |
caster = select(8,UnitAura("player", id)) |
_,_,_,_,_,_,caster = UnitAura("player", id) --7th return |
casterName = caster==nil and "unknown" or caster=="player" and "you" or caster=="pet" and "your pet" or UnitName(caster) |
GameTooltip:AddLine("Provided by "..casterName, .5, .9, 1) |
GameTooltip:Show() |
local function Position() |
BuffFrame:ClearAllPoints() |
BuffFrame:NewSetPoint("TOPRIGHT", db.posX, db.posY) |
BuffFrame:NewSetPoint(db.anchor1, UIParent, db.anchor2, db.posX, db.posY) |
end |
--keep other stuff (like ticket frame) from moving buffs |
--BuffFrame.NewSetPoint = BuffFrame.SetPoint |
--BuffFrame.SetPoint = Position |
local function ShowMover() |
if not SBmover then |
SBmover = CreateFrame("Frame", nil, UIParent) |
SBmover:SetBackdrop({bgFile = "Interface\\BUTTONS\\WHITE8X8.blp"}) |
SBmover:SetBackdropColor(.2,.2,.9,.5) |
SBmover:SetBackdrop({bgFile = "Interface\\AddOns\\ShinyBuffs\\media\\mover.blp"}) |
SBmover:SetBackdropColor(1,1,1,.5) |
SBmover:SetPoint("TOPRIGHT", BuffFrame, "TOPRIGHT", 5, 5) |
SBmover:SetSize(200, 150) |
SBmover:SetFrameStrata("TOOLTIP") |
SBmover:EnableMouse(1) |
SBmover:SetMovable(1) |
SBmover:SetScript("OnMouseDown", function(self) self:StartMoving() end) |
SBmover:EnableMouse(true) |
BuffFrame:SetMovable(true) |
BuffFrame:SetClampedToScreen(true) |
SBmover:SetScript("OnMouseDown", function(self) |
BuffFrame:StartMoving() |
end) |
SBmover:SetScript("OnMouseUp", function(self) |
self:StopMovingOrSizing() |
_, _, _, db.posX, db.posY = self:GetPoint() |
Position() |
--manually refresh the options display (x,y weren't updating...) |
BuffFrame:StopMovingOrSizing() |
db.anchor1, _, db.anchor2, db.posX, db.posY = BuffFrame:GetPoint() |
--Position() |
if SB.optionsFrame:IsShown() then |
InterfaceOptionsFrame_OpenToCategory("ShinyBuffs") |
end |
SBmover:EnableMouse(moverShown) |
end |
local function SkinAuras() |
if BUFF_ACTUAL_DISPLAY > numBuffsSkinned then |
for i = numBuffsSkinned+1, BUFF_ACTUAL_DISPLAY do |
SkinBuffs(i, true) |
end |
end |
if DEBUFF_ACTUAL_DISPLAY > numDebuffsSkinned then |
for i = numDebuffsSkinned+1, DEBUFF_ACTUAL_DISPLAY do |
SkinDebuffs(i, true) |
end |
end |
end |
local options = { |
name = "ShinyBuffs Options", |
type = "group", |
}, |
whoCast = { |
name = "Who Cast?", |
desc = "Shows who your buff is from in its tooltip.\n\nNOTE: A reload of your UI is required for changes of this setting to take effect. This may be done with /reload", |
desc = "Shows who your buff is from in its tooltip.", |
type = "toggle", |
get = function() return db.whoCast end, |
set = function() db.whoCast = not db.whoCast WhoCast() end, |
end, |
order = 1, |
}, |
borderWidth = { |
name = "Border Width", |
desc = "Width of the border.", |
type = "range", |
min = 1, |
max = 24, |
step = .5, |
get = function() return db.borderWidth end, |
set = function(_,size) |
db.borderWidth = size |
for i=1,numBuffsSkinned do |
SkinBuffs(i,false) |
end |
for i=1,numDebuffsSkinned do |
SkinDebuffs(i,false) |
end |
SkinTench(false) |
end, |
order = 2, |
}, |
borColor = { |
name = "Color", |
desc = "Select a color for the border texture.", |
end |
SkinTench(false) |
end, |
order = 2, |
order = 3, |
}, |
classbor = { |
name = "By Class", |
end |
SkinTench(false) |
end, |
order = 3, |
order = 4, |
}, |
debuffTypeBor = { |
name = "By Debuff Type", |
desc = "Display debuff dispel type as border instead of icon overlay.", |
type = "toggle", |
width = "half", |
get = function() return db.debuffTypeBor end, |
set = function() |
db.debuffTypeBor = not db.debuffTypeBor |
SkinDebuffs(i,false) |
end |
end, |
order = 4, |
order = 5, |
}, |
debuffOverlayAlpha = { |
name = "Debuff Overlay Alpha", |
desc = "Transparency of the debuffs' dispel type overlay.", |
type = "range", |
disabled = function() return db.debuffTypeBor end, |
min = .25, |
max = 1, |
step = .05, |
get = function() return db.debuffOverlayAlpha end, |
set = function(_,alpha) |
db.debuffOverlayAlpha = alpha |
for i=1,numDebuffsSkinned do |
SkinDebuffs(i,false) |
end |
end, |
order = 6, |
}, |
}, |
}, |
sbar = { |
BUFF_ROW_SPACING = 15 |
BUFFS_PER_ROW = db.bprow |
for i = 1, BUFF_ACTUAL_DISPLAY do |
SkinBuffs(i, true) |
end |
for i = 1, DEBUFF_ACTUAL_DISPLAY do |
SkinDebuffs(i, true) |
end |
C_Timer.After(.25, SkinAuras) |
SkinTench(true) |
--keep other stuff (like ticket frame) from moving buffs |
SB:UnregisterEvent("PLAYER_ENTERING_WORLD") |
SB:RegisterUnitEvent("UNIT_AURA", "player") |
SB:SetScript("OnEvent", function(s,e,unit) |
if BUFF_ACTUAL_DISPLAY > numBuffsSkinned then |
for i = numBuffsSkinned+1, BUFF_ACTUAL_DISPLAY do |
SkinBuffs(i, true) |
end |
end |
if DEBUFF_ACTUAL_DISPLAY > numDebuffsSkinned then |
for i = numDebuffsSkinned+1, DEBUFF_ACTUAL_DISPLAY do |
SkinDebuffs(i, true) |
end |
end |
SkinAuras() |
--don't bother checking if they're all skinned |
if numBuffsSkinned == BUFF_MAX_DISPLAY and numDebuffsSkinned == DEBUFF_MAX_DISPLAY then |
SB:UnregisterEvent("UNIT_AURA") |
## Interface: 70000 |
## Interface: 80000 |
## Title: ShinyBuffs |
## Author: Seerah |
## Notes: Skin and move your buffs/debuffs! |
## Version: 1.1 |
## Version: 1.2 |
## OptionalDeps: Ace3, LibSharedMedia-3.0, AceGUI-3.0-SharedMediaWidgets |
## SavedVariables: ShinyBuffsDB |
## SavedVariablesPerCharacter: ShinyBuffsPCDB |
<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="CallbackHandler-1.0.lua"/> |
</Ui> |
--[[----------------------------------------------------------------------------- |
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 |
]] |
do |
local Type = "Window" |
local Version = 4 |
local Version = 6 |
local function frameOnShow(this) |
this.obj:Fire("OnShow") |
end |
local function frameOnClose(this) |
this.obj:Fire("OnClose") |
end |
local function closeOnClick(this) |
PlaySound("gsTitleOptionExit") |
PlaySound(PlaySoundKitID and "gsTitleOptionExit" or 799) -- SOUNDKIT.GS_TITLE_OPTION_EXIT |
this.obj:Hide() |
end |
frame:SetFrameStrata("FULLSCREEN_DIALOG") |
frame:SetScript("OnMouseDown", frameOnMouseDown) |
frame:SetScript("OnShow",frameOnShow) |
frame:SetScript("OnHide",frameOnClose) |
frame:SetMinResize(240,240) |
frame:SetToplevel(true) |
local AceGUI = LibStub and LibStub("AceGUI-3.0", true) |
if not AceGUI or (AceGUI:GetWidgetVersion(Type) or 0) >= Version then return end |
local IsLegion = select(4, GetBuildInfo()) >= 70000 |
-- Lua APIs |
local pairs, assert, type = pairs, assert, type |
local min, max, floor, abs = math.min, math.max, math.floor, math.abs |
local scrollbg = scrollbar:CreateTexture(nil, "BACKGROUND") |
scrollbg:SetAllPoints(scrollbar) |
if IsLegion then |
scrollbg:SetColorTexture(0, 0, 0, 0.4) |
else |
scrollbg:SetTexture(0, 0, 0, 0.4) |
end |
scrollbg:SetColorTexture(0, 0, 0, 0.4) |
--Container Support |
local content = CreateFrame("Frame", nil, scrollframe) |
local AceGUI = LibStub and LibStub("AceGUI-3.0", true) |
if not AceGUI or (AceGUI:GetWidgetVersion(Type) or 0) >= Version then return end |
local IsLegion = select(4, GetBuildInfo()) >= 70000 |
-- Lua APIs |
local next, pairs, ipairs, assert, type = next, pairs, ipairs, assert, type |
local math_min, math_max, floor = math.min, math.max, floor |
local scrollbg = scrollbar:CreateTexture(nil, "BACKGROUND") |
scrollbg:SetAllPoints(scrollbar) |
scrollbg:SetColorTexture(0,0,0,0.4) |
if IsLegion then |
scrollbg:SetColorTexture(0,0,0,0.4) |
else |
scrollbg:SetTexture(0,0,0,0.4) |
end |
local border = CreateFrame("Frame",nil,frame) |
border:SetPoint("TOPLEFT", treeframe, "TOPRIGHT") |
border:SetPoint("BOTTOMRIGHT") |
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 1137 2016-05-15 10:57:36Z nevcairiel $ ]]-- |
--[[ $Id: AceGUIWidget-DropDown-Items.lua 1161 2017-08-12 14:30:16Z funkydude $ ]]-- |
local AceGUI = LibStub("AceGUI-3.0") |
local IsLegion = select(4, GetBuildInfo()) >= 70000 |
-- Lua APIs |
local select, assert = select, assert |
-- 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) |
local line = self.frame:CreateTexture(nil, "OVERLAY") |
line:SetHeight(1) |
if IsLegion then |
line:SetColorTexture(.5, .5, .5) |
else |
line:SetTexture(.5, .5, .5) |
end |
line:SetColorTexture(.5, .5, .5) |
line:SetPoint("LEFT", self.frame, "LEFT", 10, 0) |
line:SetPoint("RIGHT", self.frame, "RIGHT", -10, 0) |
local AceGUI = LibStub and LibStub("AceGUI-3.0", true) |
if not AceGUI or (AceGUI:GetWidgetVersion(Type) or 0) >= Version then return end |
local IsLegion = select(4, GetBuildInfo()) >= 70000 |
-- Lua APIs |
local pairs = pairs |
local texture = frame:CreateTexture(nil, "BACKGROUND") |
texture:SetWidth(16) |
texture:SetHeight(16) |
if IsLegion then |
texture:SetColorTexture(1, 1, 1) |
else |
texture:SetTexture(1, 1, 1) |
end |
texture:SetColorTexture(1, 1, 1) |
texture:SetPoint("CENTER", colorSwatch) |
texture:Show() |
--[[----------------------------------------------------------------------------- |
InteractiveLabel Widget |
-------------------------------------------------------------------------------]] |
local Type, Version = "InteractiveLabel", 20 |
local Type, Version = "InteractiveLabel", 21 |
local AceGUI = LibStub and LibStub("AceGUI-3.0", true) |
if not AceGUI or (AceGUI:GetWidgetVersion(Type) or 0) >= Version then return end |
Label Widget |
Displays text and optionally an icon. |
-------------------------------------------------------------------------------]] |
local Type, Version = "Label", 23 |
local Type, Version = "Label", 24 |
local AceGUI = LibStub and LibStub("AceGUI-3.0", true) |
if not AceGUI or (AceGUI:GetWidgetVersion(Type) or 0) >= Version then return end |
self:SetImageSize(16, 16) |
self:SetColor() |
self:SetFontObject() |
self:SetJustifyH("LEFT") |
self:SetJustifyV("TOP") |
-- reset the flag |
self.resizing = nil |
self.image:SetHeight(height) |
UpdateImageAnchor(self) |
end, |
["SetJustifyH"] = function(self, justifyH) |
self.label:SetJustifyH(justifyH) |
end, |
["SetJustifyV"] = function(self, justifyV) |
self.label:SetJustifyV(justifyV) |
end, |
} |
--[[----------------------------------------------------------------------------- |
frame:Hide() |
local label = frame:CreateFontString(nil, "BACKGROUND", "GameFontHighlightSmall") |
label:SetJustifyH("LEFT") |
label:SetJustifyV("TOP") |
local image = frame:CreateTexture(nil, "BACKGROUND") |
-- create widget |
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", 24 |
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 |
local function Frame_OnShow(frame) |
frame.obj:Fire("OnShow") |
end |
local function Frame_OnClose(frame) |
frame.obj:Fire("OnClose") |
end |
frame:SetBackdropColor(0, 0, 0, 1) |
frame:SetMinResize(400, 200) |
frame:SetToplevel(true) |
frame:SetScript("OnShow", Frame_OnShow) |
frame:SetScript("OnHide", Frame_OnClose) |
frame:SetScript("OnMouseDown", Frame_OnMouseDown) |
--[[ $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() |
<Include file="AceConfigDialog-3.0\AceConfigDialog-3.0.xml"/> |
<!--<Include file="AceConfigDropdown-3.0\AceConfigDropdown-3.0.xml"/>--> |
<Script file="AceConfig-3.0.lua"/> |
</Ui> |
-- as well as associate it with a slash command. |
-- @class file |
-- @name AceConfig-3.0 |
-- @release $Id: AceConfig-3.0.lua 969 2010-10-07 02:11:48Z shefki $ |
-- @release $Id: AceConfig-3.0.lua 1161 2017-08-12 14:30:16Z funkydude $ |
--[[ |
AceConfig-3.0 |
]] |
local MAJOR, MINOR = "AceConfig-3.0", 2 |
local cfgreg = LibStub("AceConfigRegistry-3.0") |
local cfgcmd = LibStub("AceConfigCmd-3.0") |
local MAJOR, MINOR = "AceConfig-3.0", 3 |
local AceConfig = LibStub:NewLibrary(MAJOR, MINOR) |
if not AceConfig then return end |
local cfgreg = LibStub("AceConfigRegistry-3.0") |
local cfgcmd = LibStub("AceConfigCmd-3.0") |
--TODO: local cfgdlg = LibStub("AceConfigDialog-3.0", true) |
--TODO: local cfgdrp = LibStub("AceConfigDropdown-3.0", true) |
<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="AceConfigDialog-3.0.lua"/> |
</Ui> |
--- AceConfigDialog-3.0 generates AceGUI-3.0 based windows based on option tables. |
-- @class file |
-- @name AceConfigDialog-3.0 |
-- @release $Id: AceConfigDialog-3.0.lua 1139 2016-07-03 07:43:51Z nevcairiel $ |
-- @release $Id: AceConfigDialog-3.0.lua 1163 2017-08-14 14:04:39Z nevcairiel $ |
local LibStub = LibStub |
local MAJOR, MINOR = "AceConfigDialog-3.0", 61 |
local gui = LibStub("AceGUI-3.0") |
local reg = LibStub("AceConfigRegistry-3.0") |
local MAJOR, MINOR = "AceConfigDialog-3.0", 64 |
local AceConfigDialog, oldminor = LibStub:NewLibrary(MAJOR, MINOR) |
if not AceConfigDialog then return end |
AceConfigDialog.frame.closing = AceConfigDialog.frame.closing or {} |
AceConfigDialog.frame.closeAllOverride = AceConfigDialog.frame.closeAllOverride or {} |
local gui = LibStub("AceGUI-3.0") |
local reg = LibStub("AceConfigRegistry-3.0") |
-- Lua APIs |
local tconcat, tinsert, tsort, tremove, tsort = table.concat, table.insert, table.sort, table.remove, table.sort |
local strmatch, format = string.match, string.format |
end |
end |
local function validationErrorPopup(message) |
if not StaticPopupDialogs["ACECONFIGDIALOG30_VALIDATION_ERROR_DIALOG"] then |
StaticPopupDialogs["ACECONFIGDIALOG30_VALIDATION_ERROR_DIALOG"] = {} |
end |
local t = StaticPopupDialogs["ACECONFIGDIALOG30_VALIDATION_ERROR_DIALOG"] |
t.text = message |
t.button1 = OKAY |
t.preferredIndex = STATICPOPUP_NUMDIALOGS |
local dialog, oldstrata |
t.OnAccept = function() |
if dialog and oldstrata then |
dialog:SetFrameStrata(oldstrata) |
end |
end |
t.timeout = 0 |
t.whileDead = 1 |
t.hideOnEscape = 1 |
dialog = StaticPopup_Show("ACECONFIGDIALOG30_VALIDATION_ERROR_DIALOG") |
if dialog then |
oldstrata = dialog:GetFrameStrata() |
dialog:SetFrameStrata("TOOLTIP") |
end |
end |
local function ActivateControl(widget, event, ...) |
--This function will call the set / execute handler for the widget |
--widget:GetUserDataTable() contains the needed info |
end |
local rootframe = user.rootframe |
if type(validated) == "string" then |
--validate function returned a message to display |
if rootframe.SetStatusText then |
rootframe:SetStatusText(validated) |
else |
-- TODO: do something else. |
end |
PlaySound("igPlayerInviteDecline") |
del(info) |
return true |
elseif not validated then |
--validate returned false |
if rootframe.SetStatusText then |
if not validated or type(validated) == "string" then |
if not validated then |
if usage then |
rootframe:SetStatusText(name..": "..usage) |
validated = name..": "..usage |
else |
if pattern then |
rootframe:SetStatusText(name..": Expected "..pattern) |
validated = name..": Expected "..pattern |
else |
rootframe:SetStatusText(name..": Invalid Value") |
validated = name..": Invalid Value" |
end |
end |
end |
-- show validate message |
if rootframe.SetStatusText then |
rootframe:SetStatusText(validated) |
else |
-- TODO: do something else |
validationErrorPopup(validated) |
end |
PlaySound("igPlayerInviteDecline") |
PlaySound(PlaySoundKitID and "igPlayerInviteDecline" or 882) -- SOUNDKIT.IG_PLAYER_INVITE_DECLINE || XXX _DECLINE is actually missing from the table |
del(info) |
return true |
else |
<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="AceConfigCmd-3.0.lua"/> |
</Ui> |
--- AceConfigCmd-3.0 handles access to an options table through the "command line" interface via the ChatFrames. |
-- @class file |
-- @name AceConfigCmd-3.0 |
-- @release $Id: AceConfigCmd-3.0.lua 1045 2011-12-09 17:58:40Z nevcairiel $ |
-- @release $Id: AceConfigCmd-3.0.lua 1161 2017-08-12 14:30:16Z funkydude $ |
--[[ |
AceConfigCmd-3.0 |
-- TODO: plugin args |
local cfgreg = LibStub("AceConfigRegistry-3.0") |
local MAJOR, MINOR = "AceConfigCmd-3.0", 13 |
local MAJOR, MINOR = "AceConfigCmd-3.0", 14 |
local AceConfigCmd = LibStub:NewLibrary(MAJOR, MINOR) |
if not AceConfigCmd then return end |
AceConfigCmd.commands = AceConfigCmd.commands or {} |
local commands = AceConfigCmd.commands |
local cfgreg = LibStub("AceConfigRegistry-3.0") |
local AceConsole -- LoD |
local AceConsoleName = "AceConsole-3.0" |
-- :IterateOptionsTables() (and :GetOptionsTable() if only given one argument) return a function reference that the requesting config handling addon must call with valid "uiType", "uiName". |
-- @class file |
-- @name AceConfigRegistry-3.0 |
-- @release $Id: AceConfigRegistry-3.0.lua 1139 2016-07-03 07:43:51Z nevcairiel $ |
local MAJOR, MINOR = "AceConfigRegistry-3.0", 16 |
-- @release $Id: AceConfigRegistry-3.0.lua 1161 2017-08-12 14:30:16Z funkydude $ |
local CallbackHandler = LibStub("CallbackHandler-1.0") |
local MAJOR, MINOR = "AceConfigRegistry-3.0", 17 |
local AceConfigRegistry = LibStub:NewLibrary(MAJOR, MINOR) |
if not AceConfigRegistry then return end |
AceConfigRegistry.tables = AceConfigRegistry.tables or {} |
local CallbackHandler = LibStub:GetLibrary("CallbackHandler-1.0") |
if not AceConfigRegistry.callbacks then |
AceConfigRegistry.callbacks = CallbackHandler:New(AceConfigRegistry) |
end |
<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="AceConfigRegistry-3.0.lua"/> |
</Ui> |