diff --git a/EUI__General_Options.lua b/EUI__General_Options.lua index 19466efc..bae67d26 100644 --- a/EUI__General_Options.lua +++ b/EUI__General_Options.lua @@ -60,7 +60,7 @@ function EllesmereUI._BuildWhatsNewPage(pageName, parent, yOffset) -- Display title: "Module: Title" -- the module name is prepended to every entry. local function TitleOf(e) - return ((e.module and e.module .. ": ") or "") .. (e.title or "") + return ((e.module and EllesmereUI.L(e.module) .. ": ") or "") .. (EllesmereUI.L(e.title) or "") end -- Stable sort by module display name so same-module entries group together @@ -115,7 +115,7 @@ function EllesmereUI._BuildWhatsNewPage(pageName, parent, yOffset) PP.Point(descFs, "TOPLEFT", titleFs, "BOTTOMLEFT", 0, -7) PP.Point(descFs, "RIGHT", card, "RIGHT", -16, 0) descFs:SetJustifyH("LEFT"); descFs:SetJustifyV("TOP"); descFs:SetWordWrap(true) - descFs:SetText(entry.desc or "") + descFs:SetText(EllesmereUI.L(entry.desc) or "") -- Clickable only when the entry has a nav target. An entry with no nav -- (automatic behavior with no setting to open -- e.g. party frames in @@ -158,7 +158,7 @@ function EllesmereUI._BuildWhatsNewPage(pageName, parent, yOffset) PP.Point(subFs, "TOPLEFT", titleFs, "BOTTOMLEFT", 0, -4) PP.Point(subFs, "RIGHT", row, "RIGHT", -10, 0) subFs:SetJustifyH("LEFT"); subFs:SetWordWrap(false) - subFs:SetText(entry.desc or "") + subFs:SetText(EllesmereUI.L(entry.desc) or "") -- Clickable only when the entry has a nav target (see MakeHeroCard); a -- nav-less listing renders static with no hover or click. @@ -255,7 +255,7 @@ function EllesmereUI._BuildWhatsNewPage(pageName, parent, yOffset) local _, sh = W:SectionHeader(parent, "BUG FIXES", y); y = y - sh y = y - 10 -- extra spacing below the divider for _, fx in ipairs(fixes) do - local fh = MakeFixLine(y, ((fx.module and fx.module .. ": ") or "") .. (fx.text or "")); y = y - fh + local fh = MakeFixLine(y, ((fx.module and EllesmereUI.L(fx.module) .. ": ") or "") .. (EllesmereUI.L(fx.text) or "")); y = y - fh end end @@ -389,7 +389,7 @@ EllesmereUI._WHATSNEW_PATCHES = { module = "Cooldown Manager", title = "Keep Buffs in Same Place", desc = "Reserve a fixed slot for every tracked buff so active buffs stop shifting when others fall off, while empty slots stay invisible.", - nav = { module = "EllesmereUICooldownManager", page = "CDM Bars", section = "Bar Layout", highlight = "Keep Buffs in Same Place", + nav = { module = "EllesmereUICooldownManager", page = "CDM Bars", section = "BAR LAYOUT", highlight = "Keep Buffs in Same Place", preSelect = function() if EllesmereUI._setCDMBar then EllesmereUI._setCDMBar("buffs") end end }, @@ -623,7 +623,7 @@ EllesmereUI._WHATSNEW_PATCHES = { module = "Cooldown Manager", title = "Always Show Buffs is now Per-Bar", desc = "Always Show Buffs is now a per-bar toggle, so each buff bar can keep its tracked buffs on screen even when they are off cooldown.", - nav = { module = "EllesmereUICooldownManager", page = "CDM Bars", section = "Icon Display", highlight = "Always Show Buffs", + nav = { module = "EllesmereUICooldownManager", page = "CDM Bars", section = "ICON DISPLAY", highlight = "Always Show Buffs", preSelect = function() if EllesmereUI._setCDMBar then EllesmereUI._setCDMBar("buffs") end end }, @@ -867,7 +867,7 @@ EllesmereUI._WHATSNEW_PATCHES = { module = "Cooldown Manager", title = "Always Show Buffs, Now Per-Bar", desc = "Always Show Buffs is now a per-bar toggle, so each buff bar can independently keep its tracked buffs on screen even when they are off cooldown, with its own option to grey out the inactive ones.", - nav = { module = "EllesmereUICooldownManager", page = "CDM Bars", section = "Icon Display", highlight = "Always Show Buffs", + nav = { module = "EllesmereUICooldownManager", page = "CDM Bars", section = "ICON DISPLAY", highlight = "Always Show Buffs", preSelect = function() if EllesmereUI._setCDMBar then EllesmereUI._setCDMBar("buffs") end end }, @@ -906,13 +906,13 @@ EllesmereUI._WHATSNEW_PATCHES = { module = "Cooldown Manager", title = "Customizable Pixel Glow", desc = "CD and Utility bars get a Pixel Glow Thickness slider plus a cog for Lines and Speed, and the Buff Glow's Pixel Glow gets a matching Lines, Thickness, and Speed cog.", - nav = { module = "EllesmereUICooldownManager", page = "CDM Bars", section = "Icon Display", highlight = "Pixel Glow Thickness" }, + nav = { module = "EllesmereUICooldownManager", page = "CDM Bars", section = "ICON DISPLAY", highlight = "Pixel Glow Thickness" }, }, { module = "Cooldown Manager", title = "Charge & Stack Text Positioning", desc = "Place the charge or stack count in any corner or the center, and preset potions and healthstones now show a sample count in the preview.", - nav = { module = "EllesmereUICooldownManager", page = "CDM Bars", section = "Icon Display", highlight = "Charge/Stack Size" }, + nav = { module = "EllesmereUICooldownManager", page = "CDM Bars", section = "ICON DISPLAY", highlight = "Charge/Stack Size" }, }, { module = "Raid Frames", @@ -958,7 +958,7 @@ EllesmereUI._WHATSNEW_PATCHES = { module = "Cooldown Manager", title = "Group Tracking Bars", desc = "Pick which tracking bars chain together and share width and height, with a per-bar checklist.", - nav = { module = "EllesmereUICooldownManager", page = "Tracking Bars", section = "Bar Grouping", highlight = "Group Tracking" }, + nav = { module = "EllesmereUICooldownManager", page = "Tracking Bars", section = "BAR GROUPING", highlight = "Group Tracking" }, }, { module = "Nameplates", @@ -972,7 +972,7 @@ EllesmereUI._WHATSNEW_PATCHES = { module = "Cooldown Manager", title = "Bloodlust & Heroism Bars", desc = "Add Bloodlust or Heroism to a Custom Auras bar as a self-timed 40-second icon.", - nav = { module = "EllesmereUICooldownManager", page = "CDM Bars", section = "Bar Layout", highlight = "" }, + nav = { module = "EllesmereUICooldownManager", page = "CDM Bars", section = "BAR LAYOUT", highlight = "" }, }, { module = "Nameplates", @@ -1079,7 +1079,7 @@ EllesmereUI._WHATSNEW_PATCHES = { module = "Cooldown Manager", title = "Hide Items if Missing", desc = "Hide a bar's consumables entirely when you have none, instead of dimming them.", - nav = { module = "EllesmereUICooldownManager", page = "CDM Bars", section = "Extras", highlight = "Hide Items if Missing" }, + nav = { module = "EllesmereUICooldownManager", page = "CDM Bars", section = "EXTRAS", highlight = "Hide Items if Missing" }, }, { module = "Resource Bars", @@ -1808,18 +1808,18 @@ initFrame:SetScript("OnEvent", function(self) -- who booted the wrong language can always read and change it. local langValues = { _noLoc = true, - ["auto"] = { text = "Automatic (Client)" }, + ["auto"] = { text = EllesmereUI.L("Automatic (Client)") }, ["enUS"] = { text = "English" }, ["deDE"] = { text = "Deutsch" }, - ["frFR"] = { text = "Francais" }, - ["esES"] = { text = "Espanol (EU)" }, - ["esMX"] = { text = "Espanol (LatAm)" }, + ["frFR"] = { text = "Français" }, + ["esES"] = { text = "Español (EU)" }, + ["esMX"] = { text = "Español (LatAm)" }, ["itIT"] = { text = "Italiano" }, - ["ptBR"] = { text = "Portugues (BR)" }, - ["ruRU"] = { text = "Russian" }, - ["koKR"] = { text = "Korean" }, - ["zhCN"] = { text = "Chinese (Simplified)" }, - ["zhTW"] = { text = "Chinese (Traditional)" }, + ["ptBR"] = { text = "Português (BR)" }, + ["ruRU"] = { text = "Русский" }, + ["koKR"] = { text = "한국어" }, + ["zhCN"] = { text = "简体中文" }, + ["zhTW"] = { text = "繁體中文" }, } local langOrder = { "auto", "enUS", "deDE", "frFR", "esES", "esMX", "itIT", "ptBR", "ruRU", "koKR", "zhCN", "zhTW" } @@ -2734,10 +2734,10 @@ initFrame:SetScript("OnEvent", function(self) local names = {} for i, me in ipairs(moduleEntries) do if selectedModuleMap[i] then - names[#names + 1] = me.display + names[#names + 1] = EllesmereUI.L(me.display) end end - if #names == 0 then return "Select Module" end + if #names == 0 then return EllesmereUI.L("Select Module") end return table.concat(names, ", ") end @@ -2930,7 +2930,7 @@ initFrame:SetScript("OnEvent", function(self) lbl2:SetPoint("RIGHT", item, "RIGHT", -8, 0) lbl2:SetJustifyH("LEFT") lbl2:SetWordWrap(false) - lbl2:SetText(me.display) + lbl2:SetText(EllesmereUI.L(me.display)) item:SetScript("OnClick", function() selectedModuleMap[i] = not selectedModuleMap[i] @@ -3122,7 +3122,7 @@ initFrame:SetScript("OnEvent", function(self) -- Use W:DualRow for the standard label-left / dropdown-right layout local dualRow, dualH dualRow, dualH = W:DualRow(listContainer, -totalH, - { type = "dropdown", text = entry.display .. " Font", + { type = "dropdown", text = EllesmereUI.L(entry.display) .. EllesmereUI.L(" Font"), values = mfFontValues, order = mfFontOrder, getValue = function() local fdb = EllesmereUI.GetFontsDB() @@ -3138,7 +3138,7 @@ initFrame:SetScript("OnEvent", function(self) end FontReload() end }, - { type = "dropdown", text = entry.display .. " Outline", + { type = "dropdown", text = EllesmereUI.L(entry.display) .. EllesmereUI.L(" Outline"), values = outlineValues, order = outlineOrder, getValue = function() local fdb = EllesmereUI.GetFontsDB() @@ -3220,7 +3220,7 @@ initFrame:SetScript("OnEvent", function(self) local lbl = (LOCALIZED_CLASS_NAMES_MALE and LOCALIZED_CLASS_NAMES_MALE[token]) or CLASS_LABELS[token] local def = CLASS_COLOR_MAP[token] or { r = 1, g = 1, b = 1 } classItems[#classItems + 1] = { - label = lbl, + label = EllesmereUI.L(lbl), classToken = token, getColor = function() local db = GetCustomColorsDB() @@ -3258,7 +3258,7 @@ initFrame:SetScript("OnEvent", function(self) local lbl = _G[pk] or POWER_LABELS[pk] or pk local def = DEFAULT_POWER_COLORS[pk] or { r = 1, g = 1, b = 1 } powerItems[#powerItems + 1] = { - label = lbl, + label = EllesmereUI.L(lbl), classToken = nil, getColor = function() local db = GetCustomColorsDB() @@ -3588,7 +3588,7 @@ initFrame:SetScript("OnEvent", function(self) end local function FormatKey(key) - if not key then return "Not Bound" end + if not key then return EllesmereUI.L("Not Bound") end local parts = {} for mod in key:gmatch("(%u+)%-") do parts[#parts + 1] = mod:sub(1, 1) .. mod:sub(2):lower() @@ -4276,7 +4276,7 @@ initFrame:SetScript("OnEvent", function(self) local names = {} for f in pairs(members) do if f ~= item.canon then - names[#names + 1] = (CANON_DISPLAY[f] or f) + names[#names + 1] = EllesmereUI.L(CANON_DISPLAY[f] or f) end end if #names > 0 then @@ -4747,7 +4747,7 @@ initFrame:SetScript("OnEvent", function(self) local lbl = EllesmereUI.MakeFont(btn, 12, nil, EG.r, EG.g, EG.b) lbl:SetAlpha(0.7) lbl:SetPoint("CENTER") - lbl:SetText(text) + lbl:SetText(EllesmereUI.L(text)) local prog, target = 0, 0 local FADE = 0.1 local lerp = EllesmereUI.lerp @@ -5281,14 +5281,14 @@ initFrame:SetScript("OnEvent", function(self) PP.Point(titleFs, "RIGHT", card, "RIGHT", -14, 0) titleFs:SetJustifyH("LEFT") titleFs:SetWordWrap(false) - titleFs:SetText(cardTitle) + titleFs:SetText(EllesmereUI.L(cardTitle)) local descFs = EllesmereUI.MakeFont(card, 11, nil, 1, 1, 1, 0.35) PP.Point(descFs, "TOPLEFT", titleFs, "BOTTOMLEFT", 0, -4) PP.Point(descFs, "RIGHT", card, "RIGHT", -14, 0) descFs:SetJustifyH("LEFT") descFs:SetWordWrap(false) - descFs:SetText(cardDesc) + descFs:SetText(EllesmereUI.L(cardDesc)) card:SetScript("OnEnter", function() bg:SetColorTexture(0.11, 0.13, 0.15, 0.50) @@ -5618,12 +5618,12 @@ initFrame:SetScript("OnEvent", function(self) newName = newName and strtrim(newName) or "" if newName == "" or newName == capName then return end if newName == "Default" then - print("|cffff6060[EllesmereUI]|r Cannot rename to \"Default\".") + print(EllesmereUI.L("|EllesmereUI]|r Cannot rename to \"Default\".")) return end local _, profs = EllesmereUI.GetProfileList() if profs and profs[newName] then - print("|cffff6060[EllesmereUI]|r A profile named \"" .. newName .. "\" already exists.") + print(EllesmereUI.Lf("|cffff6060[EllesmereUI]|r A profile named \"%1$s\" already exists.", newName)) return end EllesmereUI.RenameProfile(capName, newName) @@ -6126,7 +6126,7 @@ initFrame:SetScript("OnEvent", function(self) local names = {} for f in pairs(members) do if f ~= item.folder then - names[#names + 1] = (FOLDER_DISPLAY[f] or f) + names[#names + 1] = (EllesmereUI.L(FOLDER_DISPLAY[f] or f)) end end if #names > 0 then diff --git a/EllesmereUI.lua b/EllesmereUI.lua index 2cb57780..8bfc4f94 100644 --- a/EllesmereUI.lua +++ b/EllesmereUI.lua @@ -5000,7 +5000,7 @@ function EllesmereUI:ShowInfoPopup(opts) local popup = CreateInfoPopup() popup._title:SetText(EllesmereUI.L(opts.title or "Information")) - popup._contentFS:SetText(opts.content or "") + popup._contentFS:SetText(EllesmereUI.L(opts.content) or "") -- Resize scroll child to fit content after a frame C_Timer.After(0.01, function() @@ -5955,7 +5955,7 @@ local function CreateMainFrame() local sbPlaceholder = MakeFont(sidebarSearchFrame, 12, nil, TEXT_DIM.r, TEXT_DIM.g, TEXT_DIM.b, 0.3) sbPlaceholder:SetPoint("LEFT", sidebarSearchFrame, "LEFT", 10, 0) - sbPlaceholder:SetText("Search Features...") + sbPlaceholder:SetText(EllesmereUI.L("Search Features...")) local sbClearBtn = CreateFrame("Button", nil, sidebarSearchFrame) sbClearBtn:SetSize(20, 20) diff --git a/EllesmereUIActionBars/EUI_ActionBars_Options.lua b/EllesmereUIActionBars/EUI_ActionBars_Options.lua index 83780fdb..d8d11278 100644 --- a/EllesmereUIActionBars/EUI_ActionBars_Options.lua +++ b/EllesmereUIActionBars/EUI_ActionBars_Options.lua @@ -1792,7 +1792,7 @@ initFrame:SetScript("OnEvent", function(self) local target = wt or ht if target then local name = (EllesmereUI.GetBarLabel and EllesmereUI.GetBarLabel(target)) or target - return "Size matched to " .. name .. ". Unmatch in Unlock Mode to edit." + return EllesmereUI.Lf("Size matched to %1$s. Unmatch in Unlock Mode to edit.", name) end return BLIZZ_DIS_TIP end, diff --git a/EllesmereUICooldownManager/EUI_CooldownManager_Options.lua b/EllesmereUICooldownManager/EUI_CooldownManager_Options.lua index 772416e0..3c9bac24 100644 --- a/EllesmereUICooldownManager/EUI_CooldownManager_Options.lua +++ b/EllesmereUICooldownManager/EUI_CooldownManager_Options.lua @@ -2932,7 +2932,7 @@ initFrame:SetScript("OnEvent", function(self) ------------------------------------------------------------------- -- BAR GROUPING (shared across all bars) ------------------------------------------------------------------- - _, h = W:SectionHeader(parent, "Bar Grouping", y); y = y - h + _, h = W:SectionHeader(parent, "BAR GROUPING", y); y = y - h -- Group Tracking Bars (per-bar checkbox dropdown) | Grouped Grow Direction -- The checkbox dropdown lists every bar; checked bars chain together and @@ -3015,7 +3015,7 @@ initFrame:SetScript("OnEvent", function(self) ------------------------------------------------------------------- -- BAR LAYOUT ------------------------------------------------------------------- - _, h = W:SectionHeader(parent, "Bar Layout", y); y = y - h + _, h = W:SectionHeader(parent, "BAR LAYOUT", y); y = y - h -- Height | Width -- The whole group shares one width/height, so a grouped member inherits @@ -3701,7 +3701,7 @@ initFrame:SetScript("OnEvent", function(self) ----------------------------------------------------------------------- -- EXTRAS ----------------------------------------------------------------------- - _, h = W:SectionHeader(parent, "Extras", y); y = y - h + _, h = W:SectionHeader(parent, "EXTRAS", y); y = y - h -- Row 1: Enable Max Stacks (toggle + inline slider) | Ticks at Stacks (label + inline input) local function maxStacksOff() @@ -9405,7 +9405,7 @@ initFrame:SetScript("OnEvent", function(self) end if not isFocusKick then - _, h = W:SectionHeader(parent, "Bar Layout", y); y = y - h + _, h = W:SectionHeader(parent, "BAR LAYOUT", y); y = y - h -- Row 1: (Sync) Visibility | Visibility Options (checkbox dropdown) local visRow, visH = W:DualRow(parent, y, @@ -10008,7 +10008,7 @@ initFrame:SetScript("OnEvent", function(self) hint:SetTextColor(0.62, 0.62, 0.62, 0.9) y = y - 32 end - _, h = W:SectionHeader(parent, "Icon Display", y); y = y - h + _, h = W:SectionHeader(parent, "ICON DISPLAY", y); y = y - h -- Active State Animation dropdown values local ACTIVE_ANIM_VALUES = { @@ -11212,7 +11212,7 @@ initFrame:SetScript("OnEvent", function(self) local isCustomBuffBar = (barData.barType == "custom_buff") local isAnyBuffBar = isBuffGlowBar -- buffs or custom_buff if not isCustomBuffBar and not isFocusKick then - _, h = W:SectionHeader(parent, "Extras", y); y = y - h + _, h = W:SectionHeader(parent, "EXTRAS", y); y = y - h -- Show Tooltip | Show Keybind (not for buff bars) if not isAnyBuffBar then diff --git a/EllesmereUINameplates/EUI_Nameplates_Options.lua b/EllesmereUINameplates/EUI_Nameplates_Options.lua index 28fa75ac..380b8b07 100644 --- a/EllesmereUINameplates/EUI_Nameplates_Options.lua +++ b/EllesmereUINameplates/EUI_Nameplates_Options.lua @@ -4255,7 +4255,7 @@ initFrame:SetScript("OnEvent", function(self) -- X slider row local X_ROW_Y = -(TOP_PAD + TITLE_H + TITLE_GAP + GAP) local xLabel = MakeFont(pf, 12, nil, 1, 1, 1) - xLabel:SetAlpha(0.6); xLabel:SetText("X Offset") + xLabel:SetAlpha(0.6); xLabel:SetText(EllesmereUI.L("X Offset")) xLabel:SetPoint("LEFT", pf, "TOPLEFT", SIDE_PAD, X_ROW_Y - SLIDER_H / 2) local xTrack, xValBox = BuildSliderCore(pf, SLIDER_W, 4, 12, INPUT_W, SLIDER_H, 11, SL_INPUT_A, -100, 100, 1, @@ -4269,7 +4269,7 @@ initFrame:SetScript("OnEvent", function(self) -- Y slider row local Y_ROW_Y = X_ROW_Y - SLIDER_H - GAP local yLabel = MakeFont(pf, 12, nil, 1, 1, 1) - yLabel:SetAlpha(0.6); yLabel:SetText("Y Offset") + yLabel:SetAlpha(0.6); yLabel:SetText(EllesmereUI.L("Y Offset")) yLabel:SetPoint("LEFT", pf, "TOPLEFT", SIDE_PAD, Y_ROW_Y - SLIDER_H / 2) local yTrack, yValBox = BuildSliderCore(pf, SLIDER_W, 4, 12, INPUT_W, SLIDER_H, 11, SL_INPUT_A, -100, 100, 1, @@ -4504,7 +4504,7 @@ initFrame:SetScript("OnEvent", function(self) local entry = vals and vals[bi] if entry then btn._value = entry.value - btn._lbl:SetText(entry.label) + btn._lbl:SetText(EllesmereUI.L(entry.label)) local active = (entry.value == cur) btn._bg:SetColorTexture( active and 0.973 or 0.15, @@ -4701,7 +4701,7 @@ initFrame:SetScript("OnEvent", function(self) } end local opts = { - title = EllesmereUI.Lf("%1$s Slot Settings", slotLabel), + title = EllesmereUI.Lf("%1$s Slot Settings", EllesmereUI.L(slotLabel)), xGet = function() return CorePosXGet(posKey) end, xSet = function(v) CorePosXSet(posKey, v) end, yGet = function() return CorePosYGet(posKey) end, @@ -4995,7 +4995,7 @@ initFrame:SetScript("OnEvent", function(self) if TextPosDisabled(slotKey) then return end local sizeKey = slotKey .. "Size" ShowCogPopup(self, { - title = EllesmereUI.Lf("%1$s Settings", slotLabel), + title = EllesmereUI.Lf("%1$s Settings", EllesmereUI.L(slotLabel)), xGet = function() return TextPosXGet(slotKey) end, xSet = function(v) TextPosXSet(slotKey, v) end, yGet = function() return TextPosYGet(slotKey) end, @@ -5244,7 +5244,81 @@ initFrame:SetScript("OnEvent", function(self) end) end - -- Cast Background Opacity (+ swatch) | Cast Bar Border (+ swatch) + -- Row 3: Cast Timer toggle | Cast Timer size + inline color swatch + local castTimerRow + castTimerRow, h = W:DualRow(parent, y, + { type="toggle", text="Enable Cast Timer", + getValue=function() + local db = DB() + if db and db.showCastTimer ~= nil then return db.showCastTimer end + return defaults.showCastTimer + end, + setValue=function(v) + DB().showCastTimer = v + ns.RefreshAllSettings() + UpdatePreview() + EllesmereUI:RefreshPage() + end }, + { type="slider", text="Cast Timer", min=6, max=20, step=1, + getValue=function() return DBVal("castTimerSize") or defaults.castTimerSize end, + setValue=function(v) + DB().castTimerSize = v + for _, plate in pairs(plates) do + if plate.castTimer then SetFSFont(plate.castTimer, v, GetNPOutline()) end + end + UpdatePreview() + end }); y = y - h + -- Inline color swatch on Cast Timer size (right region) + do + local rightRgn = castTimerRow._rightRegion + local ctColorGet = function() + local c = (DB() and DB().castTimerColor) or defaults.castTimerColor + return c.r, c.g, c.b + end + local ctColorSet = function(r, g, b) + DB().castTimerColor = { r = r, g = g, b = b } + for _, plate in pairs(plates) do + if plate.castTimer then plate.castTimer:SetTextColor(r, g, b, 1) end + end + UpdatePreview() + end + local ctSwatch, ctUpdateSwatch = EllesmereUI.BuildColorSwatch(rightRgn, rightRgn:GetFrameLevel() + 5, ctColorGet, ctColorSet, nil, 20) + PP.Point(ctSwatch, "RIGHT", rightRgn._control, "LEFT", -12, 0) + EllesmereUI.RegisterWidgetRefresh(function() ctUpdateSwatch() end) + + -- Inline cog for Cast Timer X/Y offset + local tmCogBtn = CreateFrame("Button", nil, rightRgn) + tmCogBtn:SetSize(26, 26) + tmCogBtn:SetPoint("RIGHT", ctSwatch, "LEFT", -6, 0) + tmCogBtn:SetFrameLevel(rightRgn:GetFrameLevel() + 5) + tmCogBtn:SetAlpha(0.4) + local tmCogTex = tmCogBtn:CreateTexture(nil, "OVERLAY") + tmCogTex:SetAllPoints() + tmCogTex:SetTexture(EllesmereUI.RESIZE_ICON) + tmCogBtn:SetScript("OnEnter", function(self) self:SetAlpha(0.7) end) + tmCogBtn:SetScript("OnLeave", function(self) + EllesmereUI.HideWidgetTooltip() + if cogPopupOwner ~= self then self:SetAlpha(0.4) end + end) + tmCogBtn:SetScript("OnClick", function(self) + ShowCogPopup(self, { + title = EllesmereUI.L("Cast Timer Settings"), + xGet = function() return DBVal("castTimerOffsetX") or defaults.castTimerOffsetX end, + xSet = function(v) DB().castTimerOffsetX = v; ns.RefreshAllSettings(); UpdatePreview() end, + yGet = function() return DBVal("castTimerOffsetY") or defaults.castTimerOffsetY end, + ySet = function(v) DB().castTimerOffsetY = v; ns.RefreshAllSettings(); UpdatePreview() end, + sizeGet = function() return DBVal("castTimerSize") or defaults.castTimerSize end, + sizeSet = function(v) DB().castTimerSize = v; ns.RefreshAllSettings(); UpdatePreview() end, + sizeMin = 6, sizeMax = 20, sizeLabel = EllesmereUI.L("Size"), + sizeFirst = true, + }) + end) + EllesmereUI.RegisterWidgetRefresh(function() + tmCogBtn:SetAlpha(cogPopupOwner == tmCogBtn and 0.7 or 0.4) + end) + end + + -- Row 4: Cast Background Opacity (+ swatch) | Cast Bar Border (+ swatch) local castBgRow castBgRow, h = W:DualRow(parent, y, { type="slider", text="Cast Background", min=0, max=100, step=1, @@ -6495,14 +6569,14 @@ initFrame:SetScript("OnEvent", function(self) end) snCogBtn:SetScript("OnClick", function(self) ShowCogPopup(self, { - title = "Spell Name Settings", + title = EllesmereUI.L("Spell Name Settings"), xGet = function() return DBVal("castNameOffsetX") or defaults.castNameOffsetX end, xSet = function(v) DB().castNameOffsetX = v; ns.RefreshAllSettings(); UpdatePreview() end, yGet = function() return DBVal("castNameOffsetY") or defaults.castNameOffsetY end, ySet = function(v) DB().castNameOffsetY = v; ns.RefreshAllSettings(); UpdatePreview() end, sizeGet = function() return DBVal("castNameSize") or defaults.castNameSize end, sizeSet = function(v) DB().castNameSize = v; ns.RefreshAllSettings(); UpdatePreview() end, - sizeMin = 6, sizeMax = 20, sizeLabel = "Size", + sizeMin = 6, sizeMax = 20, sizeLabel = EllesmereUI.L("Size"), sizeFirst = true, }) end) @@ -6587,14 +6661,14 @@ initFrame:SetScript("OnEvent", function(self) end) stCogBtn:SetScript("OnClick", function(self) ShowCogPopup(self, { - title = "Spell Target Settings", + title = EllesmereUI.L("Spell Target Settings"), xGet = function() return DBVal("castTargetOffsetX") or defaults.castTargetOffsetX end, xSet = function(v) DB().castTargetOffsetX = v; ns.RefreshAllSettings(); UpdatePreview() end, yGet = function() return DBVal("castTargetOffsetY") or defaults.castTargetOffsetY end, ySet = function(v) DB().castTargetOffsetY = v; ns.RefreshAllSettings(); UpdatePreview() end, sizeGet = function() return DBVal("castTargetSize") or defaults.castTargetSize end, sizeSet = function(v) DB().castTargetSize = v; ns.RefreshAllSettings(); UpdatePreview() end, - sizeMin = 6, sizeMax = 20, sizeLabel = "Size", + sizeMin = 6, sizeMax = 20, sizeLabel = EllesmereUI.L("Size"), sizeFirst = true, }) end)