This commit is contained in:
Bunny67
2017-12-24 14:58:38 +03:00
parent 0c806135f7
commit d0697d9a8f
22 changed files with 3534 additions and 126 deletions
@@ -354,7 +354,7 @@ function S:SkinAce3()
button.toggle.SetPushedTexture = E.noop button.toggle.SetPushedTexture = E.noop
button.toggleText = button.toggle:CreateFontString(nil, "OVERLAY") button.toggleText = button.toggle:CreateFontString(nil, "OVERLAY")
E:FontTemplate(button.toggleText, nil, 19) E:FontTemplate(button.toggleText, nil, 19)
-- button.toggleText:SetPoint("CENTER") button.toggleText:SetPoint("CENTER", 0, 0)
button.toggleText:SetText("+") button.toggleText:SetText("+")
return button return button
end end
+2 -10
View File
@@ -29,17 +29,9 @@ local GetNumPartyMembers = GetNumPartyMembers
local GetNumRaidMembers = GetNumRaidMembers local GetNumRaidMembers = GetNumRaidMembers
local UnitIsUnit = UnitIsUnit local UnitIsUnit = UnitIsUnit
local SetTooltipMoney = SetTooltipMoney local SetTooltipMoney = SetTooltipMoney
local TARGET = TARGET
local DEAD = DEAD
local RAID_CLASS_COLORS = RAID_CLASS_COLORS
local CUSTOM_CLASS_COLORS = CUSTOM_CLASS_COLORS
local FACTION_ALLIANCE = FACTION_ALLIANCE
local FACTION_HORDE = FACTION_HORDE
local LEVEL = LEVEL
local FACTION_BAR_COLORS = FACTION_BAR_COLORS
local ID = ID
local targetList = {} local targetList = {}
local TAPPED_COLOR = {r = 0.6, g = 0.6, b = 0.6}
local classification = { local classification = {
worldboss = format("|cffAF5050 %s|r", BOSS), worldboss = format("|cffAF5050 %s|r", BOSS),
@@ -236,7 +228,7 @@ function TT:GameTooltipStatusBar_OnValueChanged()
local _, max = this:GetMinMaxValues() local _, max = this:GetMinMaxValues()
if arg1 > 0 and max == 1 then if arg1 > 0 and max == 1 then
this.text:SetFormattedText("%d%%", floor(arg1 * 100)); this.text:SetText(format("%d%%", floor(arg1 * 100)))
this:SetStatusBarColor(TAPPED_COLOR.r, TAPPED_COLOR.g, TAPPED_COLOR.b) --most effeciant? this:SetStatusBarColor(TAPPED_COLOR.r, TAPPED_COLOR.g, TAPPED_COLOR.b) --most effeciant?
elseif arg1 == 0 then elseif arg1 == 0 then
this.text:SetText(DEAD) this.text:SetText(DEAD)
+1 -2
View File
@@ -319,7 +319,6 @@ P["unitframe"] = {
["fontOutline"] = "MONOCHROMEOUTLINE", ["fontOutline"] = "MONOCHROMEOUTLINE",
["OORAlpha"] = 0.35, ["OORAlpha"] = 0.35,
["debuffHighlighting"] = "FILL", ["debuffHighlighting"] = "FILL",
["smartRaidFilter"] = true,
["targetOnMouseDown"] = false, ["targetOnMouseDown"] = false,
["auraBlacklistModifier"] = "SHIFT", ["auraBlacklistModifier"] = "SHIFT",
["thinBorders"] = false, ["thinBorders"] = false,
@@ -2364,7 +2363,7 @@ P["actionbar"] = {
["showGrid"] = true, ["showGrid"] = true,
}, },
["bar6"] = { ["bar6"] = {
["enabled"] = false, ["enabled"] = true,
["mouseover"] = false, ["mouseover"] = false,
["buttons"] = 12, ["buttons"] = 12,
["buttonsPerRow"] = 12, ["buttonsPerRow"] = 12,
+560
View File
@@ -0,0 +1,560 @@
local E, L, V, P, G = unpack(ElvUI); --Import: Engine, Locales, PrivateDB, ProfileDB, GlobalDB
local AB = E:GetModule("ActionBars");
local ACD = LibStub("AceConfigDialog-3.0");
local group
--Cache global variables
--Lua functions
local _G = _G
local getn = table.getn
--WoW API / Variables
local SetCVar = SetCVar
local GameTooltip = _G["GameTooltip"]
local NONE, COLOR = NONE, COLOR
local LOCK_ACTIONBAR_TEXT = LOCK_ACTIONBAR_TEXT
local points = {
["TOPLEFT"] = "TOPLEFT",
["TOPRIGHT"] = "TOPRIGHT",
["BOTTOMLEFT"] = "BOTTOMLEFT",
["BOTTOMRIGHT"] = "BOTTOMRIGHT"
}
local function BuildABConfig()
group["general"] = {
order = 1,
type = "group",
name = L["General Options"],
childGroups = "tab",
disabled = function() return not E.private.actionbar.enable end,
args = {
info = {
order = 1,
type = "header",
name = L["General Options"]
},
toggleKeybind = {
order = 2,
type = "execute",
name = L["Keybind Mode"],
func = function()
AB:ActivateBindMode()
E:ToggleConfig()
GameTooltip:Hide()
end
},
cooldownText = {
order = 3,
type = "execute",
name = L["Cooldown Text"],
func = function() ACD:SelectGroup("ElvUI", "general", "cooldown") end
},
spacer = {
order = 4,
type = "description",
name = ""
},
macrotext = {
order = 5,
type = "toggle",
name = L["Macro Text"],
desc = L["Display macro names on action buttons."]
},
hotkeytext = {
order = 6,
type = "toggle",
name = L["Keybind Text"],
desc = L["Display bind names on action buttons."]
},
keyDown = {
order = 8,
type = "toggle",
name = L["Key Down"],
desc = "OPTION_TOOLTIP_ACTION_BUTTON_USE_KEY_DOWN"
},
lockActionBars = {
order = 9,
type = "toggle",
name = LOCK_ACTIONBAR_TEXT,
desc = L["If you unlock actionbars then trying to move a spell might instantly cast it if you cast spells on key press instead of key release."],
set = function(info, value)
E.db.actionbar[ info[getn(info)] ] = value
AB:UpdateButtonSettings()
SetCVar("lockActionBars", (value == true and 1 or 0))
LOCK_ACTIONBAR = (value == true and "1" or "0")
end
},
movementModifier = {
order = 10,
type = "select",
name = L["Pick Up Action Key"],
desc = L["The button you must hold down in order to drag an ability to another action button."],
disabled = function() return (not E.private.actionbar.enable or not E.db.actionbar.lockActionBars) end,
values = {
["NONE"] = NONE,
["SHIFT"] = "SHIFT_KEY",
["ALT"] = "ALT_KEY",
["CTRL"] = "CTRL_KEY"
}
},
globalFadeAlpha = {
order = 11,
type = "range",
name = L["Global Fade Transparency"],
desc = L["Transparency level when not in combat, no target exists, full health, not casting, and no focus target exists."],
min = 0, max = 1, step = 0.01,
isPercent = true,
set = function(info, value) E.db.actionbar[ info[getn(info)] ] = value AB.fadeParent:SetAlpha(1-value) end
},
colorGroup = {
order = 12,
type = "group",
name = "COLORS",
guiInline = true,
get = function(info)
local t = E.db.actionbar[ info[getn(info)] ]
local d = P.actionbar[ info[getn(info)] ]
return t.r, t.g, t.b, t.a, d.r, d.g, d.b
end,
set = function(info, r, g, b)
local t = E.db.actionbar[ info[getn(info)] ]
t.r, t.g, t.b = r, g, b
tullaRange:LoadDefaults()
tullaRange.colors = TULLARANGE_COLORS
for button in pairs(tullaRange.buttonsToUpdate) do
button.tullaRangeColor = nil
tullaRange.UpdateButtonUsable(button)
end
end,
args = {
noRangeColor = {
order = 1,
type = "color",
name = L["Out of Range"],
desc = L["Color of the actionbutton when out of range."]
},
noPowerColor = {
order = 2,
type = "color",
name = L["Out of Power"],
desc = L["Color of the actionbutton when out of power (Mana, Rage, Focus, Holy Power)."]
},
usableColor = {
order = 3,
type = "color",
name = L["Usable"],
desc = L["Color of the actionbutton when usable."]
},
notUsableColor = {
order = 4,
type = "color",
name = L["Not Usable"],
desc = L["Color of the actionbutton when not usable."]
}
}
},
fontGroup = {
order = 13,
type = "group",
guiInline = true,
name = L["Fonts"],
args = {
font = {
order = 4,
type = "select", dialogControl = "LSM30_Font",
name = L["Font"],
values = AceGUIWidgetLSMlists.font
},
fontSize = {
order = 5,
type = "range",
name = "FONT_SIZE",
min = 4, max = 212, step = 1
},
fontOutline = {
order = 6,
type = "select",
name = L["Font Outline"],
desc = L["Set the font outline."],
values = {
["NONE"] = NONE,
["OUTLINE"] = "OUTLINE",
["MONOCHROMEOUTLINE"] = "MONOCROMEOUTLINE",
["THICKOUTLINE"] = "THICKOUTLINE"
}
},
fontColor = {
order = 7,
type = "color",
name = COLOR,
get = function(info)
local t = E.db.actionbar[ info[getn(info)] ]
local d = P.actionbar[ info[getn(info)] ]
return t.r, t.g, t.b, t.a, d.r, d.g, d.b
end,
set = function(info, r, g, b)
local t = E.db.actionbar[ info[getn(info)] ]
t.r, t.g, t.b = r, g, b
AB:UpdateButtonSettings()
end
}
}
}
}
}
group["microbar"] = {
order = 4,
type = "group",
name = L["Micro Bar"],
get = function(info) return E.db.actionbar.microbar[ info[getn(info)] ] end,
set = function(info, value) E.db.actionbar.microbar[ info[getn(info)] ] = value AB:UpdateMicroPositionDimensions() end,
disabled = function() return not E.private.actionbar.enable end,
args = {
info = {
order = 1,
type = "header",
name = L["Micro Bar"]
},
enabled = {
order = 2,
type = "toggle",
name = L["Enable"]
},
restorePosition = {
order = 3,
type = "execute",
name = L["Restore Bar"],
desc = L["Restore the actionbars default settings"],
func = function() E:CopyTable(E.db.actionbar["microbar"], P.actionbar["microbar"]) E:ResetMovers(L["Micro Bar"]) AB:UpdateMicroPositionDimensions() end,
disabled = function() return not E.db.actionbar.microbar.enabled end
},
spacer = {
order = 4,
type = "description",
name = " "
},
buttonsPerRow = {
order = 5,
type = "range",
name = L["Buttons Per Row"],
desc = L["The amount of buttons to display per row."],
min = 1, max = 8, step = 1,
disabled = function() return not E.db.actionbar.microbar.enabled end
},
xOffset = {
order = 6,
type = "range",
name = L["xOffset"],
min = -1, max = 10, step = 1,
disabled = function() return not E.db.actionbar.microbar.enabled end
},
yOffset = {
order = 7,
type = "range",
name = L["yOffset"],
min = -1, max = 10, step = 1,
disabled = function() return not E.db.actionbar.microbar.enabled end
},
alpha = {
order = 8,
type = "range",
isPercent = true,
name = L["Alpha"],
desc = L["Change the alpha level of the frame."],
min = 0, max = 1, step = 0.1,
disabled = function() return not E.db.actionbar.microbar.enabled end
},
mouseover = {
order = 9,
type = "toggle",
name = L["Mouse Over"],
desc = L["The frame is not shown unless you mouse over the frame."],
disabled = function() return not E.db.actionbar.microbar.enabled end
}
}
}
end
local function BuildBarConfig(i)
local name = L["Bar "]..i
group["bar"..i] = {
order = 7 + i,
name = name,
type = "group",
guiInline = false,
disabled = function() return not E.private.actionbar.enable end,
get = function(info) return E.db.actionbar["bar"..i][ info[getn(info)] ] end,
set = function(info, value)
E.db.actionbar["bar"..i][ info[getn(info)] ] = value
AB:PositionAndSizeBar("bar"..i)
end,
args = {
info = {
order = 1,
type = "header",
name = name
},
enabled = {
order = 2,
type = "toggle",
name = L["Enable"],
set = function(info, value)
E.db.actionbar["bar"..i][ info[getn(info)] ] = value
AB:PositionAndSizeBar("bar"..i)
end
},
restorePosition = {
order = 3,
type = "execute",
name = L["Restore Bar"],
desc = L["Restore the actionbars default settings"],
func = function()
E:CopyTable(E.db.actionbar["bar"..i], P.actionbar["bar"..i])
E:ResetMovers(L["Bar "..i]) AB:PositionAndSizeBar("bar"..i)
end,
disabled = function() return not E.db.actionbar["bar"..i].enabled end
},
spacer = {
order = 4,
type = "description",
name = " "
},
backdrop = {
order = 5,
type = "toggle",
name = L["Backdrop"],
desc = L["Toggles the display of the actionbars backdrop."],
disabled = function() return not E.db.actionbar["bar"..i].enabled end
},
showGrid = {
order = 6,
type = "toggle",
name = L["Show Empty Buttons"],
set = function(info, value)
E.db.actionbar["bar"..i][ info[getn(info)] ] = value
AB:UpdateButtonSettingsForBar("bar"..i)
end,
disabled = function() return not E.db.actionbar["bar"..i].enabled end
},
mouseover = {
order = 7,
type = "toggle",
name = L["Mouse Over"],
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,
type = "toggle",
name = L["Inherit Global Fade"],
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,
type = "select",
name = L["Anchor Point"],
desc = L["The first button anchors itself to this point on the bar."],
values = points,
disabled = function() return not E.db.actionbar["bar"..i].enabled end
},
buttons = {
order = 10,
type = "range",
name = L["Buttons"],
desc = L["The amount of buttons to display."],
min = 1, max = NUM_ACTIONBAR_BUTTONS, step = 1,
disabled = function() return not E.db.actionbar["bar"..i].enabled end
},
buttonsPerRow = {
order = 11,
type = "range",
name = L["Buttons Per Row"],
desc = L["The amount of buttons to display per row."],
min = 1, max = NUM_ACTIONBAR_BUTTONS, step = 1,
disabled = function() return not E.db.actionbar["bar"..i].enabled end
},
buttonsize = {
order = 12,
type = "range",
name = L["Button Size"],
desc = L["The size of the action buttons."],
min = 15, max = 60, step = 1,
disabled = function() return not E.db.actionbar["bar"..i].enabled end
},
buttonspacing = {
order = 13,
type = "range",
name = L["Button Spacing"],
desc = L["The spacing between buttons."],
min = -1, max = 10, step = 1,
disabled = function() return not E.db.actionbar["bar"..i].enabled end
},
backdropSpacing = {
order = 14,
type = "range",
name = L["Backdrop Spacing"],
desc = L["The spacing between the backdrop and the buttons."],
min = 0, max = 10, step = 1,
disabled = function() return not E.db.actionbar["bar"..i].enabled end
},
heightMult = {
order = 15,
type = "range",
name = L["Height Multiplier"],
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."],
min = 1, max = 5, step = 1,
disabled = function() return not E.db.actionbar["bar"..i].enabled end
},
widthMult = {
order = 16,
type = "range",
name = L["Width Multiplier"],
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."],
min = 1, max = 5, step = 1,
disabled = function() return not E.db.actionbar["bar"..i].enabled end
},
alpha = {
order = 17,
type = "range",
name = L["Alpha"],
isPercent = true,
min = 0, max = 1, step = 0.01,
disabled = function() return not E.db.actionbar["bar"..i].enabled end
}
}
}
end
E.Options.args.actionbar = {
type = "group",
name = L["ActionBars"],
childGroups = "tree",
get = function(info) return E.db.actionbar[ info[getn(info)] ] end,
set = function(info, value) E.db.actionbar[ info[getn(info)] ] = value AB:UpdateButtonSettings() end,
args = {
enable = {
order = 1,
type = "toggle",
name = L["Enable"],
get = function(info) return E.private.actionbar[ info[getn(info)] ] end,
set = function(info, value) E.private.actionbar[ info[getn(info)] ] = value E:StaticPopup_Show("PRIVATE_RL") end
},
intro = {
order = 2,
type = "description",
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.private.actionbar.enable 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.private.actionbar.enable 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.private.actionbar.enable 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.private.actionbar.enable 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.private.actionbar.enable 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.private.actionbar.enable 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.private.actionbar.enable 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.private.actionbar.enable 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.private.actionbar.enable end
},
spacer4 = {
order = 16,
type = "description",
name = " "
},
bar6Shortcut = {
order = 17,
type = "execute",
name = L["Bar "]..6,
--buttonElvUI = true,
func = function() ACD:SelectGroup("ElvUI", "actionbar", "bar6") end,
disabled = function() return not E.private.actionbar.enable end
}
}
}
group = E.Options.args.actionbar.args
BuildABConfig()
for i = 1, 5 do
BuildBarConfig(i)
end
+316
View File
@@ -0,0 +1,316 @@
local E, L, V, P, G, _ = unpack(ElvUI);
local A = E:GetModule("Auras");
local function GetAuraOptions(headerName)
local auraOptions = {
header = {
order = 0,
type = "header",
name = headerName
},
size = {
order = 1,
type = "range",
name = L["Size"],
desc = L["Set the size of the individual auras."],
min = 16, max = 60, step = 2
},
growthDirection = {
order = 2,
type = "select",
name = L["Growth Direction"],
desc = L["The direction the auras will grow and then the direction they will grow after they reach the wrap after limit."],
values = {
DOWN_RIGHT = format(L["%s and then %s"], L["Down"], L["Right"]),
DOWN_LEFT = format(L["%s and then %s"], L["Down"], L["Left"]),
UP_RIGHT = format(L["%s and then %s"], L["Up"], L["Right"]),
UP_LEFT = format(L["%s and then %s"], L["Up"], L["Left"]),
RIGHT_DOWN = format(L["%s and then %s"], L["Right"], L["Down"]),
RIGHT_UP = format(L["%s and then %s"], L["Right"], L["Up"]),
LEFT_DOWN = format(L["%s and then %s"], L["Left"], L["Down"]),
LEFT_UP = format(L["%s and then %s"], L["Left"], L["Up"])
}
},
wrapAfter = {
order = 3,
type = "range",
name = L["Wrap After"],
desc = L["Begin a new row or column after this many auras."],
min = 1, max = 32, step = 1
},
maxWraps = {
order = 4,
type = "range",
name = L["Max Wraps"],
desc = L["Limit the number of rows or columns."],
min = 1, max = 32, step = 1
},
horizontalSpacing = {
order = 5,
type = "range",
name = L["Horizontal Spacing"],
min = 0, max = 50, step = 1
},
verticalSpacing = {
order = 6,
type = "range",
name = L["Vertical Spacing"],
min = 0, max = 50, step = 1
},
sortMethod = {
order = 7,
type = "select",
name = L["Sort Method"],
desc = L["Defines how the group is sorted."],
values = {
["INDEX"] = L["Index"],
["TIME"] = L["Time"],
["NAME"] = L["Name"]
}
},
sortDir = {
order = 8,
type = "select",
name = L["Sort Direction"],
desc = L["Defines the sort order of the selected sort method."],
values = {
["+"] = L["Ascending"],
["-"] = L["Descending"]
}
},
seperateOwn = {
order = 9,
type = "select",
name = L["Seperate"],
desc = L["Indicate whether buffs you cast yourself should be separated before or after."],
values = {
[-1] = L["Other's First"],
[0] = L["No Sorting"],
[1] = L["Your Auras First"]
}
}
};
return auraOptions;
end
E.Options.args.auras = {
type = "group",
name = "BUFFOPTIONS_LABEL",
childGroups = "tab",
get = function(info) return E.db.auras[ info[getn(info)] ]; end,
set = function(info, value) E.db.auras[ info[getn(info)] ] = value; A:UpdateHeader(ElvUIPlayerBuffs); A:UpdateHeader(ElvUIPlayerDebuffs); end,
args = {
intro = {
order = 1,
type = "description",
name = L["AURAS_DESC"]
},
enable = {
order = 2,
type = "toggle",
name = L["Enable"],
get = function(info) return E.private.auras[ info[getn(info)] ]; end,
set = function(info, value)
E.private.auras[ info[getn(info)] ] = value;
E:StaticPopup_Show("PRIVATE_RL");
end,
},
disableBlizzard = {
order = 3,
type = "toggle",
name = L["Disabled Blizzard"],
get = function(info) return E.private.auras[ info[getn(info)] ] end,
set = function(info, value)
E.private.auras[ info[getn(info)] ] = value;
E:StaticPopup_Show("PRIVATE_RL");
end
},
general = {
order = 4,
type = "group",
name = L["General"],
args = {
header = {
order = 0,
type = "header",
name = L["General"]
},
fadeThreshold = {
order = 1,
type = "range",
name = L["Fade Threshold"],
desc = L["Threshold before text changes red, goes into decimal form, and the icon will fade. Set to -1 to disable."],
min = -1, max = 30, step = 1
},
font = {
order = 2,
type = "select", dialogControl = "LSM30_Font",
name = L["Font"],
values = AceGUIWidgetLSMlists.font
},
fontSize = {
order = 3,
name = L["Font Size"],
type = "range",
min = 6, max = 33, step = 1
},
fontOutline = {
order = 4,
name = L["Font Outline"],
desc = L["Set the font outline."],
type = "select",
values = {
["NONE"] = L["None"],
["OUTLINE"] = "OUTLINE",
["MONOCHROMEOUTLINE"] = "MONOCROMEOUTLINE",
["THICKOUTLINE"] = "THICKOUTLINE"
}
},
timeXOffset = {
order = 5,
type = "range",
name = L["Time xOffset"],
min = -60, max = 60, step = 1
},
timeYOffset = {
order = 6,
type = "range",
name = L["Time yOffset"],
min = -60, max = 60, step = 1
},
countXOffset = {
order = 7,
type = "range",
name = L["Count xOffset"],
min = -60, max = 60, step = 1
},
countYOffset = {
order = 8,
name = L["Count yOffset"],
type = "range",
min = -60, max = 60, step = 1
},
lbf = {
order = 9,
type = "group",
guiInline = true,
name = L["LBF Support"],
get = function(info) return E.private.auras.lbf[info[getn(info)]]; end,
set = function(info, value) E.private.auras.lbf[info[getn(info)]] = value; E:StaticPopup_Show("PRIVATE_RL"); end,
disabled = function() return not E.private.auras.enable; end,
args = {
enable = {
order = 1,
type = "toggle",
name = L["Enable"],
desc = L["Allow LBF to handle the skinning of this element."]
}
}
}
}
},
buffs = {
order = 5,
type = "group",
name = L["Buffs"],
get = function(info) return E.db.auras.buffs[ info[getn(info)] ]; end,
set = function(info, value) E.db.auras.buffs[ info[getn(info)] ] = value; A:UpdateHeader(ElvUIPlayerBuffs); end,
args = GetAuraOptions(L["Buffs"])
},
debuffs = {
order = 6,
type = "group",
name = L["Debuffs"],
get = function(info) return E.db.auras.debuffs[ info[getn(info)] ]; end,
set = function(info, value) E.db.auras.debuffs[ info[getn(info)] ] = value; A:UpdateHeader(ElvUIPlayerDebuffs); end,
args = GetAuraOptions(L["Debuffs"])
},
reminder = {
type = "group",
order = 7,
name = L["Reminder"],
get = function(info) return E.db.general.reminder[ info[getn(info)] ] end,
set = function(info, value) E.db.general.reminder[ info[getn(info)] ] = value; E:GetModule("ReminderBuffs"):UpdateSettings(); end,
disabled = function() return not E.private.general.minimap.enable end,
args = {
header = {
order = 0,
type = "header",
name = L["Reminder"]
},
enable = {
order = 1,
name = L["Enable"],
desc = L["Display reminder bar on the minimap."],
type = "toggle",
set = function(info, value) E.db.general.reminder[ info[getn(info)] ] = value; E:GetModule("Minimap"):UpdateSettings(); end
},
generalGroup = {
order = 2,
type = "group",
guiInline = true,
name = L["General"],
disabled = function() return not E.db.general.reminder.enable end,
args = {
durations = {
order = 1,
name = L["Remaining Time"],
type = "toggle"
},
reverse = {
order = 2,
name = L["Reverse Style"],
desc = L["When enabled active buff icons will light up instead of becoming darker, while inactive buff icons will become darker instead of being lit up."],
type = "toggle"
},
position = {
order = 3,
type = "select",
name = L["Position"],
set = function(info, value) E.db.general.reminder[ info[getn(info)] ] = value; E:GetModule("ReminderBuffs"):UpdatePosition(); end,
values = {
["LEFT"] = L["Left"],
["RIGHT"] = L["Right"]
},
},
},
},
fontGroup = {
order = 3,
type = "group",
guiInline = true,
name = L["Font"],
disabled = function() return not E.db.general.reminder.enable or not E.db.general.reminder.durations end,
args = {
font = {
type = "select", dialogControl = "LSM30_Font",
order = 1,
name = L["Font"],
values = AceGUIWidgetLSMlists.font
},
fontSize = {
order = 2,
name = L["Font Size"],
type = "range",
min = 6, max = 22, step = 1
},
fontOutline = {
order = 3,
name = L["Font Outline"],
desc = L["Set the font outline."],
type = "select",
values = {
["NONE"] = L["None"],
["OUTLINE"] = "OUTLINE",
["MONOCHROME"] = (not E.isMacClient) and "MONOCHROME" or nil,
["MONOCHROMEOUTLINE"] = "MONOCROMEOUTLINE",
["THICKOUTLINE"] = "THICKOUTLINE"
},
},
},
},
},
},
}
};
+435
View File
@@ -0,0 +1,435 @@
local E, L, V, P, G = unpack(ElvUI);
local B = E:GetModule("Bags");
E.Options.args.bags = {
type = "group",
name = L["Bags"],
childGroups = "tab",
get = function(info) return E.db.bags[ info[getn(info)] ]; end,
set = function(info, value) E.db.bags[ info[getn(info)] ] = value; end,
args = {
intro = {
order = 1,
type = "description",
name = L["BAGS_DESC"]
},
enable = {
order = 2,
type = "toggle",
name = L["Enable"],
desc = L["Enable/Disable the all-in-one bag."],
get = function(info) return E.private.bags.enable; end,
set = function(info, value) E.private.bags.enable = value; E:StaticPopup_Show("PRIVATE_RL"); end
},
general = {
order = 3,
type = "group",
name = L["General"],
disabled = function() return not E.bags; end,
args = {
header = {
order = 0,
type = "header",
name = L["General"]
},
currencyFormat = {
order = 1,
type = "select",
name = L["Currency Format"],
desc = L["The display format of the currency icons that get displayed below the main bag. (You have to be watching a currency for this to display)"],
values = {
["ICON"] = L["Icons Only"],
["ICON_TEXT"] = L["Icons and Text"],
["ICON_TEXT_ABBR"] = L["Icons and Text (Short)"]
},
set = function(info, value) E.db.bags[ info[getn(info)] ] = value; B:UpdateTokens(); end
},
moneyFormat = {
order = 2,
type = "select",
name = L["Money Format"],
desc = L["The display format of the money text that is shown at the top of the main bag."],
values = {
["SMART"] = L["Smart"],
["FULL"] = L["Full"],
["SHORT"] = L["Short"],
["SHORTINT"] = L["Short (Whole Numbers)"],
["CONDENSED"] = L["Condensed"],
["BLIZZARD"] = L["Blizzard Style"]
},
set = function(info, value) E.db.bags[ info[getn(info)] ] = value; B:UpdateGoldText(); end
},
moneyCoins = {
order = 3,
type = "toggle",
name = L["Show Coins"],
desc = L["Use coin icons instead of colored text."],
set = function(info, value) E.db.bags[ info[getn(info)] ] = value; B:UpdateGoldText(); end
},
clearSearchOnClose = {
order = 4,
type = "toggle",
name = L["Clear Search On Close"],
set = function(info, value) E.db.bags[info[getn(info)]] = value; end
},
disableBagSort = {
order = 5,
type = "toggle",
name = L["Disable Bag Sort"],
set = function(info, value) E.db.bags[info[getn(info)]] = value; B:ToggleSortButtonState(false); end
},
disableBankSort = {
order = 6,
type = "toggle",
name = L["Disable Bank Sort"],
set = function(info, value) E.db.bags[info[getn(info)]] = value; B:ToggleSortButtonState(true); end
},
countGroup = {
order = 7,
type = "group",
name = L["Item Count Font"],
guiInline = true,
args = {
countFont = {
order = 1,
type = "select",
dialogControl = "LSM30_Font",
name = L["Font"],
values = AceGUIWidgetLSMlists.font,
set = function(info, value) E.db.bags.countFont = value; B:UpdateCountDisplay(); end
},
countFontSize = {
order = 2,
type = "range",
name = L["Font Size"],
min = 4, max = 22, step = 1,
set = function(info, value) E.db.bags.countFontSize = value; B:UpdateCountDisplay(); end
},
countFontOutline = {
order = 3,
type = "select",
name = L["Font Outline"],
set = function(info, value) E.db.bags.countFontOutline = value; B:UpdateCountDisplay(); end,
values = {
["NONE"] = L["None"],
["OUTLINE"] = "OUTLINE",
["MONOCHROMEOUTLINE"] = "MONOCROMEOUTLINE",
["THICKOUTLINE"] = "THICKOUTLINE"
}
},
countFontColor = {
order = 4,
type = "color",
name = L["Color"],
get = function(info)
local t = E.db.bags[ info[getn(info)] ];
local d = P.bags[info[getn(info)]];
return t.r, t.g, t.b, t.a, d.r, d.g, d.b;
end,
set = function(info, r, g, b)
local t = E.db.bags[ info[getn(info)] ];
t.r, t.g, t.b = r, g, b;
B:UpdateCountDisplay();
end
}
}
},
itemLevelGroup = {
order = 8,
type = "group",
name = L["Item Level"],
guiInline = true,
args = {
itemLevel = {
order = 1,
type = "toggle",
name = L["Display Item Level"],
desc = L["Displays item level on equippable items."],
set = function(info, value) E.db.bags.itemLevel = value; B:UpdateItemLevelDisplay(); end
},
itemLevelThreshold = {
order = 2,
name = L["Item Level Threshold"],
desc = L["The minimum item level required for it to be shown."],
type = "range",
min = 1, max = 1000, step = 1,
disabled = function() return not E.db.bags.itemLevel; end,
set = function(info, value) E.db.bags.itemLevelThreshold = value; B:UpdateItemLevelDisplay(); end
},
spacer = {
order = 3,
type = "description",
name = " "
},
itemLevelFont = {
order = 4,
type = "select",
dialogControl = "LSM30_Font",
name = L["Font"],
values = AceGUIWidgetLSMlists.font,
disabled = function() return not E.db.bags.itemLevel; end,
set = function(info, value) E.db.bags.itemLevelFont = value; B:UpdateItemLevelDisplay(); end
},
itemLevelFontSize = {
order = 5,
type = "range",
name = L["Font Size"],
min = 6, max = 33, step = 1,
disabled = function() return not E.db.bags.itemLevel; end,
set = function(info, value) E.db.bags.itemLevelFontSize = value; B:UpdateItemLevelDisplay(); end
},
itemLevelFontOutline = {
order = 6,
type = "select",
name = L["Font Outline"],
disabled = function() return not E.db.bags.itemLevel end,
set = function(info, value) E.db.bags.itemLevelFontOutline = value; B:UpdateItemLevelDisplay() end,
values = {
["NONE"] = L["None"],
["OUTLINE"] = "OUTLINE",
["MONOCHROMEOUTLINE"] = "MONOCROMEOUTLINE",
["THICKOUTLINE"] = "THICKOUTLINE"
}
}
}
}
}
},
sizeGroup = {
order = 4,
type = "group",
name = L["Size"],
disabled = function() return not E.bags; end,
args = {
header = {
order = 0,
type = "header",
name = L["Size and Positions"]
},
bagSize = {
order = 1,
type = "range",
name = L["Button Size (Bag)"],
desc = L["The size of the individual buttons on the bag frame."],
min = 15, max = 45, step = 1,
set = function(info, value) E.db.bags[ info[getn(info)] ] = value; B:Layout(); end
},
bankSize = {
order = 2,
type = "range",
name = L["Button Size (Bank)"],
desc = L["The size of the individual buttons on the bank frame."],
min = 15, max = 45, step = 1,
set = function(info, value) E.db.bags[ info[getn(info)] ] = value; B:Layout(true); end
},
spacer = {
order = 3,
type = "description",
name = " "
},
bagWidth = {
order = 4,
type = "range",
name = L["Panel Width (Bags)"],
desc = L["Adjust the width of the bag frame."],
min = 150, max = 1400, step = 1,
set = function(info, value) E.db.bags[ info[getn(info)] ] = value; B:Layout(); end
},
bankWidth = {
order = 5,
type = "range",
name = L["Panel Width (Bank)"],
desc = L["Adjust the width of the bank frame."],
min = 150, max = 1400, step = 1,
set = function(info, value) E.db.bags[ info[getn(info)] ] = value; B:Layout(true); end
}
}
},
bagBar = {
order = 5,
type = "group",
name = L["Bag-Bar"],
get = function(info) return E.db.bags.bagBar[ info[getn(info)] ]; end,
set = function(info, value) E.db.bags.bagBar[ info[getn(info)] ] = value; B:SizeAndPositionBagBar(); end,
args = {
header = {
order = 0,
type = "header",
name = L["Bag-Bar"]
},
enable = {
order = 1,
type = "toggle",
name = L["Enable"],
desc = L["Enable/Disable the Bag-Bar."],
get = function(info) return E.private.bags.bagBar end,
set = function(info, value) E.private.bags.bagBar = value; E:StaticPopup_Show("PRIVATE_RL"); end
},
showBackdrop = {
order = 2,
type = "toggle",
name = L["Backdrop"]
},
mouseover = {
order = 3,
name = L["Mouse Over"],
desc = L["The frame is not shown unless you mouse over the frame."],
type = "toggle"
},
size = {
order = 4,
type = "range",
name = L["Button Size"],
desc = L["Set the size of your bag buttons."],
min = 24, max = 60, step = 1
},
spacing = {
order = 5,
type = "range",
name = L["Button Spacing"],
desc = L["The spacing between buttons."],
min = 1, max = 10, step = 1
},
backdropSpacing = {
order = 6,
type = "range",
name = L["Backdrop Spacing"],
desc = L["The spacing between the backdrop and the buttons."],
min = 0, max = 10, step = 1
},
sortDirection = {
order = 7,
type = "select",
name = L["Sort Direction"],
desc = L["The direction that the bag frames will grow from the anchor."],
values = {
["ASCENDING"] = L["Ascending"],
["DESCENDING"] = L["Descending"]
}
},
growthDirection = {
order = 7,
type = "select",
name = L["Bar Direction"],
desc = L["The direction that the bag frames be (Horizontal or Vertical)."],
values = {
["VERTICAL"] = L["Vertical"],
["HORIZONTAL"] = L["Horizontal"]
}
}
}
},
bagSortingGroup = {
order = 6,
type = "group",
name = L["Bag Sorting"],
disabled = function() return not E.bags end,
args = {
header = {
order = 0,
type = "header",
name = L["Bag Sorting"],
},
sortInverted = {
order = 1,
type = "toggle",
name = L["Sort Inverted"],
desc = L["Direction the bag sorting will use to allocate the items."]
},
spacer = {
order = 2,
type = "description",
name = " "
},
description = {
order = 3,
type = "description",
name = L["Here you can add items or search terms that you want to be excluded from sorting. To remove an item just click on its name in the list."]
},
addEntryGroup = {
order = 4,
type = "group",
name = L["Add Item or Search Syntax"],
guiInline = true,
args = {
addEntryProfile = {
order = 1,
type = "input",
name = L["Profile"],
desc = L["Add an item or search syntax to the ignored list. Items matching the search syntax will be ignored."],
get = function(info) return ""; end,
set = function(info, value)
if(value == "" or string.gsub(value, "%s+", "") == "") then return; end
local itemID = string.match(value, "item:(%d+)");
E.db.bags.ignoredItems[(itemID or value)] = value;
end
},
spacer = {
order = 2,
type = "description",
name = " ",
width = "normal"
},
addEntryGlobal = {
order = 3,
type = "input",
name = L["Global"],
desc = L["Add an item or search syntax to the ignored list. Items matching the search syntax will be ignored."],
get = function(info) return ""; end,
set = function(info, value)
if(value == "" or string.gsub(value, "%s+", "") == "") then return; end
local itemID = string.match(value, "item:(%d+)");
E.global.bags.ignoredItems[(itemID or value)] = value;
if(E.db.bags.ignoredItems[(itemID or value)]) then
E.db.bags.ignoredItems[(itemID or value)] = nil;
end
end
}
}
},
ignoredEntriesProfile = {
order = 5,
type = "multiselect",
name = L["Ignored Items and Search Syntax (Profile)"],
values = function() return E.db.bags.ignoredItems; end,
get = function(info, value) return E.db.bags.ignoredItems[value]; end,
set = function(info, value)
E.db.bags.ignoredItems[value] = nil;
GameTooltip:Hide();
end
},
ignoredEntriesGlobal = {
order = 6,
type = "multiselect",
name = L["Ignored Items and Search Syntax (Global)"],
values = function() return E.global.bags.ignoredItems; end,
get = function(info, value) return E.global.bags.ignoredItems[value]; end,
set = function(info, value)
E.global.bags.ignoredItems[value] = nil;
GameTooltip:Hide();
end
}
}
},
search_syntax = {
order = 7,
type = "group",
name = L["Search Syntax"],
disabled = function() return not E.bags; end,
args = {
text = {
order = 1,
type = "input",
multiline = 30,
width = "full",
name = L["Search Syntax"],
get = function(info) return L["SEARCH_SYNTAX_DESC"]; end,
set = function(info, value) value = L["SEARCH_SYNTAX_DESC"]; end
}
}
}
}
};
+506
View File
@@ -0,0 +1,506 @@
local E, L, V, P, G = unpack(ElvUI);
local CH = E:GetModule("Chat");
E.Options.args.chat = {
type = "group",
name = L["Chat"],
childGroups = "tab",
get = function(info) return E.db.chat[ info[getn(info)] ]; end,
set = function(info, value) E.db.chat[ info[getn(info)] ] = value; end,
args = {
intro = {
order = 1,
type = "description",
name = L["CHAT_DESC"]
},
enable = {
order = 2,
type = "toggle",
name = L["Enable"],
get = function(info) return E.private.chat.enable; end,
set = function(info, value) E.private.chat.enable = value; E:StaticPopup_Show("PRIVATE_RL"); end
},
general = {
order = 3,
type = "group",
name = L["General"],
args = {
header = {
order = 0,
type = "header",
name = L["General"]
},
url = {
order = 1,
type = "toggle",
name = L["URL Links"],
desc = L["Attempt to create URL links inside the chat."]
},
shortChannels = {
order = 2,
type = "toggle",
name = L["Short Channels"],
desc = L["Shorten the channel names in chat."]
},
hyperlinkHover = {
order = 3,
type = "toggle",
name = L["Hyperlink Hover"],
desc = L["Display the hyperlink tooltip while hovering over a hyperlink."],
set = function(info, value)
E.db.chat[ info[getn(info)] ] = value;
if(value == true) then
CH:EnableHyperlink();
else
CH:DisableHyperlink();
end
end
},
sticky = {
order = 4,
type = "toggle",
name = L["Sticky Chat"],
desc = L["When opening the Chat Editbox to type a message having this option set means it will retain the last channel you spoke in. If this option is turned off opening the Chat Editbox should always default to the SAY channel."],
set = function(info, value)
E.db.chat[ info[getn(info)] ] = value;
end
},
fade = {
order = 5,
type = "toggle",
name = L["Fade Chat"],
desc = L["Fade the chat text when there is no activity."],
set = function(info, value)
E.db.chat[ info[getn(info)] ] = value;
CH:UpdateFading();
end
},
emotionIcons = {
order = 6,
type = "toggle",
name = L["Emotion Icons"],
desc = L["Display emotion icons in chat."],
set = function(info, value)
E.db.chat[ info[getn(info)] ] = value;
end
},
fadeUndockedTabs = {
order = 7,
type = "toggle",
name = L["Fade Undocked Tabs"],
desc = L["Fades the text on chat tabs that are not docked at the left or right chat panel."],
set = function(self, value)
E.db.chat.fadeUndockedTabs = value;
CH:UpdateChatTabs();
end
},
fadeTabsNoBackdrop = {
order = 8,
type = "toggle",
name = L["Fade Tabs No Backdrop"],
desc = L["Fades the text on chat tabs that are docked in a panel where the backdrop is disabled."],
set = function(self, value)
E.db.chat.fadeTabsNoBackdrop = value;
CH:UpdateChatTabs();
end
},
chatHistory = {
order = 9,
type = "toggle",
name = L["Chat History"],
desc = L["Log the main chat frames history. So when you reloadui or log in and out you see the history from your last session."]
},
useAltKey = {
order = 10,
type = "toggle",
name = L["Use Alt Key"],
desc = L["Require holding the Alt key down to move cursor or cycle through messages in the editbox."],
set = function(self, value)
E.db.chat.useAltKey = value;
CH:UpdateSettings();
end
},
spacer = {
order = 11,
type = "description",
name = " ",
},
throttleInterval = {
order = 12,
type = "range",
name = L["Spam Interval"],
desc = L["Prevent the same messages from displaying in chat more than once within this set amount of seconds, set to zero to disable."],
min = 0, max = 120, step = 1,
set = function(info, value)
E.db.chat[ info[getn(info)] ] = value;
if(value == 0) then
CH:DisableChatThrottle();
end
end
},
scrollDownInterval = {
order = 13,
type = "range",
name = L["Scroll Interval"],
desc = L["Number of time in seconds to scroll down to the bottom of the chat window if you are not scrolled down completely."],
min = 0, max = 120, step = 5,
set = function(info, value)
E.db.chat[ info[getn(info)] ] = value;
end
},
numAllowedCombatRepeat = {
order = 14,
type = "range",
name = L["Allowed Combat Repeat"],
desc = L["Number of repeat characters while in combat before the chat editbox is automatically closed."],
min = 2, max = 10, step = 1
},
numScrollMessages = {
order = 15,
type = "range",
name = L["Scroll Messages"],
desc = L["Number of messages you scroll for each step."],
min = 1, max = 10, step = 1,
},
spacer2 = {
order = 16,
type = "description",
name = " ",
},
timeStampFormat = {
order = 17,
type = "select",
name = "TIMESTAMPS_LABEL",
desc = "OPTION_TOOLTIP_TIMESTAMPS",
values = {
["NONE"] = NONE,
["%I:%M "] = "03:27",
["%I:%M:%S "] = "03:27:32",
["%I:%M %p "] = "03:27 PM",
["%I:%M:%S %p "] = "03:27:32 PM",
["%H:%M "] = "15:27",
["%H:%M:%S "] = "15:27:32"
}
},
useCustomTimeColor = {
order = 18,
type = "toggle",
name = L["Custom Timestamp Color"],
disabled = function() return not E.db.chat.timeStampFormat == "NONE"; end
},
customTimeColor = {
order = 19,
type = "color",
hasAlpha = false,
name = L["Timestamp Color"],
disabled = function() return (not E.db.chat.timeStampFormat == "NONE" or not E.db.chat.useCustomTimeColor); end,
get = function(info)
local t = E.db.chat.customTimeColor;
local d = P.chat.customTimeColor;
return t.r, t.g, t.b, t.a, d.r, d.g, d.b;
end,
set = function(info, r, g, b)
local t = E.db.chat.customTimeColor;
t.r, t.g, t.b = r, g, b;
end
}
}
},
alerts = {
order = 4,
type = "group",
name = L["Alerts"],
args = {
header = {
order = 0,
type = "header",
name = L["Alerts"]
},
whisperSound = {
order = 1,
type = "select", dialogControl = "LSM30_Sound",
name = L["Whisper Alert"],
values = AceGUIWidgetLSMlists.sound,
},
keywordSound = {
order = 2,
type = "select", dialogControl = "LSM30_Sound",
name = L["Keyword Alert"],
values = AceGUIWidgetLSMlists.sound,
},
noAlertInCombat = {
order = 3,
type = "toggle",
name = L["No Alert In Combat"]
},
keywords = {
order = 4,
name = L["Keywords"],
desc = L["List of words to color in chat if found in a message. If you wish to add multiple words you must seperate the word with a comma. To search for your current name you can use %MYNAME%.\n\nExample:\n%MYNAME%, ElvUI, RBGs, Tank"],
type = "input",
width = "full",
set = function(info, value) E.db.chat[ info[getn(info)] ] = value; CH:UpdateChatKeywords(); end
}
}
},
panels = {
order = 5,
type = "group",
name = L["Panels"],
args = {
header = {
order = 0,
type = "header",
name = L["Panels"]
},
lockPositions = {
order = 1,
type = "toggle",
name = L["Lock Positions"],
desc = L["Attempt to lock the left and right chat frame positions. Disabling this option will allow you to move the main chat frame anywhere you wish."],
set = function(info, value)
E.db.chat[ info[getn(info)] ] = value;
if(value == true) then
CH:PositionChat(true);
end
end
},
panelTabTransparency = {
order = 2,
type = "toggle",
name = L["Tab Panel Transparency"],
set = function(info, value) E.db.chat.panelTabTransparency = value; E:GetModule("Layout"):SetChatTabStyle(); end
},
panelTabBackdrop = {
order = 3,
type = "toggle",
name = L["Tab Panel"],
desc = L["Toggle the chat tab panel backdrop."],
set = function(info, value) E.db.chat.panelTabBackdrop = value; E:GetModule("Layout"):ToggleChatPanels(); end
},
editBoxPosition = {
order = 4,
type = "select",
name = L["Chat EditBox Position"],
desc = L["Position of the Chat EditBox, if datatexts are disabled this will be forced to be above chat."],
values = {
["BELOW_CHAT"] = L["Below Chat"],
["ABOVE_CHAT"] = L["Above Chat"]
},
set = function(info, value) E.db.chat[ info[getn(info)] ] = value; CH:UpdateAnchors(); end
},
panelBackdrop = {
order = 5,
type = "select",
name = L["Panel Backdrop"],
desc = L["Toggle showing of the left and right chat panels."],
set = function(info, value) E.db.chat.panelBackdrop = value; E:GetModule("Layout"):ToggleChatPanels(); E:GetModule("Chat"):PositionChat(true); E:GetModule("Chat"):UpdateAnchors(); end,
values = {
["HIDEBOTH"] = L["Hide Both"],
["SHOWBOTH"] = L["Show Both"],
["LEFT"] = L["Left Only"],
["RIGHT"] = L["Right Only"]
}
},
separateSizes = {
order = 6,
type = "toggle",
name = L["Separate Panel Sizes"],
desc = L["Enable the use of separate size options for the right chat panel."],
set = function(info, value)
E.db.chat.separateSizes = value;
E:GetModule("Chat"):PositionChat(true);
E:GetModule("Bags"):Layout();
end
},
spacer1 = {
order = 7,
type = "description",
name = ""
},
panelHeight = {
order = 8,
type = "range",
name = L["Panel Height"],
desc = L["PANEL_DESC"],
min = 50, max = 600, step = 1,
set = function(info, value) E.db.chat.panelHeight = value; E:GetModule("Chat"):PositionChat(true); end
},
panelWidth = {
order = 9,
type = "range",
name = L["Panel Width"],
desc = L["PANEL_DESC"],
min = 50, max = 1000, step = 1,
set = function(info, value)
E.db.chat.panelWidth = value;
E:GetModule("Chat"):PositionChat(true);
local bags = E:GetModule("Bags");
if(not E.db.chat.separateSizes) then
bags:Layout();
end
bags:Layout(true);
end
},
spacer2 = {
order = 10,
type = "description",
name = ""
},
panelHeightRight = {
order = 11,
type = "range",
name = L["Right Panel Height"],
desc = L["Adjust the height of your right chat panel."],
min = 50, max = 600, step = 1,
disabled = function() return not E.db.chat.separateSizes; end,
hidden = function() return not E.db.chat.separateSizes; end,
set = function(info, value) E.db.chat.panelHeightRight = value; E:GetModule("Chat"):PositionChat(true); end
},
panelWidthRight = {
order = 12,
type = "range",
name = L["Right Panel Width"],
desc = L["Adjust the width of your right chat panel."],
min = 50, max = 1000, step = 1,
disabled = function() return not E.db.chat.separateSizes end,
hidden = function() return not E.db.chat.separateSizes end,
set = function(info, value)
E.db.chat.panelWidthRight = value;
E:GetModule("Chat"):PositionChat(true);
E:GetModule("Bags"):Layout();
end
},
panelBackdropNameLeft = {
order = 13,
type = "input",
width = "full",
name = L["Panel Texture (Left)"],
desc = L["Specify a filename located inside the World of Warcraft directory. Textures folder that you wish to have set as a panel background.\n\nPlease Note:\n-The image size recommended is 256x128\n-You must do a complete game restart after adding a file to the folder.\n-The file type must be tga format.\n\nExample: Interface\\AddOns\\ElvUI\\media\\textures\\copy\n\nOr for most users it would be easier to simply put a tga file into your WoW folder, then type the name of the file here."],
set = function(info, value)
E.db.chat[ info[getn(info)] ] = value;
E:UpdateMedia();
end
},
panelBackdropNameRight = {
order = 14,
type = "input",
width = "full",
name = L["Panel Texture (Right)"],
desc = L["Specify a filename located inside the World of Warcraft directory. Textures folder that you wish to have set as a panel background.\n\nPlease Note:\n-The image size recommended is 256x128\n-You must do a complete game restart after adding a file to the folder.\n-The file type must be tga format.\n\nExample: Interface\\AddOns\\ElvUI\\media\\textures\\copy\n\nOr for most users it would be easier to simply put a tga file into your WoW folder, then type the name of the file here."],
set = function(info, value)
E.db.chat[ info[getn(info)] ] = value;
E:UpdateMedia();
end
}
}
},
fontGroup = {
order = 6,
type = "group",
name = L["Fonts"],
set = function(info, value) E.db.chat[ info[getn(info)] ] = value; CH:SetupChat(); end,
args = {
header = {
order = 0,
type = "header",
name = L["Fonts"]
},
font = {
order = 1,
type = "select", dialogControl = "LSM30_Font",
name = L["Font"],
values = AceGUIWidgetLSMlists.font
},
fontOutline = {
order = 2,
name = L["Font Outline"],
desc = L["Set the font outline."],
type = "select",
values = {
["NONE"] = L["None"],
["OUTLINE"] = "OUTLINE",
["MONOCHROMEOUTLINE"] = "MONOCHROMEOUTLINE",
["THICKOUTLINE"] = "THICKOUTLINE"
}
},
tabFont = {
type = "select", dialogControl = "LSM30_Font",
order = 4,
name = L["Tab Font"],
values = AceGUIWidgetLSMlists.font
},
tabFontSize = {
order = 5,
type = "range",
name = L["Tab Font Size"],
min = 6, max = 22, step = 1
},
tabFontOutline = {
order = 6,
name = L["Tab Font Outline"],
desc = L["Set the font outline."],
type = "select",
values = {
["NONE"] = L["None"],
["OUTLINE"] = "OUTLINE",
["MONOCHROMEOUTLINE"] = "MONOCHROMEOUTLINE",
["THICKOUTLINE"] = "THICKOUTLINE"
}
}
}
},
classColorMentionGroup = {
order = 7,
type = "group",
name = L["Class Color Mentions"],
args = {
header = {
order = 1,
type = "header",
name = L["Class Color Mentions"]
},
classColorMentionsChat = {
order = 2,
type = "toggle",
name = L["Chat"],
desc = L["Use class color for the names of players when they are mentioned."],
get = function(info) return E.db.chat.classColorMentionsChat end,
set = function(info, value) E.db.chat.classColorMentionsChat = value end,
disabled = function() return not E.private.chat.enable end
},
classColorMentionsSpeech = {
order = 3,
type = "toggle",
name = L["Chat Bubbles"],
desc = L["Use class color for the names of players when they are mentioned."],
get = function(info) return E.private.general.classColorMentionsSpeech end,
set = function(info, value) E.private.general.classColorMentionsSpeech = value; E:StaticPopup_Show("PRIVATE_RL") end,
disabled = function() return (E.private.general.chatBubbles == "disabled" or not E.private.chat.enable) end
},
classColorMentionExcludeName = {
order = 4,
name = L["Exclude Name"],
desc = L["Excluded names will not be class colored."],
type = 'input',
get = function(info) return "" end,
set = function(info, value)
if value == "" or string.gsub(value, "%s+", "") == "" then return; end
E.global.chat.classColorMentionExcludedNames[strlower(value)] = value
end
},
classColorMentionExcludedNames = {
order = 5,
type = "multiselect",
name = L["Excluded Names"],
values = function() return E.global.chat.classColorMentionExcludedNames end,
get = function(info, value) return E.global.chat.classColorMentionExcludedNames[value] end,
set = function(info, value)
E.global.chat.classColorMentionExcludedNames[value] = nil
GameTooltip:Hide()
end
}
}
}
}
};
+165
View File
@@ -0,0 +1,165 @@
local E, L, V, P, G = unpack(ElvUI);
--local D = E:GetModule("Distributor");
local AceGUI = LibStub("AceGUI-3.0");
local pairs = pairs;
local tsort, tinsert = table.sort, table.insert;
local format = string.format;
local UnitExists = UnitExists;
local UnitIsFriend = UnitIsFriend;
local UnitIsPlayer = UnitIsPlayer;
local UnitIsUnit = UnitIsUnit;
local UnitName = UnitName;
local DEFAULT_WIDTH = 890;
local DEFAULT_HEIGHT = 651;
local AC = LibStub("AceConfig-3.0");
local ACD = LibStub("AceConfigDialog-3.0");
local ACR = LibStub("AceConfigRegistry-3.0");
AC.RegisterOptionsTable(E, "ElvUI", E.Options);
ACD:SetDefaultSize("ElvUI", DEFAULT_WIDTH, DEFAULT_HEIGHT);
function E:RefreshGUI()
self:RefreshCustomTextsConfigs();
ACR:NotifyChange("ElvUI");
end
E.Options.args = {
ElvUI_Header = {
order = 1,
type = "header",
name = L["Version"] .. format(": |cff99ff33%s|r", E.version),
width = "full"
},
LoginMessage = {
order = 2,
type = "toggle",
name = L["Login Message"],
get = function(info) return E.db.general.loginmessage; end,
set = function(info, value) E.db.general.loginmessage = value; end
},
ToggleTutorial = {
order = 3,
type = "execute",
name = L["Toggle Tutorials"],
func = function() E:Tutorials(true); E:ToggleConfig(); end
},
Install = {
order = 4,
type = "execute",
name = L["Install"],
desc = L["Run the installation process."],
func = function() E:Install(); E:ToggleConfig(); end
},
ToggleAnchors = {
order = 5,
type = "execute",
name = L["Toggle Anchors"],
desc = L["Unlock various elements of the UI to be repositioned."],
func = function() E:ToggleConfigMode(); end
},
ResetAllMovers = {
order = 6,
type = "execute",
name = L["Reset Anchors"],
desc = L["Reset all frames to their original positions."],
func = function() E:ResetUI(); end
}
};
local DONATOR_STRING = "";
local DEVELOPER_STRING = "";
local TESTER_STRING = "";
local LINE_BREAK = "\n";
local DONATORS = {
"Dandruff",
"Tobur/Tarilya",
"Netu",
"Alluren",
"Thorgnir",
"Emalal",
"Bendmeova",
"Curl",
"Zarac",
"Emmo",
"Oz",
"Hawké",
"Aynya",
"Tahira",
"Karsten Lumbye Thomsen",
"Thomas B. aka Pitschiqüü",
"Sea Garnet",
"Paul Storry",
"Azagar",
"Archury",
"Donhorn",
"Woodson Harmon",
"Phoenyx",
"Feat",
"Konungr",
"Leyrin",
"Dragonsys",
"Tkalec",
"Paavi",
"Giorgio",
"Bearscantank",
"Eidolic",
"Cosmo",
"Adorno",
"Domoaligato",
"Smorg",
"Pyrokee",
"Portable",
"Ithilyn"
};
local DEVELOPERS = {
"Tukz",
"Haste",
"Nightcracker",
"Omega1970",
"Hydrazine"
};
local TESTERS = {
"Tukui Community",
"|cffF76ADBSarah|r - For Sarahing",
"Affinity",
"Modarch",
"Bladesdruid",
"Tirain",
"Phima",
"Veiled",
"Blazeflack",
"Repooc",
"Darth Predator",
"Alex",
"Nidra",
"Kurhyus",
"BuG",
"Yachanay",
"Catok"
}
tsort(DONATORS, function(a, b) return a < b end);
for _, donatorName in pairs(DONATORS) do
tinsert(E.CreditsList, donatorName);
DONATOR_STRING = DONATOR_STRING .. LINE_BREAK .. donatorName;
end
tsort(DEVELOPERS, function(a,b) return a < b end);
for _, devName in pairs(DEVELOPERS) do
tinsert(E.CreditsList, devName);
DEVELOPER_STRING = DEVELOPER_STRING .. LINE_BREAK .. devName;
end
tsort(TESTERS, function(a, b) return a < b end)
for _, testerName in pairs(TESTERS) do
tinsert(E.CreditsList, testerName);
TESTER_STRING = TESTER_STRING .. LINE_BREAK .. testerName;
end
+339
View File
@@ -0,0 +1,339 @@
local E, L, V, P, G = unpack(ElvUI);
local DT = E:GetModule("DataTexts");
local find, upper = string.find, string.upper
local datatexts = {};
function DT:PanelLayoutOptions()
for name, data in pairs(DT.RegisteredDataTexts) do
datatexts[name] = data.localizedName or L[name]
end
datatexts[""] = NONE;
local order;
local table = E.Options.args.datatexts.args.panels.args;
for pointLoc, tab in pairs(P.datatexts.panels) do
if(not _G[pointLoc]) then table[pointLoc] = nil; return; end
if(type(tab) == "table") then
if find(pointLoc, "Chat") then
order = 15;
else
order = 20;
end
table[pointLoc] = {
order = order,
type = "group",
name = L[pointLoc] or pointLoc,
args = {}
};
for option, value in pairs(tab) do
table[pointLoc].args[option] = {
type = "select",
name = L[option] or upper(option),
values = datatexts,
get = function(info) return E.db.datatexts.panels[pointLoc][ info[getn(info)] ]; end,
set = function(info, value) E.db.datatexts.panels[pointLoc][ info[getn(info)] ] = value; DT:LoadDataTexts(); end
};
end
elseif(type(tab) == "string") then
table.smallPanels.args[pointLoc] = {
type = "select",
name = L[pointLoc] or pointLoc,
values = datatexts,
get = function(info) return E.db.datatexts.panels[pointLoc]; end,
set = function(info, value) E.db.datatexts.panels[pointLoc] = value; DT:LoadDataTexts(); end
};
end
end
end
E.Options.args.datatexts = {
type = "group",
name = L["DataTexts"],
childGroups = "tab",
get = function(info) return E.db.datatexts[ info[getn(info)] ]; end,
set = function(info, value) E.db.datatexts[ info[getn(info)] ] = value; DT:LoadDataTexts(); end,
args = {
intro = {
order = 1,
type = "description",
name = L["DATATEXT_DESC"]
},
spacer = {
order = 2,
type = "description",
name = ""
},
general = {
order = 3,
type = "group",
name = L["General"],
args = {
header = {
order = 1,
type = "header",
name = L["General"]
},
generalGroup = {
order = 2,
type = "group",
guiInline = true,
name = L["General"],
args = {
battleground = {
order = 1,
type = "toggle",
name = L["Battleground Texts"],
desc = L["When inside a battleground display personal scoreboard information on the main datatext bars."]
},
panelTransparency = {
order = 2,
name = L["Panel Transparency"],
type = "toggle",
set = function(info, value)
E.db.datatexts[ info[getn(info)] ] = value;
E:GetModule("Layout"):SetDataPanelStyle();
end
},
panelBackdrop = {
order = 3,
name = L["Backdrop"],
type = "toggle",
set = function(info, value)
E.db.datatexts[ info[getn(info)] ] = value
E:GetModule("Layout"):SetDataPanelStyle()
end,
},
noCombatClick = {
order = 4,
type = "toggle",
name = L["Block Combat Click"],
desc = L["Blocks all click events while in combat."]
},
noCombatHover = {
order = 5,
type = "toggle",
name = L["Block Combat Hover"],
desc = L["Blocks datatext tooltip from showing in combat."]
},
goldFormat = {
order = 6,
type = "select",
name = L["Gold Format"],
desc = L["The display format of the money text that is shown in the gold datatext and its tooltip."],
values = {
["SMART"] = L["Smart"],
["FULL"] = L["Full"],
["SHORT"] = L["Short"],
["SHORTINT"] = L["Short (Whole Numbers)"],
["CONDENSED"] = L["Condensed"],
["BLIZZARD"] = L["Blizzard Style"]
}
},
goldCoins = {
order = 7,
type = "toggle",
name = L["Show Coins"],
desc = L["Use coin icons instead of colored text."]
}
}
},
fontGroup = {
order = 3,
type = "group",
guiInline = true,
name = L["Fonts"],
args = {
font = {
order = 1,
type = "select", dialogControl = "LSM30_Font",
name = L["Font"],
values = AceGUIWidgetLSMlists.font
},
fontSize = {
order = 2,
type = "range",
name = L["Font Size"],
min = 4, max = 22, step = 1
},
fontOutline = {
order = 3,
type = "select",
name = L["Font Outline"],
desc = L["Set the font outline."],
values = {
["NONE"] = L["None"],
["OUTLINE"] = "OUTLINE",
["MONOCHROMEOUTLINE"] = "MONOCROMEOUTLINE",
["THICKOUTLINE"] = "THICKOUTLINE"
}
},
wordWrap = {
order = 4,
type = "toggle",
name = L["Word Wrap"]
}
}
}
}
},
panels = {
type = "group",
name = L["Panels"],
order = 4,
args = {
header = {
order = 1,
type = "header",
name = L["Panels"]
},
leftChatPanel = {
order = 2,
type = "toggle",
name = L["Datatext Panel (Left)"],
desc = L["Display data panels below the chat, used for datatexts."],
set = function(info, value)
E.db.datatexts[ info[getn(info)] ] = value;
if(E.db.LeftChatPanelFaded) then
E.db.LeftChatPanelFaded = true;
HideLeftChat();
end
E:GetModule("Chat"):UpdateAnchors();
E:GetModule("Layout"):ToggleChatPanels();
end
},
rightChatPanel = {
order = 3,
type = "toggle",
name = L["Datatext Panel (Right)"],
desc = L["Display data panels below the chat, used for datatexts."],
set = function(info, value)
E.db.datatexts[ info[getn(info)] ] = value;
if(E.db.RightChatPanelFaded) then
E.db.RightChatPanelFaded = true;
HideRightChat();
end
E:GetModule("Chat"):UpdateAnchors();
E:GetModule("Layout"):ToggleChatPanels();
end
},
minimapPanels = {
order = 4,
type = "toggle",
name = L["Minimap Panels"],
desc = L["Display minimap panels below the minimap, used for datatexts."],
set = function(info, value)
E.db.datatexts[ info[getn(info)] ] = value;
E:GetModule("Minimap"):UpdateSettings();
end
},
minimapTop = {
order = 5,
name = L["TopMiniPanel"],
type = "toggle",
set = function(info, value)
E.db.datatexts[ info[getn(info)] ] = value;
E:GetModule("Minimap"):UpdateSettings();
end
},
minimapTopLeft = {
order = 6,
type = "toggle",
name = L["TopLeftMiniPanel"],
set = function(info, value)
E.db.datatexts[ info[getn(info)] ] = value;
E:GetModule("Minimap"):UpdateSettings();
end,
},
minimapTopRight = {
order = 7,
type = "toggle",
name = L["TopRightMiniPanel"],
set = function(info, value)
E.db.datatexts[ info[getn(info)] ] = value;
E:GetModule("Minimap"):UpdateSettings();
end
},
minimapBottom = {
order = 8,
type = "toggle",
name = L["BottomMiniPanel"],
set = function(info, value)
E.db.datatexts[ info[getn(info)] ] = value;
E:GetModule("Minimap"):UpdateSettings();
end
},
minimapBottomLeft = {
order = 9,
type = "toggle",
name = L["BottomLeftMiniPanel"],
set = function(info, value)
E.db.datatexts[ info[getn(info)] ] = value;
E:GetModule("Minimap"):UpdateSettings();
end
},
minimapBottomRight = {
order = 10,
name = L["BottomRightMiniPanel"],
type = "toggle",
set = function(info, value)
E.db.datatexts[ info[getn(info)] ] = value;
E:GetModule("Minimap"):UpdateSettings();
end
},
spacer = {
order = 11,
type = "description",
name = "\n"
},
smallPanels = {
order = 12,
type = "group",
name = L["Small Panels"],
args = {}
}
}
},
time = {
order = 5,
type = "group",
name = L["Time"],
args = {
header = {
order = 1,
type = "header",
name = L["Time"],
},
timeFormat = {
order = 2,
type = "select",
name = L["Time Format"],
values = {
[""] = NONE,
["%I:%M"] = "03:27",
["%I:%M:%S"] = "03:27:32",
["%I:%M %p"] = "03:27 PM",
["%I:%M:%S %p"] = "03:27:32 PM",
["%H:%M"] = "15:27",
["%H:%M:%S"] ="15:27:32"
}
},
dateFormat = {
order = 3,
type = "select",
name = L["Date Format"],
values = {
[""] = NONE,
["%d/%m/%y "] = "27/03/16",
["%m/%d/%y "] = "03/27/16",
["%y/%m/%d "] = "16/03/27",
["%d.%m.%y "] = "27.03.16"
}
}
}
}
}
};
DT:PanelLayoutOptions();
+11 -3
View File
@@ -8,8 +8,16 @@
Libraries\Load_Libraries.xml Libraries\Load_Libraries.xml
locales\load_locales.xml locales\load_locales.xml
core.lua Core.lua
actionbars.lua
General.lua General.lua
ActionBars.lua
Auras.lua
Bags.lua
Chat.lua
DataTexts.lua
Filters.lua
NamePlates.lua
Skins.lua
Tooltip.lua
DataBars.lua DataBars.lua
UnitFrames.lua Maps.lua
@@ -23,7 +23,7 @@ if not AceConfigCmd then return end
local AceCore = LibStub("AceCore-3.0") local AceCore = LibStub("AceCore-3.0")
local Dispatchers = AceCore.Dispatchers local Dispatchers = AceCore.Dispatchers
local strtrim = AceCore.strtrim local strtrim = AceCore.strtrim
local strsplit = AceCore.strsplit --local strsplit = AceCore.strsplit
local new, del = AceCore.new, AceCore.del local new, del = AceCore.new, AceCore.del
local wipe = AceCore.wipe local wipe = AceCore.wipe
@@ -10,7 +10,7 @@ local AceConfigDialog, oldminor = LibStub:NewLibrary(MAJOR, MINOR)
if not AceConfigDialog then return end if not AceConfigDialog then return end
local AceCore = LibStub("AceCore-3.0") local AceCore = LibStub("AceCore-3.0")
local wipe, strsplit = AceCore.wipe, AceCore.strsplit local wipe = AceCore.wipe
local safecall = AceCore.safecall local safecall = AceCore.safecall
local Dispatchers = AceCore.Dispatchers local Dispatchers = AceCore.Dispatchers
local countargs = AceCore.countargs local countargs = AceCore.countargs
@@ -1423,11 +1423,9 @@ local function TreeOnButtonEnter(widget, event, _, uniquevalue, button)
local appName = user.appName local appName = user.appName
local feedpath = new() local feedpath = new()
local l = tgetn(path) for i = 1, tgetn(path) do
for i = 1, l do
feedpath[i] = path[i] feedpath[i] = path[i]
end end
tsetn(feedpath,l)
BuildPath(feedpath, strsplit("\001", uniquevalue)) BuildPath(feedpath, strsplit("\001", uniquevalue))
local group = options local group = options
@@ -105,36 +105,16 @@ do
end end
end end
-- Ace3v: when a container contains many children, we can only use the variable arguments local function fixlevels(parent,...)
local function _fixlevels(parent, ...) local i = 1
local lv = parent:GetFrameLevel() + 1 local child = arg[i]
for i = 1, tgetn(arg) do while child do
local child = arg[i] child:SetFrameLevel(parent:GetFrameLevel() + (parent.backdrop and -1 or 2))
child:SetFrameLevel(lv) fixlevels(child, child:GetChildren())
_fixlevels(child, child:GetChildren()) i = i + 1
child = arg[i]
end end
end end
local function fixlevels(parent)
return _fixlevels(parent, parent:GetChildren())
end
AceGUI.fixlevels = fixlevels
-- Ace3v: attention! this function is recursive
local function _fixstrata(strata, parent, ...)
parent:SetFrameStrata(strata)
for i = 1, tgetn(arg) do
local child = arg[i]
_fixstrata(strata, child, child:GetChildren())
end
end
local function fixstrata(strata, parent)
return _fixstrata(strata, parent, parent:GetChildren())
end
AceGUI.fixstrata = fixstrata
------------------- -------------------
-- API Functions -- -- API Functions --
------------------- -------------------
@@ -266,7 +246,7 @@ do
frame:SetParent(nil) frame:SetParent(nil)
frame:SetParent(parent.content) frame:SetParent(parent.content)
self.parent = parent self.parent = parent
fixlevels(frame) fixlevels(frame, frame:GetChildren())
end end
WidgetBase.SetCallback = function(self, name, func) WidgetBase.SetCallback = function(self, name, func)
@@ -463,8 +443,8 @@ do
end end
end end
WidgetContainerBase.SetParent = function(self, parent) --[[WidgetContainerBase.SetParent = function(self, parent)
WidgetBase.SetParent(self, parent) --WidgetBase.SetParent(self, parent)
local lv = self.frame:GetFrameLevel() local lv = self.frame:GetFrameLevel()
self.content:SetFrameLevel(lv+1) self.content:SetFrameLevel(lv+1)
@@ -473,7 +453,7 @@ do
local child = children[i] local child = children[i]
child:SetParent(self) child:SetParent(self)
end end
end end]]
WidgetContainerBase.SetLayout = function(self, Layout) WidgetContainerBase.SetLayout = function(self, Layout)
self.LayoutFunc = AceGUI:GetLayout(Layout) self.LayoutFunc = AceGUI:GetLayout(Layout)
@@ -105,7 +105,7 @@ local methods = {
["OnHeightSet"] = function(self, height) ["OnHeightSet"] = function(self, height)
local content = self.content local content = self.content
local contentheight = height - 57 local contentheight = height - 67
if contentheight < 0 then if contentheight < 0 then
contentheight = 0 contentheight = 0
end end
@@ -278,7 +278,7 @@ local function Constructor()
--Container Support --Container Support
local content = CreateFrame("Frame", nil, frame) local content = CreateFrame("Frame", nil, frame)
content:SetPoint("TOPLEFT", 17, -27) content:SetPoint("TOPLEFT", 17, -27)
content:SetPoint("BOTTOMRIGHT", -17, 40) --content:SetPoint("BOTTOMRIGHT", -17, 40)
local widget = { local widget = {
localstatus = {}, localstatus = {},
@@ -6,8 +6,6 @@ local Type, Version = "ScrollFrame", 24
local AceGUI = LibStub and LibStub("AceGUI-3.0", true) local AceGUI = LibStub and LibStub("AceGUI-3.0", true)
if not AceGUI or (AceGUI:GetWidgetVersion(Type) or 0) >= Version then return end if not AceGUI or (AceGUI:GetWidgetVersion(Type) or 0) >= Version then return end
local fixlevels = AceGUI.fixlevels
-- Lua APIs -- Lua APIs
local pairs, assert, type = pairs, assert, type local pairs, assert, type = pairs, assert, type
local min, max, floor, abs = math.min, math.max, math.floor, math.abs local min, max, floor, abs = math.min, math.max, math.floor, math.abs
@@ -150,6 +148,7 @@ local methods = {
["OnWidthSet"] = function(self, width) ["OnWidthSet"] = function(self, width)
local content = self.content local content = self.content
content:SetWidth(width)
content.width = width content.width = width
end, end,
@@ -170,7 +169,7 @@ local function Constructor()
scrollframe:SetPoint("BOTTOMRIGHT",0,0) scrollframe:SetPoint("BOTTOMRIGHT",0,0)
scrollframe:EnableMouseWheel(true) scrollframe:EnableMouseWheel(true)
scrollframe:SetScript("OnMouseWheel", ScrollFrame_OnMouseWheel) scrollframe:SetScript("OnMouseWheel", ScrollFrame_OnMouseWheel)
scrollframe:SetScript("OnSizeChanged", ScrollFrame_OnSizeChanged) -- scrollframe:SetScript("OnSizeChanged", ScrollFrame_OnSizeChanged)
local scrollbar = CreateFrame("Slider", format("AceConfigDialogScrollFrame%dScrollBar", num), scrollframe, "UIPanelScrollBarTemplate") local scrollbar = CreateFrame("Slider", format("AceConfigDialogScrollFrame%dScrollBar", num), scrollframe, "UIPanelScrollBarTemplate")
scrollbar:SetPoint("TOPLEFT", scrollframe, "TOPRIGHT", 4, -16) scrollbar:SetPoint("TOPLEFT", scrollframe, "TOPRIGHT", 4, -16)
@@ -6,14 +6,11 @@ local Type, Version = "TreeGroup", 40
local AceGUI = LibStub and LibStub("AceGUI-3.0", true) local AceGUI = LibStub and LibStub("AceGUI-3.0", true)
if not AceGUI or (AceGUI:GetWidgetVersion(Type) or 0) >= Version then return end if not AceGUI or (AceGUI:GetWidgetVersion(Type) or 0) >= Version then return end
local AceCore = LibStub("AceCore-3.0")
local strsplit = AceCore.strsplit
local _G = AceCore._G
-- Lua APIs -- Lua APIs
local next, pairs, ipairs, assert, type = next, pairs, ipairs, assert, type local next, pairs, ipairs, assert, type = next, pairs, ipairs, assert, type
local math_min, math_max, floor = math.min, math.max, floor local math_min, math_max, floor = math.min, math.max, floor
local tgetn, tremove, unpack, tconcat = table.getn, table.remove, unpack, table.concat local select, tremove, unpack, tconcat = select, table.remove, unpack, table.concat
local tgetn = table.getn
local strfmt = string.format local strfmt = string.format
-- WoW APIs -- WoW APIs
@@ -170,22 +167,13 @@ local function FirstFrameUpdate()
self:RefreshTree() self:RefreshTree()
end end
local BuildUniqueValue local function BuildUniqueValue(...)
do local n = tgetn(arg)
local args = {nil,nil,nil,nil,nil,nil,nil,nil,nil,nil} if n == 1 then
function BuildUniqueValue(a1,a2,a3,a4,a5,a6,a7,a8,a9,a10) return arg[1]
args[1] = a1 else
args[2] = a2 return (unpack(arg)).."\001"..BuildUniqueValue(select(2, unpack(arg)))
args[3] = a3 end
args[4] = a4
args[5] = a5
args[6] = a6
args[7] = a7
args[8] = a8
args[9] = a9
args[10] = a10
return tconcat(tmp, "\001", 1, tgetn(args))
end
end end
--[[----------------------------------------------------------------------------- --[[-----------------------------------------------------------------------------
@@ -226,7 +214,7 @@ local function Button_OnEnter()
if self.enabletooltips then if self.enabletooltips then
GameTooltip:SetOwner(this, "ANCHOR_NONE") GameTooltip:SetOwner(this, "ANCHOR_NONE")
GameTooltip:SetPoint("LEFT",this,"RIGHT") GameTooltip:SetPoint("LEFT",this,"RIGHT")
GameTooltip:SetText(this.text:GetText() or "", 1, .82, 0, 1) GameTooltip:SetText(this.text:GetText() or "", 1, .82, 0, true)
GameTooltip:Show() GameTooltip:Show()
end end
@@ -283,14 +271,14 @@ end
local function Dragger_OnMouseUp() local function Dragger_OnMouseUp()
local treeframe = this:GetParent() local treeframe = this:GetParent()
local self = treeframe.obj local self = treeframe.obj
local frame = treeframe:GetParent() local this = treeframe:GetParent()
treeframe:StopMovingOrSizing() treeframe:StopMovingOrSizing()
--treeframe:SetScript("OnUpdate", nil) --treeframe:SetScript("OnUpdate", nil)
treeframe:SetUserPlaced(false) treeframe:SetUserPlaced(false)
--Without this :GetHeight will get stuck on the current height, causing the tree contents to not resize --Without this :GetHeight will get stuck on the current height, causing the tree contents to not resize
treeframe:SetHeight(0) treeframe:SetHeight(0)
treeframe:SetPoint("TOPLEFT", frame, "TOPLEFT",0,0) treeframe:SetPoint("TOPLEFT", this, "TOPLEFT",0,0)
treeframe:SetPoint("BOTTOMLEFT", frame, "BOTTOMLEFT",0,0) treeframe:SetPoint("BOTTOMLEFT", this, "BOTTOMLEFT",0,0)
local status = self.status or self.localstatus local status = self.status or self.localstatus
status.treewidth = treeframe:GetWidth() status.treewidth = treeframe:GetWidth()
@@ -305,10 +293,7 @@ end
--[[----------------------------------------------------------------------------- --[[-----------------------------------------------------------------------------
Methods Methods
-------------------------------------------------------------------------------]] -------------------------------------------------------------------------------]]
local methods local methods = {
do
local select_args = {nil,nil,nil,nil,nil,nil,nil,nil,nil,nil}
methods = {
["OnAcquire"] = function(self) ["OnAcquire"] = function(self)
self:SetTreeWidth(DEFAULT_TREE_WIDTH, DEFAULT_TREE_SIZABLE) self:SetTreeWidth(DEFAULT_TREE_WIDTH, DEFAULT_TREE_SIZABLE)
self:EnableButtonTooltips(true) self:EnableButtonTooltips(true)
@@ -343,17 +328,14 @@ methods = {
button:SetWidth(175) button:SetWidth(175)
button:SetHeight(18) button:SetHeight(18)
local toggle = CreateFrame("Button", nil, button) local toggle = CreateFrame("Button", "$parentToggle", button)
toggle.obj = button
button.toggle = toggle
toggle:SetWidth(14) toggle:SetWidth(14)
toggle:SetHeight(14) toggle:SetHeight(14)
toggle:ClearAllPoints()
toggle:SetPoint("TOPRIGHT", button, "TOPRIGHT", -6, -1) toggle:SetPoint("TOPRIGHT", button, "TOPRIGHT", -6, -1)
toggle:SetScript("OnClick", Button_OnClick)
toggle:SetNormalTexture("Interface\\Buttons\\UI-MinusButton-UP") toggle:SetNormalTexture("Interface\\Buttons\\UI-MinusButton-UP")
toggle:SetPushedTexture("Interface\\Buttons\\UI-MinusButton-DOWN") toggle:SetPushedTexture("Interface\\Buttons\\UI-MinusButton-DOWN")
toggle:SetHighlightTexture("Interface\Buttons\UI-PlusButton-Hilight", "ADD") toggle:SetHighlightTexture("Interface\Buttons\UI-PlusButton-Hilight", "ADD")
button.toggle = toggle
local text = button:CreateFontString() local text = button:CreateFontString()
button.text = text button.text = text
@@ -437,6 +419,7 @@ methods = {
end, end,
["RefreshTree"] = function(self,scrollToSelection) ["RefreshTree"] = function(self,scrollToSelection)
local t = GetTime()
local buttons = self.buttons local buttons = self.buttons
local lines = self.lines local lines = self.lines
@@ -545,7 +528,6 @@ methods = {
button:Show() button:Show()
buttonnum = buttonnum + 1 buttonnum = buttonnum + 1
end end
end, end,
["SetSelected"] = function(self, value) ["SetSelected"] = function(self, value)
@@ -556,30 +538,20 @@ methods = {
end end
end, end,
["Select"] = function(self, uniquevalue, a1,a2,a3,a4,a5,a6,a7,a8,a9,a10) ["Select"] = function(self, uniquevalue, ...)
self.filter = false self.filter = false
local status = self.status or self.localstatus local status = self.status or self.localstatus
local groups = status.groups local groups = status.groups
select_args[1] = a1 for i = 1, tgetn(arg) do
select_args[2] = a2 groups[tconcat(arg, "\001", 1, i)] = true
select_args[3] = a3
select_args[4] = a4
select_args[5] = a5
select_args[6] = a6
select_args[7] = a7
select_args[8] = a8
select_args[9] = a9
select_args[10] = a10
for i = 1, tgetn(select_args) do
groups[tconcat(select_args, "\001", 1, i)] = true
end end
status.selected = uniquevalue status.selected = uniquevalue
self:RefreshTree(true) self:RefreshTree(true)
self:Fire("OnGroupSelected", 1, uniquevalue) self:Fire("OnGroupSelected", 1, uniquevalue)
end, end,
["SelectByPath"] = function(self, a1,a2,a3,a4,a5,a6,a7,a8,a9,a10) ["SelectByPath"] = function(self, ...)
self:Select(BuildUniqueValue(a1,a2,a3,a4,a5,a6,a7,a8,a9,a10), a1,a2,a3,a4,a5,a6,a7,a8,a9,a10) self:Select(BuildUniqueValue(unpack(arg)), unpack(arg))
end, end,
["SelectByValue"] = function(self, uniquevalue) ["SelectByValue"] = function(self, uniquevalue)
@@ -667,7 +639,6 @@ methods = {
self:SetHeight((height or 0) + 20) self:SetHeight((height or 0) + 20)
end end
} }
end -- method
--[[----------------------------------------------------------------------------- --[[-----------------------------------------------------------------------------
Constructor Constructor
@@ -12,8 +12,16 @@ local tgetn = table.getn
local PlaySound = PlaySound local PlaySound = PlaySound
local CreateFrame = CreateFrame local CreateFrame = CreateFrame
local fixlevels = AceGUI.fixlevels local function fixlevels(parent,...)
local fixstrata = AceGUI.fixstrata local i = 1
local child = arg[i]
while child do
child:SetFrameLevel(parent:GetFrameLevel()+1)
fixlevels(child, child:GetChildren())
i = i + 1
child = arg[i]
end
end
-- ItemBase is the base "class" for all dropdown items. -- ItemBase is the base "class" for all dropdown items.
-- Each item has to use ItemBase.Create(widgetType) to -- Each item has to use ItemBase.Create(widgetType) to
@@ -78,7 +86,7 @@ function ItemBase.SetPullout(self, pullout)
local itemFrame = pullout.itemFrame local itemFrame = pullout.itemFrame
self.frame:SetParent(itemFrame) self.frame:SetParent(itemFrame)
self.parent = itemFrame self.parent = itemFrame
fixlevels(itemFrame) fixlevels(pullout.itemFrame, pullout.itemFrame:GetChildren())
end end
-- exported -- exported
@@ -17,8 +17,27 @@ local _G = AceCore._G
-- List them here for Mikk's FindGlobals script -- List them here for Mikk's FindGlobals script
-- GLOBALS: CLOSE -- GLOBALS: CLOSE
local fixlevels = AceGUI.fixlevels local function fixlevels(parent,...)
local fixstrata = AceGUI.fixstrata local i = 1
local child = arg[i]
while child do
child:SetFrameLevel(parent:GetFrameLevel()+1)
fixlevels(child, child:GetChildren())
i = i + 1
child = arg[i]
end
end
local function fixstrata(strata, parent, ...)
local i = 1
local child = arg[i]
parent:SetFrameStrata(strata)
while child do
fixstrata(strata, child, child:GetChildren())
i = i + 1
child = arg[i]
end
end
do do
local widgetType = "Dropdown-Pullout" local widgetType = "Dropdown-Pullout"
@@ -187,7 +206,7 @@ do
height = height + 16 height = height + 16
end end
itemFrame:SetHeight(height) itemFrame:SetHeight(height)
fixstrata("TOOLTIP", frame) fixstrata("TOOLTIP", frame, frame:GetChildren())
frame:Show() frame:Show()
self:Fire("OnOpen") self:Fire("OnOpen")
end end
@@ -447,7 +466,7 @@ do
pullout:SetCallback("OnOpen", OnPulloutOpen) pullout:SetCallback("OnOpen", OnPulloutOpen)
self.pullout.frame:SetFrameLevel(self.frame:GetFrameLevel() + 1) self.pullout.frame:SetFrameLevel(self.frame:GetFrameLevel() + 1)
local frame = self.pullout.frame local frame = self.pullout.frame
fixlevels(frame) fixlevels(self.pullout.frame, self.pullout.frame:GetChildren())
self:SetHeight(44) self:SetHeight(44)
self:SetWidth(200) self:SetWidth(200)
+510
View File
@@ -0,0 +1,510 @@
local E, L, V, P, G, _ = unpack(ElvUI);
local WM = E:GetModule("WorldMap");
local MM = E:GetModule("Minimap");
E.Options.args.maps = {
type = "group",
name = L["Maps"],
childGroups = "tab",
args = {
worldMap = {
order = 1,
type = "group",
name = "WORLD_MAP",
args = {
header = {
order = 0,
type = "header",
name = "WORLD_MAP"
},
generalGroup = {
order = 1,
type = "group",
name = L["General"],
guiInline = true,
args = {
smallerWorldMap = {
order = 1,
type = "toggle",
name = L["Smaller World Map"],
desc = L["Make the world map smaller."],
get = function(info) return E.global.general.smallerWorldMap end,
set = function(info, value) E.global.general.smallerWorldMap = value; E:StaticPopup_Show("GLOBAL_RL") end,
},
mapAlphaWhenMoving = {
order = 2,
type = "range",
name = L["Map Opacity When Moving"],
isPercent = true,
min = 0, max = 1, step = 0.01,
get = function(info) return E.global.general.mapAlphaWhenMoving; end,
set = function(info, value) E.global.general.mapAlphaWhenMoving = value; E:GetModule("Misc"):UpdateMapAlpha(); end
},
},
},
spacer = {
order = 3,
type = "description",
name = "\n"
},
coordinatesGroup = {
order = 3,
type = "group",
name = L["World Map Coordinates"],
guiInline = true,
args = {
enable = {
order = 1,
type = "toggle",
name = L["Enable"],
desc = L["Puts coordinates on the world map."],
get = function(info) return E.global.general.WorldMapCoordinates.enable; end,
set = function(info, value) E.global.general.WorldMapCoordinates.enable = value; E:StaticPopup_Show("GLOBAL_RL"); end
},
spacer = {
order = 2,
type = "description",
name = " "
},
position = {
order = 3,
type = "select",
name = L["Position"],
get = function(info) return E.global.general.WorldMapCoordinates.position; end,
set = function(info, value) E.global.general.WorldMapCoordinates.position = value; WM:PositionCoords(); end,
disabled = function() return not E.global.general.WorldMapCoordinates.enable; end,
values = {
["TOP"] = "TOP",
["TOPLEFT"] = "TOPLEFT",
["TOPRIGHT"] = "TOPRIGHT",
["BOTTOM"] = "BOTTOM",
["BOTTOMLEFT"] = "BOTTOMLEFT",
["BOTTOMRIGHT"] = "BOTTOMRIGHT"
}
},
xOffset = {
order = 4,
type = "range",
name = L["X-Offset"],
get = function(info) return E.global.general.WorldMapCoordinates.xOffset; end,
set = function(info, value) E.global.general.WorldMapCoordinates.xOffset = value; WM:PositionCoords(); end,
disabled = function() return not E.global.general.WorldMapCoordinates.enable end,
min = -200, max = 200, step = 1
},
yOffset = {
order = 5,
type = "range",
name = L["Y-Offset"],
get = function(info) return E.global.general.WorldMapCoordinates.yOffset; end,
set = function(info, value) E.global.general.WorldMapCoordinates.yOffset = value; WM:PositionCoords(); end,
disabled = function() return not E.global.general.WorldMapCoordinates.enable end,
min = -200, max = 200, step = 1
}
}
}
}
},
minimap = {
order = 2,
type = "group",
name = "MINIMAP_LABEL",
get = function(info) return E.db.general.minimap[ info[getn(info)] ]; end,
childGroups = "tab",
args = {
header = {
order = 0,
type = "header",
name = "MINIMAP_LABEL"
},
generalGroup = {
order = 1,
type = "group",
name = L["General"],
guiInline = true,
args = {
enable = {
order = 1,
type = "toggle",
name = L["Enable"],
desc = L["Enable/Disable the minimap. |cffFF0000Warning: This will prevent you from seeing the minimap datatexts.|r"],
get = function(info) return E.private.general.minimap[ info[getn(info)] ]; end,
set = function(info, value) E.private.general.minimap[ info[getn(info)] ] = value; E:StaticPopup_Show("PRIVATE_RL"); end,
},
size = {
order = 2,
type = "range",
name = L["Size"],
desc = L["Adjust the size of the minimap."],
min = 120, max = 250, step = 1,
get = function(info) return E.db.general.minimap[ info[getn(info)] ]; end,
set = function(info, value) E.db.general.minimap[ info[getn(info)] ] = value; MM:UpdateSettings(); end,
disabled = function() return not E.private.general.minimap.enable; end
}
}
},
locationTextGroup = {
order = 2,
type = "group",
name = L["Location Text"],
args = {
locationText = {
order = 1,
type = "select",
name = L["Location Text"],
desc = L["Change settings for the display of the location text that is on the minimap."],
get = function(info) return E.db.general.minimap.locationText; end,
set = function(info, value) E.db.general.minimap.locationText = value; MM:UpdateSettings(); MM:Update_ZoneText(); end,
values = {
["MOUSEOVER"] = L["Minimap Mouseover"],
["SHOW"] = L["Always Display"],
["HIDE"] = L["Hide"]
},
disabled = function() return not E.private.general.minimap.enable; end
},
locationFont = {
order = 2,
type = "select",
dialogControl = "LSM30_Font",
name = L["Font"],
values = AceGUIWidgetLSMlists.font,
set = function(info, value) E.db.general.minimap.locationFont = value; MM:Update_ZoneText(); end,
disabled = function() return not E.private.general.minimap.enable; end,
},
locationFontSize = {
order = 3,
type = "range",
name = L["Font Size"],
min = 6, max = 36, step = 1,
set = function(info, value) E.db.general.minimap.locationFontSize = value; MM:Update_ZoneText(); end,
disabled = function() return not E.private.general.minimap.enable end,
},
locationFontOutline = {
order = 4,
type = "select",
name = L["Font Outline"],
set = function(info, value) E.db.general.minimap.locationFontOutline = value; MM:Update_ZoneText(); end,
disabled = function() return not E.private.general.minimap.enable; end,
values = {
["NONE"] = L["None"],
["OUTLINE"] = "OUTLINE",
["MONOCHROMEOUTLINE"] = "MONOCROMEOUTLINE",
["THICKOUTLINE"] = "THICKOUTLINE"
}
}
}
},
zoomResetGroup = {
order = 3,
type = "group",
name = L["Reset Zoom"],
args = {
enableZoomReset = {
order = 1,
type = "toggle",
name = L["Reset Zoom"],
get = function(info) return E.db.general.minimap.resetZoom.enable; end,
set = function(info, value) E.db.general.minimap.resetZoom.enable = value; MM:UpdateSettings(); end,
disabled = function() return not E.private.general.minimap.enable; end
},
zoomResetTime = {
order = 2,
type = "range",
name = L["Seconds"],
min = 1, max = 15, step = 1,
get = function(info) return E.db.general.minimap.resetZoom.time; end,
set = function(info, value) E.db.general.minimap.resetZoom.time = value; MM:UpdateSettings(); end,
disabled = function() return (not E.db.general.minimap.resetZoom.enable or not E.private.general.minimap.enable); end
}
}
},
icons = {
order = 4,
type = "group",
name = L["Minimap Buttons"],
args = {
calendar = {
order = 1,
type = "group",
name = L["Calendar"],
get = function(info) return E.db.general.minimap.icons.calendar[ info[getn(info)] ]; end,
set = function(info, value) E.db.general.minimap.icons.calendar[ info[getn(info)] ] = value; MM:UpdateSettings(); end,
args = {
hideCalendar = {
order = 1,
type = "toggle",
name = L["Hide"],
get = function(info) return E.private.general.minimap.hideCalendar; end,
set = function(info, value) E.private.general.minimap.hideCalendar = value; MM:UpdateSettings(); end,
width = "full"
},
spacer = {
order = 2,
type = "description",
name = "",
width = "full"
},
position = {
order = 3,
type = "select",
name = L["Position"],
disabled = function() return E.private.general.minimap.hideCalendar; end,
values = {
["LEFT"] = L["Left"],
["RIGHT"] = L["Right"],
["TOP"] = L["Top"],
["BOTTOM"] = L["Bottom"],
["TOPLEFT"] = L["Top Left"],
["TOPRIGHT"] = L["Top Right"],
["BOTTOMLEFT"] = L["Bottom Left"],
["BOTTOMRIGHT"] = L["Bottom Right"]
}
},
scale = {
order = 4,
type = "range",
name = L["Scale"],
min = 0.5, max = 2, step = 0.05
},
xOffset = {
order = 5,
type = "range",
name = L["xOffset"],
min = -50, max = 50, step = 1,
disabled = function() return E.private.general.minimap.hideCalendar; end
},
yOffset = {
order = 6,
type = "range",
name = L["yOffset"],
min = -50, max = 50, step = 1,
disabled = function() return E.private.general.minimap.hideCalendar; end
}
}
},
mail = {
order = 2,
type = "group",
name = "MAIL_LABEL",
get = function(info) return E.db.general.minimap.icons.mail[ info[getn(info)] ]; end,
set = function(info, value) E.db.general.minimap.icons.mail[ info[getn(info)] ] = value; MM:UpdateSettings(); end,
args = {
position = {
order = 1,
type = "select",
name = L["Position"],
values = {
["LEFT"] = L["Left"],
["RIGHT"] = L["Right"],
["TOP"] = L["Top"],
["BOTTOM"] = L["Bottom"],
["TOPLEFT"] = L["Top Left"],
["TOPRIGHT"] = L["Top Right"],
["BOTTOMLEFT"] = L["Bottom Left"],
["BOTTOMRIGHT"] = L["Bottom Right"]
}
},
scale = {
order = 2,
type = "range",
name = L["Scale"],
min = 0.5, max = 2, step = 0.05
},
xOffset = {
order = 3,
type = "range",
name = L["xOffset"],
min = -50, max = 50, step = 1
},
yOffset = {
order = 4,
type = "range",
name = L["yOffset"],
min = -50, max = 50, step = 1
}
}
},
lfgEye = {
order = 3,
type = "group",
name = L["LFG Queue"],
get = function(info) return E.db.general.minimap.icons.lfgEye[ info[getn(info)] ]; end,
set = function(info, value) E.db.general.minimap.icons.lfgEye[ info[getn(info)] ] = value; MM:UpdateSettings(); end,
args = {
position = {
order = 1,
type = "select",
name = L["Position"],
values = {
["LEFT"] = L["Left"],
["RIGHT"] = L["Right"],
["TOP"] = L["Top"],
["BOTTOM"] = L["Bottom"],
["TOPLEFT"] = L["Top Left"],
["TOPRIGHT"] = L["Top Right"],
["BOTTOMLEFT"] = L["Bottom Left"],
["BOTTOMRIGHT"] = L["Bottom Right"]
}
},
scale = {
order = 2,
type = "range",
name = L["Scale"],
min = 0.5, max = 2, step = 0.05
},
xOffset = {
order = 3,
type = "range",
name = L["xOffset"],
min = -50, max = 50, step = 1
},
yOffset = {
order = 4,
type = "range",
name = L["yOffset"],
min = -50, max = 50, step = 1
}
}
},
battlefield = {
order = 4,
type = "group",
name = L["PvP Queue"],
get = function(info) return E.db.general.minimap.icons.battlefield[ info[getn(info)] ]; end,
set = function(info, value) E.db.general.minimap.icons.battlefield[ info[getn(info)] ] = value; MM:UpdateSettings(); end,
args = {
position = {
order = 1,
type = "select",
name = L["Position"],
values = {
["LEFT"] = L["Left"],
["RIGHT"] = L["Right"],
["TOP"] = L["Top"],
["BOTTOM"] = L["Bottom"],
["TOPLEFT"] = L["Top Left"],
["TOPRIGHT"] = L["Top Right"],
["BOTTOMLEFT"] = L["Bottom Left"],
["BOTTOMRIGHT"] = L["Bottom Right"]
}
},
scale = {
order = 2,
type = "range",
name = L["Scale"],
min = 0.5, max = 2, step = 0.05
},
xOffset = {
order = 3,
type = "range",
name = L["xOffset"],
min = -50, max = 50, step = 1
},
yOffset = {
order = 4,
type = "range",
name = L["yOffset"],
min = -50, max = 50, step = 1
}
}
},
difficulty = {
order = 5,
type = "group",
name = L["Instance Difficulty"],
get = function(info) return E.db.general.minimap.icons.difficulty[ info[getn(info)] ]; end,
set = function(info, value) E.db.general.minimap.icons.difficulty[ info[getn(info)] ] = value; MM:UpdateSettings(); end,
args = {
position = {
order = 1,
type = "select",
name = L["Position"],
values = {
["LEFT"] = L["Left"],
["RIGHT"] = L["Right"],
["TOP"] = L["Top"],
["BOTTOM"] = L["Bottom"],
["TOPLEFT"] = L["Top Left"],
["TOPRIGHT"] = L["Top Right"],
["BOTTOMLEFT"] = L["Bottom Left"],
["BOTTOMRIGHT"] = L["Bottom Right"]
}
},
scale = {
order = 2,
type = "range",
name = L["Scale"],
min = 0.5, max = 2, step = 0.05
},
xOffset = {
order = 3,
type = "range",
name = L["xOffset"],
min = -50, max = 50, step = 1
},
yOffset = {
order = 4,
type = "range",
name = L["yOffset"],
min = -50, max = 50, step = 1
}
}
},
vehicleLeave = {
order = 6,
type = "group",
name = "LEAVE_VEHICLE",
get = function(info) return E.db.general.minimap.icons.vehicleLeave[ info[getn(info)] ]; end,
set = function(info, value) E.db.general.minimap.icons.vehicleLeave[ info[getn(info)] ] = value; E:GetModule("ActionBars"):UpdateVehicleLeave(); end,
args = {
hide = {
order = 1,
type = "toggle",
name = L["Hide"]
},
spacer = {
order = 2,
type = "description",
name = "",
width = "full"
},
position = {
order = 3,
type = "select",
name = L["Position"],
values = {
["LEFT"] = L["Left"],
["RIGHT"] = L["Right"],
["TOP"] = L["Top"],
["BOTTOM"] = L["Bottom"],
["TOPLEFT"] = L["Top Left"],
["TOPRIGHT"] = L["Top Right"],
["BOTTOMLEFT"] = L["Bottom Left"],
["BOTTOMRIGHT"] = L["Bottom Right"]
}
},
scale = {
order = 4,
type = "range",
name = L["Scale"],
min = 0.5, max = 2, step = 0.05,
},
xOffset = {
order = 5,
type = "range",
name = L["xOffset"],
min = -50, max = 50, step = 1
},
yOffset = {
order = 6,
type = "range",
name = L["yOffset"],
min = -50, max = 50, step = 1
}
}
}
}
}
}
}
}
};
+288
View File
@@ -0,0 +1,288 @@
local E, L, V, P, G = unpack(ElvUI);
local S = E:GetModule("Skins");
E.Options.args.skins = {
type = "group",
name = L["Skins"],
childGroups = "tree",
args = {
intro = {
order = 1,
type = "description",
name = L["SKINS_DESC"]
},
blizzardEnable = {
order = 2,
type = "toggle",
name = "Blizzard",
get = function(info) return E.private.skins.blizzard.enable; end,
set = function(info, value) E.private.skins.blizzard.enable = value; E:StaticPopup_Show("PRIVATE_RL"); end,
},
ace3 = {
order = 3,
type = "toggle",
name = "Ace3",
get = function(info) return E.private.skins.ace3.enable; end,
set = function(info, value) E.private.skins.ace3.enable = value; E:StaticPopup_Show("PRIVATE_RL"); end,
},
blizzard = {
order = 100,
type = "group",
name = "Blizzard",
get = function(info) return E.private.skins.blizzard[ info[getn(info)] ]; end,
set = function(info, value) E.private.skins.blizzard[ info[getn(info)] ] = value; E:StaticPopup_Show("CONFIG_RL"); end,
disabled = function() return not E.private.skins.blizzard.enable end,
guiInline = true,
args = {
achievement = {
type = "toggle",
name = L["Achievement Frame"],
desc = L["TOGGLESKIN_DESC"]
},
alertframes = {
type = "toggle",
name = L["Alert Frames"],
desc = L["TOGGLESKIN_DESC"]
},
arena = {
type = "toggle",
name = L["Arena Frame"],
desc = L["TOGGLESKIN_DESC"]
},
arenaregistrar = {
type = "toggle",
name = L["Arena Registrar"],
desc = L["TOGGLESKIN_DESC"]
},
auctionhouse = {
type = "toggle",
name = L["Auction Frame"],
desc = L["TOGGLESKIN_DESC"]
},
bags = {
type = "toggle",
name = L["Bags"],
desc = L["TOGGLESKIN_DESC"],
disabled = function() return E.private.bags.enable end
},
barber = {
type = "toggle",
name = L["Barbershop Frame"],
desc = L["TOGGLESKIN_DESC"]
},
bgmap = {
type = "toggle",
name = L["BG Map"],
desc = L["TOGGLESKIN_DESC"]
},
bgscore = {
type = "toggle",
name = L["BG Score"],
desc = L["TOGGLESKIN_DESC"]
},
binding = {
type = "toggle",
name = L["KeyBinding Frame"],
desc = L["TOGGLESKIN_DESC"]
},
calendar = {
type = "toggle",
name = L["Calendar Frame"],
desc = L["TOGGLESKIN_DESC"]
},
character = {
type = "toggle",
name = L["Character Frame"],
desc = L["TOGGLESKIN_DESC"]
},
debug = {
type = "toggle",
name = L["Debug Tools"],
desc = L["TOGGLESKIN_DESC"]
},
dressingroom = {
type = "toggle",
name = L["Dressing Room"],
desc = L["TOGGLESKIN_DESC"]
},
friends = {
type = "toggle",
name = L["Friends"],
desc = L["TOGGLESKIN_DESC"]
},
gbank = {
type = "toggle",
name = L["Guild Bank"],
desc = L["TOGGLESKIN_DESC"]
},
gmchat = {
type = "toggle",
name = L["GM Chat"],
desc = L["TOGGLESKIN_DESC"]
},
gossip = {
type = "toggle",
name = L["Gossip Frame"],
desc = L["TOGGLESKIN_DESC"]
},
greeting = {
type = "toggle",
name = L["Greeting Frame"],
desc = L["TOGGLESKIN_DESC"]
},
guildregistrar = {
type = "toggle",
name = L["Guild Registrar"],
desc = L["TOGGLESKIN_DESC"]
},
help = {
type = "toggle",
name = L["Help Frame"],
desc = L["TOGGLESKIN_DESC"]
},
inspect = {
type = "toggle",
name = L["Inspect Frame"],
desc = L["TOGGLESKIN_DESC"]
},
lfd = {
type = "toggle",
name = L["LFD Frame"],
desc = L["TOGGLESKIN_DESC"]
},
lfr = {
type = "toggle",
name = L["LFR Frame"],
desc = L["TOGGLESKIN_DESC"]
},
loot = {
type = "toggle",
name = L["Loot Frames"],
desc = L["TOGGLESKIN_DESC"],
disabled = function() return E.private.general.loot end
},
lootRoll = {
type = "toggle",
name = L["Loot Roll"],
desc = L["TOGGLESKIN_DESC"],
disabled = function() return E.private.general.lootRoll end
},
macro = {
type = "toggle",
name = L["Macro Frame"],
desc = L["TOGGLESKIN_DESC"]
},
mail = {
type = "toggle",
name = L["Mail Frame"],
desc = L["TOGGLESKIN_DESC"]
},
merchant = {
type = "toggle",
name = L["Merchant Frame"],
desc = L["TOGGLESKIN_DESC"]
},
misc = {
type = "toggle",
name = L["Misc Frames"],
desc = L["TOGGLESKIN_DESC"]
},
petition = {
type = "toggle",
name = L["Petition Frame"],
desc = L["TOGGLESKIN_DESC"]
},
pvp = {
type = "toggle",
name = L["PvP Frames"],
desc = L["TOGGLESKIN_DESC"]
},
quest = {
type = "toggle",
name = L["Quest Frames"],
desc = L["TOGGLESKIN_DESC"]
},
raid = {
type = "toggle",
name = L["Raid Frame"],
desc = L["TOGGLESKIN_DESC"]
},
socket = {
type = "toggle",
name = L["Socket Frame"],
desc = L["TOGGLESKIN_DESC"]
},
spellbook = {
type = "toggle",
name = L["Spellbook"],
desc = L["TOGGLESKIN_DESC"]
},
stable = {
type = "toggle",
name = L["Stable"],
desc = L["TOGGLESKIN_DESC"]
},
tabard = {
type = "toggle",
name = L["Tabard Frame"],
desc = L["TOGGLESKIN_DESC"]
},
talent = {
type = "toggle",
name = L["Talent Frame"],
desc = L["TOGGLESKIN_DESC"]
},
taxi = {
type = "toggle",
name = L["Taxi Frame"],
desc = L["TOGGLESKIN_DESC"]
},
tooltip = {
type = "toggle",
name = L["Tooltip"],
desc = L["TOGGLESKIN_DESC"],
},
timemanager = {
type = "toggle",
name = L["Time Manager"],
desc = L["TOGGLESKIN_DESC"]
},
trade = {
type = "toggle",
name = L["Trade Frame"],
desc = L["TOGGLESKIN_DESC"]
},
tradeskill = {
type = "toggle",
name = L["TradeSkill Frame"],
desc = L["TOGGLESKIN_DESC"]
},
trainer = {
type = "toggle",
name = L["Trainer Frame"],
desc = L["TOGGLESKIN_DESC"]
},
tutorial = {
type = "toggle",
name = L["Tutorial Frame"],
desc = L["TOGGLESKIN_DESC"]
},
watchframe = {
type = "toggle",
name = L["Watch Frame"],
desc = L["TOGGLESKIN_DESC"]
},
worldmap = {
type = "toggle",
name = L["World Map"],
desc = L["TOGGLESKIN_DESC"]
},
mirrorTimers = {
type = "toggle",
name = L["Mirror Timers"],
desc = L["TOGGLESKIN_DESC"]
}
}
}
}
};
+322
View File
@@ -0,0 +1,322 @@
local E, L, V, P, G = unpack(ElvUI);
local TT = E:GetModule("Tooltip");
local tonumber, tostring = tonumber, tostring
E.Options.args.tooltip = {
type = "group",
name = L["Tooltip"],
childGroups = "tab",
get = function(info) return E.db.tooltip[ info[getn(info)] ]; end,
set = function(info, value) E.db.tooltip[ info[getn(info)] ] = value; end,
args = {
intro = {
order = 1,
type = "description",
name = L["TOOLTIP_DESC"]
},
enable = {
order = 2,
type = "toggle",
name = L["Enable"],
get = function(info) return E.private.tooltip[ info[getn(info)] ]; end,
set = function(info, value) E.private.tooltip[ info[getn(info)] ] = value; E:StaticPopup_Show("PRIVATE_RL"); end
},
general = {
order = 3,
type = "group",
name = L["General"],
disabled = function() return not E.Tooltip; end,
args = {
header = {
order = 0,
type = "header",
name = L["General"]
},
cursorAnchor = {
order = 1,
type = "toggle",
name = L["Cursor Anchor"],
desc = L["Should tooltip be anchored to mouse cursor"]
},
targetInfo = {
order = 2,
type = "toggle",
name = L["Target Info"],
desc = L["When in a raid group display if anyone in your raid is targeting the current tooltip unit."]
},
playerTitles = {
order = 3,
type = "toggle",
name = L["Player Titles"],
desc = L["Display player titles."]
},
guildRanks = {
order = 4,
type = "toggle",
name = L["Guild Ranks"],
desc = L["Display guild ranks if a unit is guilded."]
},
inspectInfo = {
order = 5,
type = "toggle",
name = L["Inspect Info"],
desc = L["Display the players talent spec and item level in the tooltip, this may not immediately update when mousing over a unit."],
},
spellID = {
order = 6,
type = "toggle",
name = L["Spell/Item IDs"],
desc = L["Display the spell or item ID when mousing over a spell or item tooltip."]
},
itemCount = {
order = 7,
type = "select",
name = L["Item Count"],
desc = L["Display how many of a certain item you have in your possession."],
values = {
["BAGS_ONLY"] = L["Bags Only"],
["BANK_ONLY"] = L["Bank Only"],
["BOTH"] = L["Both"],
["NONE"] = L["None"]
}
},
colorAlpha = {
order = 8,
type = "range",
name = "OPACITY",
isPercent = true,
min = 0, max = 1, step = 0.01
},
fontGroup = {
order = 8,
type = "group",
guiInline = true,
name = L["Tooltip Font Settings"],
args = {
font = {
order = 1,
type = "select", dialogControl = "LSM30_Font",
name = L["Font"],
values = AceGUIWidgetLSMlists.font,
get = function(info) return E.db.tooltip.font; end,
set = function(info, value) E.db.tooltip.font = value; TT:SetTooltipFonts(); end
},
fontOutline = {
order = 2,
name = L["Font Outline"],
type = "select",
values = {
["NONE"] = L["None"],
["OUTLINE"] = "OUTLINE",
["MONOCHROMEOUTLINE"] = "MONOCROMEOUTLINE",
["THICKOUTLINE"] = "THICKOUTLINE"
},
get = function(info) return E.db.tooltip.fontOutline; end,
set = function(info, value) E.db.tooltip.fontOutline = value; TT:SetTooltipFonts(); end,
},
spacer = {
order = 3,
type = "description",
name = ""
},
headerFontSize = {
order = 4,
type = "range",
name = L["Header Font Size"],
min = 4, max = 33, step = 1,
get = function(info) return E.db.tooltip.headerFontSize; end,
set = function(info, value) E.db.tooltip.headerFontSize = value; TT:SetTooltipFonts(); end
},
textFontSize = {
order = 5,
type = "range",
name = L["Text Font Size"],
min = 4, max = 33, step = 1,
get = function(info) return E.db.tooltip.textFontSize end,
set = function(info, value) E.db.tooltip.textFontSize = value; TT:SetTooltipFonts() end
},
smallTextFontSize = {
order = 6,
type = "range",
name = L["Comparison Font Size"],
desc = L["This setting controls the size of text in item comparison tooltips."],
min = 4, max = 33, step = 1,
get = function(info) return E.db.tooltip.smallTextFontSize; end,
set = function(info, value) E.db.tooltip.smallTextFontSize = value; TT:SetTooltipFonts(); end
}
}
},
factionColors = {
order = 9,
type = "group",
name = L["Custom Faction Colors"],
guiInline = true,
args = {
useCustomFactionColors = {
order = 0,
type = "toggle",
name = L["Custom Faction Colors"],
get = function(info) return E.db.tooltip.useCustomFactionColors; end,
set = function(info, value) E.db.tooltip.useCustomFactionColors = value; end
}
},
get = function(info)
local t = E.db.tooltip.factionColors[ tonumber(info[getn(info)]) ];
local d = P.tooltip.factionColors[ tonumber(info[getn(info)]) ];
return t.r, t.g, t.b, t.a, d.r, d.g, d.b;
end,
set = function(info, r, g, b)
local t = E.db.tooltip.factionColors[ tonumber(info[getn(info)]) ];
t.r, t.g, t.b = r, g, b;
end
}
}
},
visibility = {
order = 4,
type = "group",
name = L["Visibility"],
get = function(info) return E.db.tooltip.visibility[ info[getn(info)] ]; end,
set = function(info, value) E.db.tooltip.visibility[ info[getn(info)] ] = value; end,
disabled = function() return not E.Tooltip; end,
args = {
header = {
order = 0,
type = "header",
name = L["Visibility"]
},
actionbars = {
order = 1,
type = "select",
name = L["ActionBars"],
desc = L["Choose when you want the tooltip to show. If a modifer is chosen, then you need to hold that down to show the tooltip."],
values = {
["ALL"] = L["Always Hide"],
["NONE"] = L["Never Hide"],
--["SHIFT"] = SHIFT_KEY,
--["ALT"] = ALT_KEY,
--["CTRL"] = CTRL_KEY
}
},
bags = {
order = 2,
type = "select",
name = L["Bags/Bank"],
desc = L["Choose when you want the tooltip to show. If a modifer is chosen, then you need to hold that down to show the tooltip."],
values = {
["ALL"] = L["Always Hide"],
["NONE"] = L["Never Hide"],
--["SHIFT"] = SHIFT_KEY,
--["ALT"] = ALT_KEY,
--["CTRL"] = CTRL_KEY
}
},
unitFrames = {
order = 3,
type = "select",
name = L["UnitFrames"],
desc = L["Choose when you want the tooltip to show. If a modifer is chosen, then you need to hold that down to show the tooltip."],
values = {
["ALL"] = L["Always Hide"],
["NONE"] = L["Never Hide"],
--["SHIFT"] = SHIFT_KEY,
--["ALT"] = ALT_KEY,
--["CTRL"] = CTRL_KEY
}
},
combat = {
order = 4,
type = "toggle",
name = "COMBAT",
desc = L["Hide tooltip while in combat."]
}
}
},
healthBar = {
order = 5,
type = "group",
name = L["Health Bar"],
get = function(info) return E.db.tooltip.healthBar[ info[getn(info)] ]; end,
set = function(info, value) E.db.tooltip.healthBar[ info[getn(info)] ] = value; end,
disabled = function() return not E.Tooltip; end,
args = {
header = {
order = 0,
type = "header",
name = L["Health Bar"]
},
height = {
order = 1,
type = "range",
name = L["Height"],
min = 1, max = 15, step = 1,
set = function(info, value) E.db.tooltip.healthBar.height = value; GameTooltipStatusBar:Height(value); end
},
statusPosition = {
order = 2,
type = "select",
name = L["Position"],
values = {
["BOTTOM"] = L["Bottom"],
["TOP"] = L["Top"]
}
},
text = {
order = 3,
type = "toggle",
name = L["Text"],
set = function(info, value) E.db.tooltip.healthBar.text = value; if(value) then GameTooltipStatusBar.text:Show(); else GameTooltipStatusBar.text:Hide() end end
},
font = {
order = 4,
type = "select", dialogControl = "LSM30_Font",
name = L["Font"],
values = AceGUIWidgetLSMlists.font,
set = function(info, value)
E.db.tooltip.healthBar.font = value;
GameTooltipStatusBar.text:FontTemplate(E.LSM:Fetch("font", E.db.tooltip.healthBar.font), E.db.tooltip.healthBar.fontSize, E.db.tooltip.healthBar.fontOutline);
end,
disabled = function() return not E.db.tooltip.healthBar.text end
},
fontSize = {
order = 5,
type = "range",
name = L["Font Size"],
min = 6, max = 500, step = 1,
set = function(info, value)
E.db.tooltip.healthBar.fontSize = value;
GameTooltipStatusBar.text:FontTemplate(E.LSM:Fetch("font", E.db.tooltip.healthBar.font), E.db.tooltip.healthBar.fontSize, E.db.tooltip.healthBar.fontOutline);
end,
disabled = function() return not E.db.tooltip.healthBar.text end
},
fontOutline = {
order = 6,
type = "select",
name = L["Font Outline"],
values = {
["NONE"] = L["None"],
["OUTLINE"] = "OUTLINE",
["MONOCHROMEOUTLINE"] = "MONOCROMEOUTLINE",
["THICKOUTLINE"] = "THICKOUTLINE"
},
set = function(info, value)
E.db.tooltip.healthBar.fontOutline = value;
GameTooltipStatusBar.text:FontTemplate(E.LSM:Fetch("font", E.db.tooltip.healthBar.font), E.db.tooltip.healthBar.fontSize, E.db.tooltip.healthBar.fontOutline);
end,
disabled = function() return not E.db.tooltip.healthBar.text end
}
}
}
}
};
for i = 1, 8 do
E.Options.args.tooltip.args.general.args.factionColors.args[tostring(i)] = {
order = i,
type = "color",
hasAlpha = false,
name = _G["FACTION_STANDING_LABEL" .. i],
disabled = function() return not E.Tooltip or not E.db.tooltip.useCustomFactionColors; end,
};
end
+3 -10
View File
@@ -2085,21 +2085,14 @@ E.Options.args.unitframe = {
["FILL"] = L["Fill"] ["FILL"] = L["Fill"]
}, },
}, },
smartRaidFilter = {
order = 4,
name = L["Smart Raid Filter"],
desc = L["Override any custom visibility setting in certain situations, EX: Only show groups 1 and 2 inside a 10 man instance."],
type = "toggle",
set = function(info, value) E.db.unitframe[ info[getn(info)] ] = value; UF:UpdateAllHeaders() end
},
targetOnMouseDown = { targetOnMouseDown = {
order = 5, order = 4,
name = L["Target On Mouse-Down"], name = L["Target On Mouse-Down"],
desc = L["Target units on mouse down rather than mouse up. \n\n|cffFF0000Warning: If you are using the addon 'Clique' you may have to adjust your clique settings when changing this."], desc = L["Target units on mouse down rather than mouse up. \n\n|cffFF0000Warning: If you are using the addon 'Clique' you may have to adjust your clique settings when changing this."],
type = "toggle", type = "toggle",
}, },
auraBlacklistModifier = { auraBlacklistModifier = {
order = 6, order = 5,
type = "select", type = "select",
name = L["Blacklist Modifier"], name = L["Blacklist Modifier"],
desc = L["You need to hold this modifier down in order to blacklist an aura by right-clicking the icon. Set to None to disable the blacklist functionality."], desc = L["You need to hold this modifier down in order to blacklist an aura by right-clicking the icon. Set to None to disable the blacklist functionality."],
@@ -2111,7 +2104,7 @@ E.Options.args.unitframe = {
}, },
}, },
resetFilters = { resetFilters = {
order = 7, order = 6,
name = L["Reset Aura Filters"], name = L["Reset Aura Filters"],
type = "execute", type = "execute",
func = function(info, value) func = function(info, value)