Localization
This commit is contained in:
@ -1,9 +1,11 @@
|
||||
local floor, str_len, tostring, str_sub, str_find = math.floor, string.len, tostring, string.sub, string.find
|
||||
local floor, str_len, tostring, str_sub, str_find, pairs = math.floor, string.len, tostring, string.sub, string.find, pairs
|
||||
local CreateFrame = CreateFrame
|
||||
local GetLocale = GetLocale
|
||||
local GetTime = GetTime
|
||||
|
||||
local Gladdy = LibStub("Gladdy")
|
||||
local L = Gladdy.L
|
||||
local ACDFrame = Gladdy:NewModule("Countdown", nil, {
|
||||
local ACDFrame = Gladdy:NewModule("Arena Countdown", nil, {
|
||||
countdown = true,
|
||||
arenaCountdownSize = 256
|
||||
})
|
||||
@ -13,6 +15,11 @@ function ACDFrame:OnEvent(event, ...)
|
||||
end
|
||||
|
||||
function ACDFrame:Initialize()
|
||||
if ACDFrame.locales[GetLocale()] then
|
||||
self.locale = ACDFrame.locales[GetLocale()]
|
||||
else
|
||||
self.locale = ACDFrame.locales["default"]
|
||||
end
|
||||
self.hidden = false
|
||||
self.countdown = -1
|
||||
self.texturePath = "Interface\\AddOns\\Gladdy\\Images\\Countdown\\";
|
||||
@ -44,6 +51,8 @@ function ACDFrame:Initialize()
|
||||
self.ACDNumOne = ACDNumOne
|
||||
|
||||
self:RegisterMessage("JOINED_ARENA")
|
||||
self:RegisterMessage("ENEMY_SPOTTED")
|
||||
self:RegisterMessage("UNIT_SPEC")
|
||||
end
|
||||
|
||||
function ACDFrame.OnUpdate(self, elapse)
|
||||
@ -82,50 +91,35 @@ function ACDFrame.OnUpdate(self, elapse)
|
||||
self.ACDNumOnes:Hide();
|
||||
self.ACDNumOne:Hide();
|
||||
end
|
||||
if (GetTime() > self.endTime) then
|
||||
self:SetScript("OnUpdate", nil)
|
||||
end
|
||||
end
|
||||
|
||||
function ACDFrame:JOINED_ARENA()
|
||||
self:RegisterEvent("CHAT_MSG_BG_SYSTEM_NEUTRAL")
|
||||
self:SetScript("OnEvent", ACDFrame.OnEvent)
|
||||
self.endTime = GetTime() + 70
|
||||
self:SetScript("OnUpdate", ACDFrame.OnUpdate)
|
||||
end
|
||||
|
||||
function ACDFrame:ENEMY_SPOTTED()
|
||||
ACDFrame:Reset()
|
||||
end
|
||||
|
||||
function ACDFrame:UNIT_SPEC()
|
||||
ACDFrame:Reset()
|
||||
end
|
||||
|
||||
function ACDFrame:CHAT_MSG_BG_SYSTEM_NEUTRAL(msg)
|
||||
if (str_find(msg, "L'ar\195\168ne ouvre ses portes dans 60 secondes !")) then
|
||||
self.countdown = 61
|
||||
return
|
||||
end
|
||||
if (str_find(msg, "L'ar\195\168ne ouvre ses portes dans 30 secondes !")) then
|
||||
self.countdown = 31
|
||||
return
|
||||
end
|
||||
if (str_find(msg, "L'ar\195\168ne ouvre ses portes dans 15 secondes !")) then
|
||||
self.countdown = 16
|
||||
return
|
||||
end
|
||||
if (str_find(msg, "L'ar\195\168ne ouvre ses portes dans 10 secondes !")) then
|
||||
self.countdown = 11
|
||||
return
|
||||
end
|
||||
if (str_find(msg, "One minute until the Arena battle begins!")) then
|
||||
self.countdown = 61
|
||||
return
|
||||
end
|
||||
if (str_find(msg, "Thirty seconds until the Arena battle begins!")) then
|
||||
self.countdown = 31
|
||||
return
|
||||
end
|
||||
if (str_find(msg, "Fifteen seconds until the Arena battle begins!")) then
|
||||
self.countdown = 16
|
||||
return
|
||||
end
|
||||
if (str_find(msg, "Ten seconds until the Arena battle begins!")) then
|
||||
self.countdown = 10
|
||||
return
|
||||
end
|
||||
if (str_find(msg, "The Arena battle has begun!")) then
|
||||
ACDFrame:SetScript("OnUpdate", nil)
|
||||
return
|
||||
for k,v in pairs(self.locale) do
|
||||
if str_find(msg, v) then
|
||||
if k == 0 then
|
||||
ACDFrame:Reset()
|
||||
else
|
||||
self.countdown = k
|
||||
end
|
||||
end
|
||||
end
|
||||
end
|
||||
|
||||
@ -153,6 +147,7 @@ function ACDFrame:Test()
|
||||
end
|
||||
|
||||
function ACDFrame:Reset()
|
||||
self.endTime = 0
|
||||
self.countdown = 0
|
||||
self:UnregisterEvent("CHAT_MSG_BG_SYSTEM_NEUTRAL")
|
||||
self:SetScript("OnUpdate", nil)
|
||||
@ -171,7 +166,7 @@ function ACDFrame:GetOptions()
|
||||
},
|
||||
countdown = Gladdy:option({
|
||||
type = "toggle",
|
||||
name = L["Turn on/off"],
|
||||
name = L["Enabled"],
|
||||
desc = L["Turns countdown before the start of an arena match on/off."],
|
||||
order = 3,
|
||||
width = "full",
|
||||
@ -186,3 +181,66 @@ function ACDFrame:GetOptions()
|
||||
}),
|
||||
}
|
||||
end
|
||||
|
||||
ACDFrame.locales = {
|
||||
["default"] = {
|
||||
[61] = "One minute until the Arena battle begins!",
|
||||
[31] = "Thirty seconds until the Arena battle begins!",
|
||||
[16] = "Fifteen seconds until the Arena battle begins!",
|
||||
[0] = "The Arena battle has begun!",
|
||||
},
|
||||
["esES"] = {
|
||||
[61] = "¡Un minuto hasta que dé comienzo la batalla en arena!",
|
||||
[31] = "¡Treinta segundos hasta que comience la batalla en arena!",
|
||||
[16] = "¡Quince segundos hasta que comience la batalla en arena!",
|
||||
[0] = "¡La batalla en arena ha comenzado!",
|
||||
},
|
||||
["ptBR"] = {
|
||||
[61] = "Um minuto até a batalha na Arena começar!",
|
||||
[31] = "Trinta segundos até a batalha na Arena começar!",
|
||||
[16] = "Quinze segundos até a batalha na Arena começar!",
|
||||
[0] = "A batalha na Arena começou!",
|
||||
},
|
||||
["deDE"] = {
|
||||
[61] = "Noch eine Minute bis der Arenakampf beginnt!",
|
||||
[31] = "Noch dreißig Sekunden bis der Arenakampf beginnt!",
|
||||
[16] = "Noch fünfzehn Sekunden bis der Arenakampf beginnt!",
|
||||
[0] = "Der Arenakampf hat begonnen!",
|
||||
},
|
||||
["frFR"] = {
|
||||
[60] = "Le combat d'arène commence dans une minute\194\160!",
|
||||
[30] = "Le combat d'arène commence dans trente secondes\194\160!",
|
||||
[15] = "Le combat d'arène commence dans quinze secondes\194\160!",
|
||||
[0] = "Le combat d'arène commence\194\160!",
|
||||
},
|
||||
["ruRU"] = {
|
||||
[61] = "Одна минута до начала боя на арене!",
|
||||
[31] = "Тридцать секунд до начала боя на арене!",
|
||||
[16] = "До начала боя на арене осталось 15 секунд.",
|
||||
[0] = "Бой начался!",
|
||||
},
|
||||
["itIT"] = { -- TODO
|
||||
-- Beta has no itIT version available?
|
||||
},
|
||||
["koKR"] = {
|
||||
[61] = "투기장 전투 시작 1분 전입니다!",
|
||||
[31] = "투기장 전투 시작 30초 전입니다!",
|
||||
[16] = "투기장 전투 시작 15초 전입니다!",
|
||||
[0] = "투기장 전투가 시작되었습니다!",
|
||||
},
|
||||
["zhCN"] = {
|
||||
[61] = "竞技场战斗将在一分钟后开始!",
|
||||
[31] = "竞技场战斗将在三十秒后开始!",
|
||||
[16] = "竞技场战斗将在十五秒后开始!",
|
||||
[0] = "竞技场的战斗开始了!",
|
||||
},
|
||||
["zhTW"] = {
|
||||
[61] = "1分鐘後競技場戰鬥開始!",
|
||||
[31] = "30秒後競技場戰鬥開始!",
|
||||
[16] = "15秒後競技場戰鬥開始!",
|
||||
[0] = "競技場戰鬥開始了!",
|
||||
},
|
||||
}
|
||||
|
||||
ACDFrame.locales["esMX"] = ACDFrame.locales["esES"]
|
||||
ACDFrame.locales["ptPT"] = ACDFrame.locales["ptBR"]
|
||||
|
@ -42,7 +42,7 @@ function Auras:Initialize()
|
||||
end
|
||||
|
||||
function Auras:CreateFrame(unit)
|
||||
local auraFrame = CreateFrame("Frame", nil, Gladdy.modules.Classicon.frames[unit])
|
||||
local auraFrame = CreateFrame("Frame", nil, Gladdy.modules["Class Icon"].frames[unit])
|
||||
auraFrame:EnableMouse(false)
|
||||
auraFrame:SetFrameStrata("MEDIUM")
|
||||
auraFrame:SetFrameLevel(3)
|
||||
@ -68,7 +68,7 @@ function Auras:CreateFrame(unit)
|
||||
auraFrame.icon.overlay:SetAllPoints(auraFrame)
|
||||
auraFrame.icon.overlay:SetTexture(Gladdy.db.buttonBorderStyle)
|
||||
|
||||
local classIcon = Gladdy.modules.Classicon.frames[unit]
|
||||
local classIcon = Gladdy.modules["Class Icon"].frames[unit]
|
||||
auraFrame:ClearAllPoints()
|
||||
auraFrame:SetAllPoints(classIcon)
|
||||
|
||||
@ -106,7 +106,7 @@ function Auras:UpdateFrame(unit)
|
||||
|
||||
auraFrame:SetWidth(width)
|
||||
auraFrame:SetHeight(height)
|
||||
auraFrame:SetAllPoints(Gladdy.modules.Classicon.frames[unit])
|
||||
auraFrame:SetAllPoints(Gladdy.modules["Class Icon"].frames[unit])
|
||||
|
||||
auraFrame.cooldown:SetWidth(width - width/16)
|
||||
auraFrame.cooldown:SetHeight(height - height/16)
|
||||
@ -238,12 +238,12 @@ function Auras:GetOptions()
|
||||
group = {
|
||||
type = "group",
|
||||
childGroups = "tree",
|
||||
name = "Frame",
|
||||
name = L["Frame"],
|
||||
order = 3,
|
||||
args = {
|
||||
cooldown = {
|
||||
type = "group",
|
||||
name = "Cooldown",
|
||||
name = L["Cooldown"],
|
||||
order = 1,
|
||||
args = {
|
||||
headerAuras = {
|
||||
@ -272,6 +272,11 @@ function Auras:GetOptions()
|
||||
name = L["Font"],
|
||||
order = 2,
|
||||
args = {
|
||||
headerAuras = {
|
||||
type = "header",
|
||||
name = L["Font"],
|
||||
order = 1,
|
||||
},
|
||||
auraFont = Gladdy:option({
|
||||
type = "select",
|
||||
name = L["Font"],
|
||||
@ -300,7 +305,7 @@ function Auras:GetOptions()
|
||||
},
|
||||
border = {
|
||||
type = "group",
|
||||
name = "Border",
|
||||
name = L["Border"],
|
||||
order = 3,
|
||||
args = {
|
||||
headerAuras = {
|
||||
@ -356,7 +361,7 @@ function Auras:GetAuraOptions(auraType)
|
||||
ckeckAll = {
|
||||
order = 1,
|
||||
width = "0.7",
|
||||
name = "Check All",
|
||||
name = L["Check All"],
|
||||
type = "execute",
|
||||
func = function(info)
|
||||
for k,v in pairs(defaultSpells(auraType)) do
|
||||
@ -367,7 +372,7 @@ function Auras:GetAuraOptions(auraType)
|
||||
uncheckAll = {
|
||||
order = 2,
|
||||
width = "0.7",
|
||||
name = "Uncheck All",
|
||||
name = L["Uncheck All"],
|
||||
type = "execute",
|
||||
func = function(info)
|
||||
for k,v in pairs(defaultSpells(auraType)) do
|
||||
|
@ -25,7 +25,7 @@ local LibClassAuras = LibStub("LibClassAuras-1.0")
|
||||
local L = Gladdy.L
|
||||
local defaultTrackedDebuffs = select(2, Gladdy:GetAuras(AURA_TYPE_DEBUFF))
|
||||
local defaultTrackedBuffs = select(2, Gladdy:GetAuras(AURA_TYPE_BUFF))
|
||||
local BuffsDebuffs = Gladdy:NewModule("BuffsDebuffs", nil, {
|
||||
local BuffsDebuffs = Gladdy:NewModule("Buffs and Debuffs", nil, {
|
||||
buffsEnabled = true,
|
||||
buffsShowAuraDebuffs = false,
|
||||
buffsAlpha = 1,
|
||||
@ -623,7 +623,7 @@ function BuffsDebuffs:GetOptions()
|
||||
},
|
||||
buffsEnabled = Gladdy:option({
|
||||
type = "toggle",
|
||||
name = L["Enable"],
|
||||
name = L["Enabled"],
|
||||
desc = L["Enabled Buffs and Debuffs module"],
|
||||
order = 3,
|
||||
}),
|
||||
@ -636,7 +636,7 @@ function BuffsDebuffs:GetOptions()
|
||||
group = {
|
||||
type = "group",
|
||||
childGroups = "tree",
|
||||
name = "Frame",
|
||||
name = L["Frame"],
|
||||
order = 5,
|
||||
args = {
|
||||
buffs = {
|
||||
@ -646,7 +646,7 @@ function BuffsDebuffs:GetOptions()
|
||||
args = {
|
||||
size = {
|
||||
type = "group",
|
||||
name = "Size & Padding",
|
||||
name = L["Size & Padding"],
|
||||
order = 1,
|
||||
args = {
|
||||
header = {
|
||||
@ -685,7 +685,7 @@ function BuffsDebuffs:GetOptions()
|
||||
},
|
||||
position = {
|
||||
type = "group",
|
||||
name = "Position",
|
||||
name = L["Position"],
|
||||
order = 3,
|
||||
args = {
|
||||
header = {
|
||||
@ -762,7 +762,7 @@ function BuffsDebuffs:GetOptions()
|
||||
args = {
|
||||
size = {
|
||||
type = "group",
|
||||
name = "Size & Padding",
|
||||
name = L["Size & Padding"],
|
||||
order = 1,
|
||||
args = {
|
||||
header = {
|
||||
@ -801,7 +801,7 @@ function BuffsDebuffs:GetOptions()
|
||||
},
|
||||
position = {
|
||||
type = "group",
|
||||
name = "Position",
|
||||
name = L["Position"],
|
||||
order = 3,
|
||||
args = {
|
||||
header = {
|
||||
@ -873,7 +873,7 @@ function BuffsDebuffs:GetOptions()
|
||||
},
|
||||
cooldown = {
|
||||
type = "group",
|
||||
name = "Cooldown",
|
||||
name = L["Cooldown"],
|
||||
order = 3,
|
||||
args = {
|
||||
header = {
|
||||
@ -885,6 +885,7 @@ function BuffsDebuffs:GetOptions()
|
||||
type = "toggle",
|
||||
name = L["No Cooldown Circle"],
|
||||
order = 9,
|
||||
width = "full",
|
||||
}),
|
||||
buffsCooldownAlpha = Gladdy:option({
|
||||
type = "range",
|
||||
|
@ -18,7 +18,7 @@ local BackdropTemplateMixin = BackdropTemplateMixin
|
||||
local Gladdy = LibStub("Gladdy")
|
||||
local L = Gladdy.L
|
||||
local AceGUIWidgetLSMlists = AceGUIWidgetLSMlists
|
||||
local Castbar = Gladdy:NewModule("Castbar", 70, {
|
||||
local Castbar = Gladdy:NewModule("Cast Bar", 70, {
|
||||
castBarHeight = 20,
|
||||
castBarWidth = 160,
|
||||
castBarIconSize = 22,
|
||||
@ -544,12 +544,12 @@ function Castbar:GetOptions()
|
||||
group = {
|
||||
type = "group",
|
||||
childGroups = "tree",
|
||||
name = "Frame",
|
||||
name = L["Frame"],
|
||||
order = 3,
|
||||
args = {
|
||||
barFrame = {
|
||||
type = "group",
|
||||
name = "Bar",
|
||||
name = L["Bar"],
|
||||
order = 1,
|
||||
args = {
|
||||
headerSize = {
|
||||
@ -632,7 +632,7 @@ function Castbar:GetOptions()
|
||||
},
|
||||
icon = {
|
||||
type = "group",
|
||||
name = "Icon",
|
||||
name = L["Icon"],
|
||||
order = 2,
|
||||
args = {
|
||||
headerSize = {
|
||||
@ -669,7 +669,7 @@ function Castbar:GetOptions()
|
||||
},
|
||||
spark = {
|
||||
type = "group",
|
||||
name = "Spark",
|
||||
name = L["Spark"],
|
||||
order = 3,
|
||||
args = {
|
||||
header = {
|
||||
@ -693,7 +693,7 @@ function Castbar:GetOptions()
|
||||
},
|
||||
font = {
|
||||
type = "group",
|
||||
name = "Font",
|
||||
name = L["Font"],
|
||||
order = 4,
|
||||
args = {
|
||||
header = {
|
||||
@ -743,7 +743,7 @@ function Castbar:GetOptions()
|
||||
},
|
||||
position = {
|
||||
type = "group",
|
||||
name = "Position",
|
||||
name = L["Position"],
|
||||
order = 5,
|
||||
args = {
|
||||
header = {
|
||||
|
@ -4,7 +4,7 @@ local Gladdy = LibStub("Gladdy")
|
||||
local CreateFrame = CreateFrame
|
||||
local GetSpellInfo = GetSpellInfo
|
||||
local L = Gladdy.L
|
||||
local Classicon = Gladdy:NewModule("Classicon", 80, {
|
||||
local Classicon = Gladdy:NewModule("Class Icon", 80, {
|
||||
classIconPos = "LEFT",
|
||||
classIconSize = 60 + 20 + 1,
|
||||
classIconWidthFactor = 0.9,
|
||||
@ -195,7 +195,7 @@ function Classicon:GetOptions()
|
||||
group = {
|
||||
type = "group",
|
||||
childGroups = "tree",
|
||||
name = "Frame",
|
||||
name = L["Frame"],
|
||||
order = 4,
|
||||
args = {
|
||||
size = {
|
||||
|
@ -6,7 +6,7 @@ local ANCHORS = { ["LEFT"] = "RIGHT", ["RIGHT"] = "LEFT", ["BOTTOM"] = "TOP", ["
|
||||
local Gladdy = LibStub("Gladdy")
|
||||
local L = Gladdy.L
|
||||
|
||||
local CombatIndicator = Gladdy:NewModule("CombatIndicator", nil, {
|
||||
local CombatIndicator = Gladdy:NewModule("Combat Indicator", nil, {
|
||||
ciEnabled = true,
|
||||
ciSize = 20,
|
||||
ciAlpha = 1,
|
||||
@ -107,21 +107,21 @@ end
|
||||
|
||||
function CombatIndicator:GetOptions()
|
||||
return {
|
||||
headerTrinket = {
|
||||
header = {
|
||||
type = "header",
|
||||
name = L["Racial"],
|
||||
name = L["Combat Indicator"],
|
||||
order = 2,
|
||||
},
|
||||
ciEnabled = Gladdy:option({
|
||||
type = "toggle",
|
||||
name = L["Enabled"],
|
||||
desc = L["Enable ci icon"],
|
||||
desc = L["Enable Combat Indicator icon"],
|
||||
order = 3,
|
||||
}),
|
||||
group = {
|
||||
type = "group",
|
||||
childGroups = "tree",
|
||||
name = "Frame",
|
||||
name = L["Frame"],
|
||||
order = 4,
|
||||
args = {
|
||||
general = {
|
||||
|
@ -576,14 +576,14 @@ function Cooldowns:GetOptions()
|
||||
},
|
||||
cooldown = Gladdy:option({
|
||||
type = "toggle",
|
||||
name = L["Enable"],
|
||||
name = L["Enabled"],
|
||||
desc = L["Enabled cooldown module"],
|
||||
order = 2,
|
||||
}),
|
||||
group = {
|
||||
type = "group",
|
||||
childGroups = "tree",
|
||||
name = "Frame",
|
||||
name = L["Frame"],
|
||||
order = 3,
|
||||
args = {
|
||||
icon = {
|
||||
@ -646,6 +646,7 @@ function Cooldowns:GetOptions()
|
||||
type = "toggle",
|
||||
name = L["No Cooldown Circle"],
|
||||
order = 8,
|
||||
width = "full",
|
||||
}),
|
||||
cooldownCooldownAlpha = Gladdy:option({
|
||||
type = "range",
|
||||
@ -778,7 +779,7 @@ function Cooldowns:GetOptions()
|
||||
cooldowns = {
|
||||
type = "group",
|
||||
childGroups = "tree",
|
||||
name = "Cooldowns",
|
||||
name = L["Cooldowns"],
|
||||
order = 4,
|
||||
args = Cooldowns:GetCooldownOptions(),
|
||||
},
|
||||
|
@ -359,14 +359,14 @@ function Diminishings:GetOptions()
|
||||
},
|
||||
drEnabled = Gladdy:option({
|
||||
type = "toggle",
|
||||
name = L["Enable"],
|
||||
name = L["Enabled"],
|
||||
desc = L["Enabled DR module"],
|
||||
order = 3,
|
||||
}),
|
||||
group = {
|
||||
type = "group",
|
||||
childGroups = "tree",
|
||||
name = "Frame",
|
||||
name = L["Frame"],
|
||||
order = 4,
|
||||
args = {
|
||||
icon = {
|
||||
@ -422,6 +422,7 @@ function Diminishings:GetOptions()
|
||||
type = "toggle",
|
||||
name = L["No Cooldown Circle"],
|
||||
order = 8,
|
||||
width = "full",
|
||||
}),
|
||||
drCooldownAlpha = Gladdy:option({
|
||||
type = "range",
|
||||
|
@ -18,7 +18,7 @@ local function table_copy(t)
|
||||
return t2;
|
||||
end
|
||||
|
||||
local ExportImport = Gladdy:NewModule("ExportImport", nil, {
|
||||
local ExportImport = Gladdy:NewModule("Export Import", nil, {
|
||||
})
|
||||
|
||||
|
||||
|
@ -8,7 +8,7 @@ local RAID_CLASS_COLORS = RAID_CLASS_COLORS
|
||||
local Gladdy = LibStub("Gladdy")
|
||||
local L = Gladdy.L
|
||||
local AceGUIWidgetLSMlists = AceGUIWidgetLSMlists
|
||||
local Healthbar = Gladdy:NewModule("Healthbar", 100, {
|
||||
local Healthbar = Gladdy:NewModule("Health Bar", 100, {
|
||||
healthBarFont = "DorisPP",
|
||||
healthBarHeight = 60,
|
||||
healthBarTexture = "Smooth",
|
||||
@ -344,7 +344,7 @@ function Healthbar:GetOptions()
|
||||
group = {
|
||||
type = "group",
|
||||
childGroups = "tree",
|
||||
name = "Frame",
|
||||
name = L["Frame"],
|
||||
order = 3,
|
||||
args = {
|
||||
general = {
|
||||
@ -478,12 +478,14 @@ function Healthbar:GetOptions()
|
||||
name = L["Show name text"],
|
||||
desc = L["Show the units name"],
|
||||
order = 2,
|
||||
width = "full",
|
||||
}),
|
||||
healthNameToArenaId = option({
|
||||
type = "toggle",
|
||||
name = L["Show ArenaX"],
|
||||
desc = L["Show Arena1-5 as name instead"],
|
||||
order = 3,
|
||||
width = "full",
|
||||
disabled = function() return not Gladdy.db.healthName end
|
||||
}),
|
||||
healthActual = option({
|
||||
@ -491,18 +493,21 @@ function Healthbar:GetOptions()
|
||||
name = L["Show the actual health"],
|
||||
desc = L["Show the actual health on the health bar"],
|
||||
order = 4,
|
||||
width = "full",
|
||||
}),
|
||||
healthMax = option({
|
||||
type = "toggle",
|
||||
name = L["Show max health"],
|
||||
desc = L["Show max health on the health bar"],
|
||||
order = 5,
|
||||
width = "full",
|
||||
}),
|
||||
healthPercentage = option({
|
||||
type = "toggle",
|
||||
name = L["Show health percentage"],
|
||||
desc = L["Show health percentage on the health bar"],
|
||||
order = 6,
|
||||
width = "full",
|
||||
}),
|
||||
},
|
||||
},
|
||||
|
@ -52,7 +52,7 @@ function Highlight:CreateFrame(unit)
|
||||
return
|
||||
end
|
||||
|
||||
local healthBar = Gladdy.modules.Healthbar.frames[unit]
|
||||
local healthBar = Gladdy.modules["Health Bar"].frames[unit]
|
||||
|
||||
local targetBorder = CreateFrame("Frame", nil, button, BackdropTemplateMixin and "BackdropTemplate")
|
||||
targetBorder:SetBackdrop({ edgeFile = Gladdy.LSM:Fetch("border", Gladdy.db.highlightBorderStyle), edgeSize = Gladdy.db.highlightBorderSize })
|
||||
@ -241,16 +241,9 @@ function Highlight:GetOptions()
|
||||
order = 8,
|
||||
hasAlpha = true,
|
||||
}),
|
||||
leaderBorderColor = Gladdy:colorOption({
|
||||
type = "color",
|
||||
name = L["Raid leader border color"],
|
||||
desc = L["Color of the raid leader border"],
|
||||
order = 9,
|
||||
hasAlpha = true,
|
||||
}),
|
||||
headerEnable = {
|
||||
type = "header",
|
||||
name = L["Enable/Disable"],
|
||||
name = L["Enabled"],
|
||||
order = 10,
|
||||
},
|
||||
highlight = Gladdy:option({
|
||||
@ -258,24 +251,21 @@ function Highlight:GetOptions()
|
||||
name = L["Highlight target"],
|
||||
desc = L["Toggle if the selected target should be highlighted"],
|
||||
order = 11,
|
||||
width = "full",
|
||||
}),
|
||||
targetBorder = Gladdy:option({
|
||||
type = "toggle",
|
||||
name = L["Show border around target"],
|
||||
desc = L["Toggle if a border should be shown around the selected target"],
|
||||
order = 12,
|
||||
width = "full",
|
||||
}),
|
||||
focusBorder = Gladdy:option({
|
||||
type = "toggle",
|
||||
name = L["Show border around focus"],
|
||||
desc = L["Toggle of a border should be shown around the current focus"],
|
||||
order = 13,
|
||||
}),
|
||||
leaderBorder = Gladdy:option({
|
||||
type = "toggle",
|
||||
name = L["Show border around raid leader"],
|
||||
desc = L["Toggle if a border should be shown around the raid leader"],
|
||||
order = 14,
|
||||
width = "full",
|
||||
}),
|
||||
}
|
||||
end
|
@ -333,21 +333,21 @@ end
|
||||
|
||||
function Pets:GetOptions()
|
||||
return {
|
||||
headerHealthbar = {
|
||||
header = {
|
||||
type = "header",
|
||||
name = L["Health Bar"],
|
||||
name = L["Pets"],
|
||||
order = 2,
|
||||
},
|
||||
petEnabled = Gladdy:option({
|
||||
type = "toggle",
|
||||
name = L["Enable"],
|
||||
desc = L["Enabled Pets module"],
|
||||
name = L["Enabled"],
|
||||
desc = L["Enables Pets module"],
|
||||
order = 3,
|
||||
}),
|
||||
group = {
|
||||
type = "group",
|
||||
childGroups = "tree",
|
||||
name = "Frame",
|
||||
name = L["Frame"],
|
||||
order = 3,
|
||||
args = {
|
||||
general = {
|
||||
|
@ -6,7 +6,7 @@ local CreateFrame, UnitPower, UnitPowerType, UnitPowerMax, UnitExists = CreateFr
|
||||
local Gladdy = LibStub("Gladdy")
|
||||
local L = Gladdy.L
|
||||
local AceGUIWidgetLSMlists = AceGUIWidgetLSMlists
|
||||
local Powerbar = Gladdy:NewModule("Powerbar", 90, {
|
||||
local Powerbar = Gladdy:NewModule("Power Bar", 90, {
|
||||
powerBarFont = "DorisPP",
|
||||
powerBarHeight = 20,
|
||||
powerBarTexture = "Smooth",
|
||||
@ -132,7 +132,7 @@ function Powerbar:UpdateFrame(unit)
|
||||
return
|
||||
end
|
||||
|
||||
local healthBar = Gladdy.modules.Healthbar.frames[unit]
|
||||
local healthBar = Gladdy.modules["Health Bar"].frames[unit]
|
||||
|
||||
|
||||
powerBar.bg:SetTexture(Gladdy.LSM:Fetch("statusbar", Gladdy.db.powerBarTexture))
|
||||
@ -318,7 +318,7 @@ function Powerbar:GetOptions()
|
||||
group = {
|
||||
type = "group",
|
||||
childGroups = "tree",
|
||||
name = "Frame",
|
||||
name = L["Frame"],
|
||||
order = 3,
|
||||
args = {
|
||||
general = {
|
||||
|
@ -226,7 +226,7 @@ function Racial:GetOptions()
|
||||
group = {
|
||||
type = "group",
|
||||
childGroups = "tree",
|
||||
name = "Frame",
|
||||
name = L["Frame"],
|
||||
order = 4,
|
||||
args = {
|
||||
general = {
|
||||
@ -271,6 +271,7 @@ function Racial:GetOptions()
|
||||
type = "toggle",
|
||||
name = L["No Cooldown Circle"],
|
||||
order = 7,
|
||||
width = "full",
|
||||
}),
|
||||
racialCooldownAlpha = Gladdy:option({
|
||||
type = "range",
|
||||
@ -318,7 +319,7 @@ function Racial:GetOptions()
|
||||
args = {
|
||||
header = {
|
||||
type = "header",
|
||||
name = L["Position"],
|
||||
name = L["Icon position"],
|
||||
order = 4,
|
||||
},
|
||||
racialAnchor = Gladdy:option({
|
||||
@ -335,7 +336,7 @@ function Racial:GetOptions()
|
||||
}),
|
||||
racialPos = Gladdy:option({
|
||||
type = "select",
|
||||
name = L["Position"],
|
||||
name = L["Icon position"],
|
||||
desc = L["This changes position relative to its anchor of the racial icon"],
|
||||
order = 21,
|
||||
values = {
|
||||
|
@ -77,6 +77,13 @@ local localizedTotemData = {
|
||||
[string_lower(select(1, GetSpellInfo(3738)))] = totemData[string_lower("Wrath of Air Totem")], -- Wrath of Air Totem
|
||||
[string_lower(select(1, GetSpellInfo(25908)))] = totemData[string_lower("Tranquil Air Totem")], -- Tranquil Air Totem
|
||||
},
|
||||
["frFR"] = {
|
||||
[string_lower("Totem d'\195\169lementaire de terre")] = totemData[string_lower("Earth Elemental Totem")], -- Earth Elemental Totem
|
||||
[string_lower("Totem d'\195\169lementaire de feu")] = totemData[string_lower("Fire Elemental Totem")], -- Fire Elemental Totem
|
||||
},
|
||||
["ruRU"] = {
|
||||
[string_lower("")] = totemData[string_lower("Sentry Totem")], -- Sentry Totem
|
||||
}
|
||||
}
|
||||
|
||||
local function GetTotemColorDefaultOptions()
|
||||
@ -106,7 +113,7 @@ local function GetTotemColorDefaultOptions()
|
||||
},
|
||||
enabled = {
|
||||
order = 2,
|
||||
name = "Enabled",
|
||||
name = L["Enabled"],
|
||||
desc = "Enable " .. format("|T%s:20|t %s", indexedList[i].texture, select(1, GetSpellInfo(indexedList[i].id))),
|
||||
type = "toggle",
|
||||
width = "full",
|
||||
@ -188,7 +195,7 @@ end
|
||||
|
||||
---------------------------------------------------
|
||||
|
||||
local TotemPlates = Gladdy:NewModule("TotemPlates", nil, {
|
||||
local TotemPlates = Gladdy:NewModule("Totem Plates", nil, {
|
||||
npTotems = true,
|
||||
npTotemsShowFriendly = true,
|
||||
npTotemsShowEnemy = true,
|
||||
@ -286,7 +293,7 @@ function TotemPlates:NAME_PLATE_UNIT_ADDED(...)
|
||||
totemName = string_gsub(totemName, "%s+[I,V,X]+$", "") --trim rank
|
||||
totemName = string_lower(totemName)
|
||||
local nameplate = C_NamePlate.GetNamePlateForUnit(unitID)
|
||||
local totemDataEntry = localizedTotemData["default"][totemName]
|
||||
local totemDataEntry = localizedTotemData["default"][totemName] or localizedTotemData["frFR"][totemName] or localizedTotemData["ruRU"][totemName]
|
||||
if totemDataEntry and Gladdy.db.npTotemColors["totem" .. totemDataEntry.id].enabled then-- modify this nameplates
|
||||
|
||||
if #self.totemPlateCache > 0 then
|
||||
@ -384,12 +391,12 @@ function TotemPlates:GetOptions()
|
||||
return {
|
||||
headerTotems = {
|
||||
type = "header",
|
||||
name = L["Totem General"],
|
||||
name = L["Totem Plates"],
|
||||
order = 2,
|
||||
},
|
||||
npTotems = Gladdy:option({
|
||||
type = "toggle",
|
||||
name = L["Totem icons on/off"],
|
||||
name = L["Enabled"],
|
||||
desc = L["Turns totem icons instead of nameplates on or off. (Requires reload)"],
|
||||
order = 3,
|
||||
width = 0.9,
|
||||
@ -411,7 +418,7 @@ function TotemPlates:GetOptions()
|
||||
group = {
|
||||
type = "group",
|
||||
childGroups = "tree",
|
||||
name = "Frame",
|
||||
name = L["Frame"],
|
||||
order = 4,
|
||||
args = {
|
||||
icon = {
|
||||
@ -590,7 +597,7 @@ function TotemPlates:GetOptions()
|
||||
},
|
||||
npTotemColors = {
|
||||
order = 50,
|
||||
name = "Customize Totems",
|
||||
name = L["Customize Totems"],
|
||||
type = "group",
|
||||
childGroups = "tree",
|
||||
args = select(2, Gladdy:GetTotemColors())
|
||||
|
@ -229,7 +229,7 @@ function Trinket:GetOptions()
|
||||
group = {
|
||||
type = "group",
|
||||
childGroups = "tree",
|
||||
name = "Frame",
|
||||
name = L["Frame"],
|
||||
order = 4,
|
||||
args = {
|
||||
general = {
|
||||
@ -240,11 +240,11 @@ function Trinket:GetOptions()
|
||||
header = {
|
||||
type = "header",
|
||||
name = L["Size"],
|
||||
order = 4,
|
||||
order = 1,
|
||||
},
|
||||
trinketSize = Gladdy:option({
|
||||
type = "range",
|
||||
name = L["Trinket size"],
|
||||
name = L["Size"],
|
||||
min = 5,
|
||||
max = 100,
|
||||
step = 1,
|
||||
@ -274,6 +274,7 @@ function Trinket:GetOptions()
|
||||
type = "toggle",
|
||||
name = L["No Cooldown Circle"],
|
||||
order = 7,
|
||||
width = "full",
|
||||
}),
|
||||
trinketCooldownAlpha = Gladdy:option({
|
||||
type = "range",
|
||||
@ -321,12 +322,12 @@ function Trinket:GetOptions()
|
||||
args = {
|
||||
header = {
|
||||
type = "header",
|
||||
name = L["Position"],
|
||||
name = L["Icon position"],
|
||||
order = 4,
|
||||
},
|
||||
trinketPos = Gladdy:option({
|
||||
type = "select",
|
||||
name = L["Trinket position"],
|
||||
name = L["Icon position"],
|
||||
desc = L["This changes positions of the trinket"],
|
||||
order = 21,
|
||||
values = {
|
||||
|
@ -5,9 +5,9 @@ local XiconProfiles = Gladdy:NewModule("XiconProfiles", nil, {
|
||||
})
|
||||
|
||||
function XiconProfiles:ApplyKlimp()
|
||||
local deserialized = Gladdy.modules["ExportImport"]:Decode(Gladdy:GetKlimpProfile())
|
||||
local deserialized = Gladdy.modules["Export Import"]:Decode(Gladdy:GetKlimpProfile())
|
||||
if deserialized then
|
||||
Gladdy.modules["ExportImport"]:ApplyImport(deserialized, Gladdy.db)
|
||||
Gladdy.modules["Export Import"]:ApplyImport(deserialized, Gladdy.db)
|
||||
end
|
||||
Gladdy:Reset()
|
||||
Gladdy:HideFrame()
|
||||
@ -15,9 +15,9 @@ function XiconProfiles:ApplyKlimp()
|
||||
end
|
||||
|
||||
function XiconProfiles:ApplyKnall()
|
||||
local deserialized = Gladdy.modules["ExportImport"]:Decode(Gladdy:GetKnallProfile())
|
||||
local deserialized = Gladdy.modules["Export Import"]:Decode(Gladdy:GetKnallProfile())
|
||||
if deserialized then
|
||||
Gladdy.modules["ExportImport"]:ApplyImport(deserialized, Gladdy.db)
|
||||
Gladdy.modules["Export Import"]:ApplyImport(deserialized, Gladdy.db)
|
||||
end
|
||||
Gladdy:Reset()
|
||||
Gladdy:HideFrame()
|
||||
@ -25,7 +25,7 @@ function XiconProfiles:ApplyKnall()
|
||||
end
|
||||
|
||||
function XiconProfiles:ApplyClassic()
|
||||
local deserialized = Gladdy.modules["ExportImport"]:Decode(Gladdy:GetClassicProfile())
|
||||
local deserialized = Gladdy.modules["Export Import"]:Decode(Gladdy:GetClassicProfile())
|
||||
if deserialized then
|
||||
Gladdy.modules["ExportImport"]:ApplyImport(deserialized, Gladdy.db)
|
||||
end
|
||||
@ -35,9 +35,9 @@ function XiconProfiles:ApplyClassic()
|
||||
end
|
||||
|
||||
function XiconProfiles:ApplyBlizz()
|
||||
local deserialized = Gladdy.modules["ExportImport"]:Decode(Gladdy:GetBlizzardProfile())
|
||||
local deserialized = Gladdy.modules["Export Import"]:Decode(Gladdy:GetBlizzardProfile())
|
||||
if deserialized then
|
||||
Gladdy.modules["ExportImport"]:ApplyImport(deserialized, Gladdy.db)
|
||||
Gladdy.modules["Export Import"]:ApplyImport(deserialized, Gladdy.db)
|
||||
end
|
||||
Gladdy:Reset()
|
||||
Gladdy:HideFrame()
|
||||
@ -48,7 +48,7 @@ function XiconProfiles:GetOptions()
|
||||
return {
|
||||
headerProfileBlizzard = {
|
||||
type = "header",
|
||||
name = L["Blizzard Profile"],
|
||||
name = "Blizzard " .. L["Profile"],
|
||||
order = 2,
|
||||
},
|
||||
blizzardProfile = {
|
||||
@ -58,7 +58,7 @@ function XiconProfiles:GetOptions()
|
||||
XiconProfiles:ApplyBlizz()
|
||||
end,
|
||||
name = " ",
|
||||
desc = "Blizzard Profile",
|
||||
desc = "Blizzard " .. L["Profile"],
|
||||
image = "Interface\\AddOns\\Gladdy\\Images\\BasicProfiles\\Blizz1.blp",
|
||||
imageWidth = 350,
|
||||
imageHeight = 175,
|
||||
@ -67,7 +67,7 @@ function XiconProfiles:GetOptions()
|
||||
},
|
||||
headerProfileClassic = {
|
||||
type = "header",
|
||||
name = L["Classic Profile"],
|
||||
name = "Classic " .. L["Profile"],
|
||||
order = 4,
|
||||
},
|
||||
classicProfile = {
|
||||
@ -77,7 +77,7 @@ function XiconProfiles:GetOptions()
|
||||
XiconProfiles:ApplyClassic()
|
||||
end,
|
||||
name = " ",
|
||||
desc = "Classic Profile",
|
||||
desc = "Classic " .. L["Profile"],
|
||||
image = "Interface\\AddOns\\Gladdy\\Images\\BasicProfiles\\Classic1.blp",
|
||||
imageWidth = 350,
|
||||
imageHeight = 175,
|
||||
@ -86,7 +86,7 @@ function XiconProfiles:GetOptions()
|
||||
},
|
||||
headerProfileKnall = {
|
||||
type = "header",
|
||||
name = L["Knall's Profile"],
|
||||
name = "Knall's " .. L["Profile"],
|
||||
order = 6,
|
||||
},
|
||||
knallProfile = {
|
||||
@ -96,7 +96,7 @@ function XiconProfiles:GetOptions()
|
||||
XiconProfiles:ApplyKnall()
|
||||
end,
|
||||
name = " ",
|
||||
desc = "Knall's Profile",
|
||||
desc = "Knall's " .. L["Profile"],
|
||||
image = "Interface\\AddOns\\Gladdy\\Images\\BasicProfiles\\Knall1.blp",
|
||||
imageWidth = 350,
|
||||
imageHeight = 175,
|
||||
@ -105,7 +105,7 @@ function XiconProfiles:GetOptions()
|
||||
},
|
||||
headerProfileKlimp = {
|
||||
type = "header",
|
||||
name = L["Klimp's Profile"],
|
||||
name = "Klimp's " .. L["Profile"],
|
||||
order = 8,
|
||||
},
|
||||
klimpProfiles = {
|
||||
@ -118,7 +118,7 @@ function XiconProfiles:GetOptions()
|
||||
imageWidth = 350,
|
||||
imageHeight = 175,
|
||||
name = " ",
|
||||
desc = "Klimp's Profile",
|
||||
desc = "Klimp's " .. L["Profile"],
|
||||
width = "full",
|
||||
order = 9,
|
||||
},
|
||||
|
Reference in New Issue
Block a user