update config

This commit is contained in:
Bunny67
2018-06-14 21:29:14 +03:00
parent edb358c06c
commit faba1d7b1b
7 changed files with 301 additions and 215 deletions
-1
View File
@@ -5,7 +5,6 @@ P.farmSize = 340
--Core --Core
P["general"] = { P["general"] = {
["taintLog"] = false,
["stickyFrames"] = true, ["stickyFrames"] = true,
["loginmessage"] = true, ["loginmessage"] = true,
["autoRepair"] = "NONE", ["autoRepair"] = "NONE",
+245 -155
View File
@@ -1,6 +1,5 @@
local E, L, V, P, G = unpack(ElvUI); --Import: Engine, Locales, PrivateDB, ProfileDB, GlobalDB local E, L, V, P, G = unpack(ElvUI); --Import: Engine, Locales, PrivateDB, ProfileDB, GlobalDB
local AB = E:GetModule("ActionBars"); local AB = E:GetModule("ActionBars");
local ACD = LibStub("AceConfigDialog-3.0");
local group local group
--Cache global variables --Cache global variables
@@ -20,11 +19,14 @@ local points = {
["BOTTOMRIGHT"] = "BOTTOMRIGHT" ["BOTTOMRIGHT"] = "BOTTOMRIGHT"
} }
local ACD = LibStub("AceConfigDialog-3.0")
local function BuildABConfig() local function BuildABConfig()
group["general"] = { group["general"] = {
order = 1, order = 1,
type = "group", type = "group",
name = L["General Options"], name = L["General Options"],
childGroups = "tab",
disabled = function() return not E.private.actionbar.enable end, disabled = function() return not E.private.actionbar.enable end,
args = { args = {
info = { info = {
@@ -202,7 +204,7 @@ local function BuildABConfig()
} }
} }
group["barPet"] = { group["barPet"] = {
order = 6, order = 2,
name = L["Pet Bar"], name = L["Pet Bar"],
type = "group", type = "group",
guiInline = false, guiInline = false,
@@ -329,7 +331,7 @@ local function BuildABConfig()
} }
} }
group["stanceBar"] = { group["stanceBar"] = {
order = 7, order = 3,
name = L["Stance Bar"], name = L["Stance Bar"],
type = "group", type = "group",
guiInline = false, guiInline = false,
@@ -467,7 +469,7 @@ local function BuildABConfig()
} }
} }
group["microbar"] = { group["microbar"] = {
order = 8, order = 4,
type = "group", type = "group",
name = L["Micro Bar"], name = L["Micro Bar"],
get = function(info) return E.db.actionbar.microbar[ info[getn(info)] ] end, get = function(info) return E.db.actionbar.microbar[ info[getn(info)] ] end,
@@ -537,156 +539,155 @@ local function BuildABConfig()
} }
} }
} }
end for i = 1, 5 do
local name = L["Bar "]..i
local function BuildBarConfig(i) group["bar"..i] = {
local name = L["Bar "]..i order = 4 + i,
group["bar"..i] = { name = name,
order = 1 + i, type = "group",
name = name, disabled = function() return not E.private.actionbar.enable end,
type = "group", get = function(info) return E.db.actionbar["bar"..i][ info[getn(info)] ] end,
disabled = function() return not E.private.actionbar.enable end, set = function(info, value)
get = function(info) return E.db.actionbar["bar"..i][ info[getn(info)] ] end, E.db.actionbar["bar"..i][ info[getn(info)] ] = value
set = function(info, value) AB:PositionAndSizeBar("bar"..i)
E.db.actionbar["bar"..i][ info[getn(info)] ] = value end,
AB:PositionAndSizeBar("bar"..i) args = {
end, info = {
args = { order = 1,
info = { type = "header",
order = 1, name = name
type = "header", },
name = name enabled = {
}, order = 2,
enabled = { type = "toggle",
order = 2, name = L["Enable"],
type = "toggle", set = function(info, value)
name = L["Enable"], E.db.actionbar["bar"..i][ info[getn(info)] ] = value
set = function(info, value) AB:PositionAndSizeBar("bar"..i)
E.db.actionbar["bar"..i][ info[getn(info)] ] = value end
AB:PositionAndSizeBar("bar"..i) },
end restorePosition = {
}, order = 3,
restorePosition = { type = "execute",
order = 3, name = L["Restore Bar"],
type = "execute", desc = L["Restore the actionbars default settings"],
name = L["Restore Bar"], func = function()
desc = L["Restore the actionbars default settings"], E:CopyTable(E.db.actionbar["bar"..i], P.actionbar["bar"..i])
func = function() E:ResetMovers(L["Bar "..i]) AB:PositionAndSizeBar("bar"..i)
E:CopyTable(E.db.actionbar["bar"..i], P.actionbar["bar"..i]) end,
E:ResetMovers(L["Bar "..i]) AB:PositionAndSizeBar("bar"..i) disabled = function() return not E.db.actionbar["bar"..i].enabled end
end, },
disabled = function() return not E.db.actionbar["bar"..i].enabled end spacer = {
}, order = 4,
spacer = { type = "description",
order = 4, name = " "
type = "description", },
name = " " backdrop = {
}, order = 5,
backdrop = { type = "toggle",
order = 5, name = L["Backdrop"],
type = "toggle", desc = L["Toggles the display of the actionbars backdrop."],
name = L["Backdrop"], disabled = function() return not E.db.actionbar["bar"..i].enabled end
desc = L["Toggles the display of the actionbars backdrop."], },
disabled = function() return not E.db.actionbar["bar"..i].enabled end showGrid = {
}, order = 6,
showGrid = { type = "toggle",
order = 6, name = L["Show Empty Buttons"],
type = "toggle", set = function(info, value)
name = L["Show Empty Buttons"], E.db.actionbar["bar"..i][ info[getn(info)] ] = value
set = function(info, value) AB:UpdateButtonSettingsForBar("bar"..i)
E.db.actionbar["bar"..i][ info[getn(info)] ] = value end,
AB:UpdateButtonSettingsForBar("bar"..i) disabled = function() return not E.db.actionbar["bar"..i].enabled end
end, },
disabled = function() return not E.db.actionbar["bar"..i].enabled end mouseover = {
}, order = 7,
mouseover = { type = "toggle",
order = 7, name = L["Mouse Over"],
type = "toggle", desc = L["The frame is not shown unless you mouse over the frame."],
name = L["Mouse Over"], disabled = function() return not E.db.actionbar["bar"..i].enabled end
desc = L["The frame is not shown unless you mouse over the frame."], },
disabled = function() return not E.db.actionbar["bar"..i].enabled end inheritGlobalFade = {
}, order = 8,
inheritGlobalFade = { type = "toggle",
order = 8, name = L["Inherit Global Fade"],
type = "toggle", desc = L["Inherit the global fade, mousing over, targetting, setting focus, losing health, entering combat will set the remove transparency. Otherwise it will use the transparency level in the general actionbar settings for global fade alpha."],
name = L["Inherit Global Fade"], disabled = function() return not E.db.actionbar["bar"..i].enabled end
desc = L["Inherit the global fade, mousing over, targetting, setting focus, losing health, entering combat will set the remove transparency. Otherwise it will use the transparency level in the general actionbar settings for global fade alpha."], },
disabled = function() return not E.db.actionbar["bar"..i].enabled end point = {
}, order = 9,
point = { type = "select",
order = 9, name = L["Anchor Point"],
type = "select", desc = L["The first button anchors itself to this point on the bar."],
name = L["Anchor Point"], values = points,
desc = L["The first button anchors itself to this point on the bar."], disabled = function() return not E.db.actionbar["bar"..i].enabled end
values = points, },
disabled = function() return not E.db.actionbar["bar"..i].enabled end buttons = {
}, order = 10,
buttons = { type = "range",
order = 10, name = L["Buttons"],
type = "range", desc = L["The amount of buttons to display."],
name = L["Buttons"], min = 1, max = NUM_ACTIONBAR_BUTTONS, step = 1,
desc = L["The amount of buttons to display."], disabled = function() return not E.db.actionbar["bar"..i].enabled end
min = 1, max = NUM_ACTIONBAR_BUTTONS, step = 1, },
disabled = function() return not E.db.actionbar["bar"..i].enabled end buttonsPerRow = {
}, order = 11,
buttonsPerRow = { type = "range",
order = 11, name = L["Buttons Per Row"],
type = "range", desc = L["The amount of buttons to display per row."],
name = L["Buttons Per Row"], min = 1, max = NUM_ACTIONBAR_BUTTONS, step = 1,
desc = L["The amount of buttons to display per row."], disabled = function() return not E.db.actionbar["bar"..i].enabled end
min = 1, max = NUM_ACTIONBAR_BUTTONS, step = 1, },
disabled = function() return not E.db.actionbar["bar"..i].enabled end buttonsize = {
}, order = 12,
buttonsize = { type = "range",
order = 12, name = L["Button Size"],
type = "range", desc = L["The size of the action buttons."],
name = L["Button Size"], min = 15, max = 60, step = 1,
desc = L["The size of the action buttons."], disabled = function() return not E.db.actionbar["bar"..i].enabled end
min = 15, max = 60, step = 1, },
disabled = function() return not E.db.actionbar["bar"..i].enabled end buttonspacing = {
}, order = 13,
buttonspacing = { type = "range",
order = 13, name = L["Button Spacing"],
type = "range", desc = L["The spacing between buttons."],
name = L["Button Spacing"], min = -1, max = 10, step = 1,
desc = L["The spacing between buttons."], disabled = function() return not E.db.actionbar["bar"..i].enabled end
min = -1, max = 10, step = 1, },
disabled = function() return not E.db.actionbar["bar"..i].enabled end backdropSpacing = {
}, order = 14,
backdropSpacing = { type = "range",
order = 14, name = L["Backdrop Spacing"],
type = "range", desc = L["The spacing between the backdrop and the buttons."],
name = L["Backdrop Spacing"], min = 0, max = 10, step = 1,
desc = L["The spacing between the backdrop and the buttons."], disabled = function() return not E.db.actionbar["bar"..i].enabled end
min = 0, max = 10, step = 1, },
disabled = function() return not E.db.actionbar["bar"..i].enabled end heightMult = {
}, order = 15,
heightMult = { type = "range",
order = 15, name = L["Height Multiplier"],
type = "range", desc = L["Multiply the backdrops height or width by this value. This is usefull if you wish to have more than one bar behind a backdrop."],
name = L["Height Multiplier"], min = 1, max = 5, step = 1,
desc = L["Multiply the backdrops height or width by this value. This is usefull if you wish to have more than one bar behind a backdrop."], disabled = function() return not E.db.actionbar["bar"..i].enabled end
min = 1, max = 5, step = 1, },
disabled = function() return not E.db.actionbar["bar"..i].enabled end widthMult = {
}, order = 16,
widthMult = { type = "range",
order = 16, name = L["Width Multiplier"],
type = "range", desc = L["Multiply the backdrops height or width by this value. This is usefull if you wish to have more than one bar behind a backdrop."],
name = L["Width Multiplier"], min = 1, max = 5, step = 1,
desc = L["Multiply the backdrops height or width by this value. This is usefull if you wish to have more than one bar behind a backdrop."], disabled = function() return not E.db.actionbar["bar"..i].enabled end
min = 1, max = 5, step = 1, },
disabled = function() return not E.db.actionbar["bar"..i].enabled end alpha = {
}, order = 17,
alpha = { type = "range",
order = 17, name = L["Alpha"],
type = "range", isPercent = true,
name = L["Alpha"], min = 0, max = 1, step = 0.01,
isPercent = true, disabled = function() return not E.db.actionbar["bar"..i].enabled end
min = 0, max = 1, step = 0.01, }
disabled = function() return not E.db.actionbar["bar"..i].enabled end
} }
} }
} end
end end
E.Options.args.actionbar = { E.Options.args.actionbar = {
@@ -708,10 +709,99 @@ E.Options.args.actionbar = {
type = "description", type = "description",
name = L["ACTIONBARS_DESC"] name = L["ACTIONBARS_DESC"]
}, },
header = {
order = 3,
type = "header",
name = L["Shortcuts"],
},
spacer1 = {
order = 4,
type = "description",
name = " ",
},
generalShortcut = {
order = 5,
type = "execute",
name = L["General"],
buttonElvUI = true,
func = function() ACD:SelectGroup("ElvUI", "actionbar", "general") end,
disabled = function() return not E.ActionBars end,
},
petBarShortcut = {
order = 6,
type = "execute",
name = L["Pet Bar"],
buttonElvUI = true,
func = function() ACD:SelectGroup("ElvUI", "actionbar", "barPet") end,
disabled = function() return not E.ActionBars end,
},
stanceBarShortcut = {
order = 7,
type = "execute",
name = L["Stance Bar"],
buttonElvUI = true,
func = function() ACD:SelectGroup("ElvUI", "actionbar", "stanceBar") end,
disabled = function() return not E.ActionBars end,
},
spacer2 = {
order = 8,
type = "description",
name = " ",
},
microbarShortcut = {
order = 9,
type = "execute",
name = L["Micro Bar"],
buttonElvUI = true,
func = function() ACD:SelectGroup("ElvUI", "actionbar", "microbar") end,
disabled = function() return not E.ActionBars end,
},
bar1Shortcut = {
order = 10,
type = "execute",
name = L["Bar "]..1,
buttonElvUI = true,
func = function() ACD:SelectGroup("ElvUI", "actionbar", "bar1") end,
disabled = function() return not E.ActionBars end,
},
bar2Shortcut = {
order = 11,
type = "execute",
name = L["Bar "]..2,
buttonElvUI = true,
func = function() ACD:SelectGroup("ElvUI", "actionbar", "bar2") end,
disabled = function() return not E.ActionBars end,
},
spacer3 = {
order = 12,
type = "description",
name = " ",
},
bar3Shortcut = {
order = 13,
type = "execute",
name = L["Bar "]..3,
buttonElvUI = true,
func = function() ACD:SelectGroup("ElvUI", "actionbar", "bar3") end,
disabled = function() return not E.ActionBars end,
},
bar4Shortcut = {
order = 14,
type = "execute",
name = L["Bar "]..4,
buttonElvUI = true,
func = function() ACD:SelectGroup("ElvUI", "actionbar", "bar4") end,
disabled = function() return not E.ActionBars end,
},
bar5Shortcut = {
order = 15,
type = "execute",
name = L["Bar "]..5,
buttonElvUI = true,
func = function() ACD:SelectGroup("ElvUI", "actionbar", "bar5") end,
disabled = function() return not E.ActionBars end,
}
} }
} }
group = E.Options.args.actionbar.args group = E.Options.args.actionbar.args
BuildABConfig() BuildABConfig()
for i = 1, 5 do
BuildBarConfig(i)
end
+9 -15
View File
@@ -127,14 +127,8 @@ E.Options.args.general = {
name = L["Hide Error Text"], name = L["Hide Error Text"],
desc = L["Hides the red error text at the top of the screen while in combat."] desc = L["Hides the red error text at the top of the screen while in combat."]
}, },
taintLog = {
order = 13,
type = "toggle",
name = L["Log Taints"],
desc = L["Send ADDON_ACTION_BLOCKED errors to the Lua Error frame. These errors are less important in most cases and will not effect your game performance. Also a lot of these errors cannot be fixed. Please only report these errors if you notice a Defect in gameplay."]
},
bottomPanel = { bottomPanel = {
order = 14, order = 13,
type = "toggle", type = "toggle",
name = L["Bottom Panel"], name = L["Bottom Panel"],
desc = L["Display a panel across the bottom of the screen. This is for cosmetic only."], desc = L["Display a panel across the bottom of the screen. This is for cosmetic only."],
@@ -142,7 +136,7 @@ E.Options.args.general = {
set = function(info, value) E.db.general.bottomPanel = value; E:GetModule("Layout"):BottomPanelVisibility(); end set = function(info, value) E.db.general.bottomPanel = value; E:GetModule("Layout"):BottomPanelVisibility(); end
}, },
topPanel = { topPanel = {
order = 15, order = 14,
type = "toggle", type = "toggle",
name = L["Top Panel"], name = L["Top Panel"],
desc = L["Display a panel across the top of the screen. This is for cosmetic only."], desc = L["Display a panel across the top of the screen. This is for cosmetic only."],
@@ -150,7 +144,7 @@ E.Options.args.general = {
set = function(info, value) E.db.general.topPanel = value; E:GetModule("Layout"):TopPanelVisibility(); end set = function(info, value) E.db.general.topPanel = value; E:GetModule("Layout"):TopPanelVisibility(); end
}, },
afk = { afk = {
order = 16, order = 15,
type = "toggle", type = "toggle",
name = L["AFK Mode"], name = L["AFK Mode"],
desc = L["When you go AFK display the AFK screen."], desc = L["When you go AFK display the AFK screen."],
@@ -158,13 +152,13 @@ E.Options.args.general = {
set = function(info, value) E.db.general.afk = value; E:GetModule("AFK"):Toggle(); end set = function(info, value) E.db.general.afk = value; E:GetModule("AFK"):Toggle(); end
}, },
enhancedPvpMessages = { enhancedPvpMessages = {
order = 17, order = 16,
type = "toggle", type = "toggle",
name = L["Enhanced PVP Messages"], name = L["Enhanced PVP Messages"],
desc = L["Display battleground messages in the middle of the screen."], desc = L["Display battleground messages in the middle of the screen."],
}, },
raidUtility = { raidUtility = {
order = 18, order = 17,
type = "toggle", type = "toggle",
name = RAID_CONTROL, name = RAID_CONTROL,
desc = L["Enables the ElvUI Raid Control panel."], desc = L["Enables the ElvUI Raid Control panel."],
@@ -172,7 +166,7 @@ E.Options.args.general = {
set = function(info, value) E.private.general.raidUtility = value; E:StaticPopup_Show("PRIVATE_RL") end set = function(info, value) E.private.general.raidUtility = value; E:StaticPopup_Show("PRIVATE_RL") end
}, },
autoScale = { autoScale = {
order = 19, order = 18,
name = L["Auto Scale"], name = L["Auto Scale"],
desc = L["Automatically scale the User Interface based on your screen resolution"], desc = L["Automatically scale the User Interface based on your screen resolution"],
type = "toggle", type = "toggle",
@@ -180,7 +174,7 @@ E.Options.args.general = {
set = function(info, value) E.global.general[ info[getn(info)] ] = value; E:StaticPopup_Show("GLOBAL_RL") end set = function(info, value) E.global.general[ info[getn(info)] ] = value; E:StaticPopup_Show("GLOBAL_RL") end
}, },
minUiScale = { minUiScale = {
order = 20, order = 19,
type = "range", type = "range",
name = L["Lowest Allowed UI Scale"], name = L["Lowest Allowed UI Scale"],
min = 0.32, max = 0.64, step = 0.01, min = 0.32, max = 0.64, step = 0.01,
@@ -188,7 +182,7 @@ E.Options.args.general = {
set = function(info, value) E.global.general.minUiScale = value; E:StaticPopup_Show("GLOBAL_RL"); end set = function(info, value) E.global.general.minUiScale = value; E:StaticPopup_Show("GLOBAL_RL"); end
}, },
numberPrefixStyle = { numberPrefixStyle = {
order = 21, order = 20,
type = "select", type = "select",
name = L["Number Prefix"], name = L["Number Prefix"],
get = function(info) return E.db.general.numberPrefixStyle; end, get = function(info) return E.db.general.numberPrefixStyle; end,
@@ -202,7 +196,7 @@ E.Options.args.general = {
} }
}, },
decimalLength = { decimalLength = {
order = 22, order = 21,
type = "range", type = "range",
name = L["Decimal Length"], name = L["Decimal Length"],
desc = L["Controls the amount of decimals used in values displayed on elements like NamePlates and UnitFrames."], desc = L["Controls the amount of decimals used in values displayed on elements like NamePlates and UnitFrames."],
@@ -1107,7 +1107,8 @@ local function FeedOptions(appName, options,container,rootframe,path,group,inlin
control:SetImageSize(width, height) control:SetImageSize(width, height)
control:SetLabel(name) control:SetLabel(name)
else else
control = gui:Create("Button") local buttonElvUI = GetOptionsMemberValue("buttonElvUI",v, options, path, appName)
control = gui:Create(buttonElvUI and "Button-ElvUI" or "Button")
control:SetText(name) control:SetText(name)
end end
control:SetCallback("OnClick",ActivateControl) control:SetCallback("OnClick",ActivateControl)
@@ -91,6 +91,8 @@ local basekeys={
func=optmethodfalse, func=optmethodfalse,
arg={["*"]=true}, arg={["*"]=true},
width=optstring, width=optstring,
-- below here were created by ElvUI --
buttonElvUI=optmethodbool,
} }
local typedkeys={ local typedkeys={
@@ -24,70 +24,70 @@ local function lockTooltip()
GameTooltip:SetText(" ") GameTooltip:SetText(" ")
GameTooltip:Show() GameTooltip:Show()
end end
local function dragdrop_OnMouseDown(frame, ...) local function dragdrop_OnMouseDown(...)
if frame.obj.dragOnMouseDown then if this.obj.dragOnMouseDown then
dragdropButton.mouseDownFrame = frame dragdropButton.mouseDownFrame = this
dragdropButton:SetText(frame.obj.value or "Unknown") dragdropButton:SetText(this.obj.value or "Unknown")
dragdropButton:SetWidth(frame:GetWidth()) dragdropButton:SetWidth(this:GetWidth())
dragdropButton:SetHeight(frame:SetHeight()) dragdropButton:SetHeight(this:SetHeight())
frame.obj.dragOnMouseDown(frame, unpack(arg)) this.obj.dragOnMouseDown(this, unpack(arg))
end end
end end
local function dragdrop_OnMouseUp(frame, ...) local function dragdrop_OnMouseUp(...)
if frame.obj.dragOnMouseUp then if this.obj.dragOnMouseUp then
frame:SetAlpha(1) this:SetAlpha(1)
GameTooltip:Hide() GameTooltip:Hide()
dragdropButton:Hide() dragdropButton:Hide()
if dragdropButton.enteredFrame and dragdropButton.enteredFrame ~= frame and dragdropButton.enteredFrame:IsMouseOver() then if dragdropButton.enteredFrame and dragdropButton.enteredFrame ~= this and dragdropButton.enteredFrame:IsMouseOver() then
frame.obj.dragOnMouseUp(frame, unpack(arg)) this.obj.dragOnMouseUp(this, unpack(arg))
frame.obj.ActivateMultiControl(frame.obj, unpack(arg)) this.obj.ActivateMultiControl(this.obj, unpack(arg))
end end
dragdropButton.enteredFrame = nil dragdropButton.enteredFrame = nil
dragdropButton.mouseDownFrame = nil dragdropButton.mouseDownFrame = nil
end end
end end
local function dragdrop_OnLeave(frame, ...) local function dragdrop_OnLeave(...)
if frame.obj.dragOnLeave then if this.obj.dragOnLeave then
if dragdropButton.mouseDownFrame then if dragdropButton.mouseDownFrame then
lockTooltip() lockTooltip()
end end
if frame == dragdropButton.mouseDownFrame then if this == dragdropButton.mouseDownFrame then
frame:SetAlpha(0) this:SetAlpha(0)
dragdropButton:Show() dragdropButton:Show()
frame.obj.dragOnLeave(frame, unpack(arg)) this.obj.dragOnLeave(this, unpack(arg))
end end
end end
end end
local function dragdrop_OnEnter(frame, ...) local function dragdrop_OnEnter(...)
if frame.obj.dragOnEnter and dragdropButton:IsShown() then if this.obj.dragOnEnter and dragdropButton:IsShown() then
dragdropButton.enteredFrame = frame dragdropButton.enteredFrame = this
lockTooltip() lockTooltip()
frame.obj.dragOnEnter(frame, unpack(arg)) this.obj.dragOnEnter(this, unpack(arg))
end end
end end
local function dragdrop_OnClick(frame, ...) local function dragdrop_OnClick()
local button = unpack(arg) local button = arg1
if frame.obj.dragOnClick and button == "RightButton" then if this.obj.dragOnClick and button == "RightButton" then
frame.obj.dragOnClick(frame, unpack(arg)) this.obj.dragOnClick(this, button)
frame.obj.ActivateMultiControl(frame.obj, unpack(arg)) this.obj.ActivateMultiControl(this.obj, button)
elseif frame.obj.stateSwitchOnClick and (button == "LeftButton") and IsShiftKeyDown() then elseif this.obj.stateSwitchOnClick and (button == "LeftButton") and IsShiftKeyDown() then
frame.obj.stateSwitchOnClick(frame, unpack(arg)) this.obj.stateSwitchOnClick(this, button)
frame.obj.ActivateMultiControl(frame.obj, unpack(arg)) this.obj.ActivateMultiControl(this.obj, button)
end end
end end
local function Button_OnClick(frame, ...) local function Button_OnClick()
AceGUI:ClearFocus() AceGUI:ClearFocus()
PlaySound("igMainMenuOption") PlaySound("igMainMenuOption")
frame.obj:Fire("OnClick", unpack(arg)) this.obj:Fire("OnClick", 2, arg1)
end end
local function Control_OnEnter(frame) local function Control_OnEnter()
frame.obj:Fire("OnEnter") this.obj:Fire("OnEnter")
end end
local function Control_OnLeave(frame) local function Control_OnLeave()
frame.obj:Fire("OnLeave") this.obj:Fire("OnLeave")
end end
--[[----------------------------------------------------------------------------- --[[-----------------------------------------------------------------------------
@@ -139,7 +139,6 @@ local function Constructor()
local frame = CreateFrame("Button", name, UIParent, "UIPanelButtonTemplate") local frame = CreateFrame("Button", name, UIParent, "UIPanelButtonTemplate")
frame:Hide() frame:Hide()
frame:EnableMouse(true) frame:EnableMouse(true)
frame:RegisterForClicks("AnyUp")
frame:SetScript("OnClick", Button_OnClick) frame:SetScript("OnClick", Button_OnClick)
frame:SetScript("OnEnter", Control_OnEnter) frame:SetScript("OnEnter", Control_OnEnter)
frame:SetScript("OnLeave", Control_OnLeave) frame:SetScript("OnLeave", Control_OnLeave)
@@ -153,11 +152,11 @@ local function Constructor()
dragdropButton:Hide() dragdropButton:Hide()
ElvUI[1]:GetModule('Skins'):HandleButton(dragdropButton) ElvUI[1]:GetModule('Skins'):HandleButton(dragdropButton)
end end
frame:HookScript("OnClick", dragdrop_OnClick) HookScript(frame, "OnClick", dragdrop_OnClick)
frame:HookScript("OnEnter", dragdrop_OnEnter) HookScript(frame, "OnEnter", dragdrop_OnEnter)
frame:HookScript("OnLeave", dragdrop_OnLeave) HookScript(frame, "OnLeave", dragdrop_OnLeave)
frame:HookScript("OnMouseUp", dragdrop_OnMouseUp) HookScript(frame, "OnMouseUp", dragdrop_OnMouseUp)
frame:HookScript("OnMouseDown", dragdrop_OnMouseDown) HookScript(frame, "OnMouseDown", dragdrop_OnMouseDown)
local text = frame:GetFontString() local text = frame:GetFontString()
text:ClearAllPoints() text:ClearAllPoints()
@@ -12,6 +12,7 @@
<Script file="AceGUIContainer-Window.lua"/> <Script file="AceGUIContainer-Window.lua"/>
<!-- Widgets --> <!-- Widgets -->
<Script file="AceGUIWidget-Button.lua"/> <Script file="AceGUIWidget-Button.lua"/>
<Script file="AceGUIWidget-Button-ElvUI.lua"/>
<Script file="AceGUIWidget-CheckBox.lua"/> <Script file="AceGUIWidget-CheckBox.lua"/>
<Script file="AceGUIWidget-ColorPicker.lua"/> <Script file="AceGUIWidget-ColorPicker.lua"/>
<Script file="AceGUIWidget-DropDown.lua"/> <Script file="AceGUIWidget-DropDown.lua"/>