diff --git a/CHANGELOG.md b/CHANGELOG.md index 4d3022d..cc14197 100644 --- a/CHANGELOG.md +++ b/CHANGELOG.md @@ -2,6 +2,21 @@ All notable changes to LifeTimeStats. Format: [Keep a Changelog](https://keepachangelog.com/), versions follow [SemVer](https://semver.org/). +## [Unreleased] + +From in-game screenshots of 1.25.1. + +### Fixed +- **Overview tiles** (and the Stats Explorer cards and dropdowns) looked washed out, because their background was drawn over their text. Backgrounds are now drawn behind it. +- **Dropdown arrows** showed as small dark squares. They are now a chevron drawn for the skin. +- **Menu names** were cut off ("Adventurer's...", "Fastest/Uniq..."). They now use the room the hidden shortcut badge had, and shrink a little if needed. +- **Long titles** (milestones, achievements) no longer shrink below 10 points; past that the game's own "..." is easier to read. +- **Achievements:** the category bar covered the Sort button. The categories are now only the tabs down the right edge of the window. +- **Right-hand tabs** were see-through over the game world on the framed skins. They are now solid parchment, with dark text. + +### Changed +- **README:** in-game screenshots of the Lifetime Stats skin (overview, Travel with its section tabs, Characters, Achievements), and the statistic count updated to 992. + ## [1.25.1-forever] - 2026-11-17 Prerelease. Offline regression suites pass; not yet checked in the live client. diff --git a/Framed.lua b/Framed.lua index fc1303f..7aa41a8 100644 --- a/Framed.lua +++ b/Framed.lua @@ -28,7 +28,7 @@ local function Dropdown(parent, w, items, onPick, opts) opts = opts or {} local b = CreateFrame("Button", nil, parent) b:SetSize(w, 28) - local bg = W.Panel(b, T.tile, T.edge); bg:SetAllPoints(); bg:SetFrameLevel(b:GetFrameLevel()) + W.Box(b, T.tile, T.edge) local x = 10 if opts.portrait then b.portrait = b:CreateTexture(nil, "ARTWORK") @@ -41,8 +41,9 @@ local function Dropdown(parent, w, items, onPick, opts) end b.text = W.Text(b, 12, T.text); b.text:SetPoint("LEFT", x, 0); b.text:SetPoint("RIGHT", -26, 0); b.text:SetJustifyH("LEFT") b.arrow = b:CreateTexture(nil, "ARTWORK") - b.arrow:SetSize(18, 18); b.arrow:SetPoint("RIGHT", -5, 0) - b.arrow:SetTexture("Interface\\Buttons\\UI-ScrollBar-ScrollDownButton-Up") + b.arrow:SetSize(12, 12); b.arrow:SetPoint("RIGHT", -9, 0) + b.arrow:SetTexture(W.MEDIA .. "framed\\arrow") + b.arrow:SetVertexColor(T.dim[1], T.dim[2], T.dim[3]) local menu = W.Panel(b, T.bg, T.edge) menu:SetPoint("TOPLEFT", b, "BOTTOMLEFT", 0, -2) menu:SetSize(w, #items * 24 + 6) @@ -226,6 +227,8 @@ function ns.BuildFramedSkin(win, side, head, dim) b.sel:Hide() b.text.noInk = true b.text:SetFont(W.FONT, 13, "") + b.text:SetWidth(dim.SIDEBAR_W - 56) -- the shortcut badge is hidden, so names get its room + b.text:SetText(b.text:GetText()) -- refit at the new size if explorer then b.text:SetTextColor(LIGHT[1], LIGHT[2], LIGHT[3]) end end if explorer and win.todayBox then win.todayBox:Hide() end -- its pinned statistics sit along the bottom instead diff --git a/Media/framed/arrow.tga b/Media/framed/arrow.tga new file mode 100644 index 0000000..ac24e84 Binary files /dev/null and b/Media/framed/arrow.tga differ diff --git a/Overview.lua b/Overview.lua index 42c5d78..077e5ad 100644 --- a/Overview.lua +++ b/Overview.lua @@ -320,7 +320,7 @@ local function BuildLedger(ctx) for i, d in ipairs(tiles) do local t = CreateFrame("Button", nil, p) t:SetPoint("TOPLEFT", (i - 1) * (tw + GAP), -(84 + GAP)); t:SetSize(tw, 92) - local card = W.Panel(t, T.tile, T.edge); card:SetAllPoints() + W.Box(t, T.tile, T.edge) t.icon = W.Icon(t, d.icon, 26, T.amber); t.icon:SetPoint("TOP", 0, -8) t.label = W.Text(t, 11, T.text, nil, "CENTER"); t.label:SetPoint("TOP", t.icon, "BOTTOM", 0, -4); t.label:SetWidth(tw - 10); t.label:SetText(d.label) t.value = W.Text(t, 20, T.text, W.NUM, "CENTER"); t.value:SetPoint("TOP", t.label, "BOTTOM", 0, -3); t.value:SetWidth(tw - 10) @@ -437,7 +437,7 @@ local function BuildExplorer(ctx) local cy = (i - 1) * (ch4 + GAP) local b = CreateFrame("Button", nil, p) b:SetPoint("TOPLEFT", rx, -cy); b:SetSize(rw, ch4) - local bg = W.Panel(b, T.tile, T.edge); bg:SetAllPoints() + W.Box(b, T.tile, T.edge) b.crest = b:CreateTexture(nil, "ARTWORK"); b.crest:SetSize(46, 46); b.crest:SetPoint("TOPLEFT", 12, -8); b.crest:SetTexture(M .. "crest") b.rim = b:CreateTexture(nil, "OVERLAY"); b.rim:SetAllPoints(b.crest); b.rim:SetTexture(M .. "crest_rim") b.glyph = b:CreateTexture(nil, "OVERLAY", nil, 2); b.glyph:SetSize(22, 22); b.glyph:SetPoint("CENTER", b.crest, "CENTER", 0, 3) diff --git a/README.md b/README.md index 57f3b69..fd3487a 100644 --- a/README.md +++ b/README.md @@ -7,12 +7,19 @@ Lifetime statistics for your character in **World of Warcraft: Forever**. Instal - **Author:** Malikor - **Client:** WoW: Forever (interface 16001, build 1.60.1) - **License:** GPL-3.0-or-later (see `LICENSE`) -- **Tracks:** 943 statistics, top lists, fastest times, uniques and firsts, plus a **dungeon book** for all 35 Forever dungeons and 3 raids (bosses found, full clears, fastest clear, runs under or over level), an **Adventurer score**, play-session history with CSV export, peak character stats and battleground scoreboards +- **Tracks:** 992 statistics, top lists, fastest times, uniques and firsts, plus a **dungeon book** for all 35 Forever dungeons and 3 raids (bosses found, full clears, fastest clear, runs under or over level), an **Adventurer score**, play-session history with CSV export, peak character stats and battleground scoreboards -![Dashboard](https://raw.githubusercontent.com/SeanShaffer88/LifeTimeStats/main/docs/screenshots/dashboard.png) +![The overview in the Lifetime Stats skin, in game](https://raw.githubusercontent.com/SeanShaffer88/LifeTimeStats/main/docs/screenshots/ingame-overview.jpg) + +| | | +|---|---| +| ![Travel](https://raw.githubusercontent.com/SeanShaffer88/LifeTimeStats/main/docs/screenshots/ingame-travel.jpg)
Travel: sections in the table and as tabs on the right | ![Characters](https://raw.githubusercontent.com/SeanShaffer88/LifeTimeStats/main/docs/screenshots/ingame-characters.jpg)
Characters | +| ![Achievements](https://raw.githubusercontent.com/SeanShaffer88/LifeTimeStats/main/docs/screenshots/ingame-achievements.jpg)
Achievements, with their categories as tabs | | + +In-game screenshots from 1.25.1, Lifetime Stats skin, Tauren Druid at level 10.
-More screenshots (every page) +More screenshots (every page, from the earlier dark skin) | | | |---|---| diff --git a/UI.lua b/UI.lua index 9972137..71749b8 100644 --- a/UI.lua +++ b/UI.lua @@ -1359,6 +1359,7 @@ local function BuildAchievements() for _, b in ipairs(p.seg.buttons) do b:ClearAllPoints(); b:SetPoint("LEFT", x, 0); x = x + b:GetWidth() end p.seg:SetWidth(x + 1) p.seg:SetPoint("TOPRIGHT", -6, -2) + p.seg:Hide() -- the categories are the tabs down the right edge of the window p.sort = "default" local sortB = W.FlatButton(card, "Sort: list", 92, 20, "Sort", "Switch between the normal order and closest to the next tier first.") sortB:SetPoint("TOPLEFT", 140, -4) @@ -2183,7 +2184,7 @@ function ns.UpdateSectionTabs() if d then local text = book and W.SmallCaps(d.name) or d.name b.text:SetText(text) - local col = d.active and T.amber or (book and T.text or T.dim) + local col = d.active and T.amber or ((book or ns.Paper()) and T.text or T.dim) b.text:SetTextColor(col[1], col[2], col[3]) if book then if d.active then W.Bold(b.text, T.amber) elseif b.text.SetShadowOffset then b.text:SetShadowOffset(0, 0) end @@ -2191,7 +2192,8 @@ function ns.UpdateSectionTabs() b.bg:SetVertexColor(c[1], c[2], c[3], 1) b:SetPoint("TOPLEFT", d.active and 6 or 0, -(i - 1) * (SECTION_TAB_H + SECTION_GAP)) else - W.Color(b.bg, d.active and T.tileHi or T.tile) + -- opaque, so the tabs read cleanly over the game world + W.Color(b.bg, d.active and T.tileHi or T.tile, ns.Framed() and 0.97 or nil) b.edge:SetShown(d.active) end b:Show() diff --git a/Widgets.lua b/Widgets.lua index e305564..b6bc953 100644 --- a/Widgets.lua +++ b/Widgets.lua @@ -85,8 +85,7 @@ local function InkFontString(fs) local setText, setColor = fs.SetText, fs.SetTextColor if type(setText) == "function" then fs.SetText = function(self, t) - if rawget(self, "noInk") then return setText(self, t) end - setText(self, W.InkCodes(t)) + setText(self, rawget(self, "noInk") and t or W.InkCodes(t)) -- single-line text that is too long shrinks a little instead of ending in "..." local canWrap = self.CanWordWrap or self.GetWordWrap if t and t ~= "" and canWrap and canWrap(self) == false and not rawget(self, "fitting") then @@ -162,6 +161,24 @@ function W.Tip(owner, title, body, extra) owner:HookScript("OnLeave", function() GameTooltip:Hide() end) end +-- A filled box with a 1-pixel edge, drawn as textures on f itself. Unlike W.Panel (a child +-- frame, drawn above f's own text), it always sits behind f's text and icons. +function W.Box(f, c, edge) + local bg = f:CreateTexture(nil, "BACKGROUND") + bg:SetAllPoints() + W.Color(bg, c) + local e = edge or T.edge + local lines = {} + for i, pts in ipairs({ { "TOPLEFT", "TOPRIGHT" }, { "BOTTOMLEFT", "BOTTOMRIGHT" }, { "TOPLEFT", "BOTTOMLEFT" }, { "TOPRIGHT", "BOTTOMRIGHT" } }) do + local l = f:CreateTexture(nil, "BORDER") + W.Color(l, e) + l:SetPoint(pts[1]); l:SetPoint(pts[2]) + if i <= 2 then l:SetHeight(1) else l:SetWidth(1) end + lines[i] = l + end + return bg, lines +end + function W.Panel(parent, c, edge) local f = CreateFrame("Frame", nil, parent, BackdropTemplateMixin and "BackdropTemplate" or nil) if f.SetBackdrop then @@ -882,7 +899,7 @@ function W.FitText(fs, text, size) size = size or (fs.GetFont and select(2, fs:GetFont())) or 12 if type(size) ~= "number" then return end if type(rawget(fs, "fitBase")) ~= "number" then fs.fitBase = size end - for s = fs.fitBase, 9, -0.5 do + for s = fs.fitBase, math.min(fs.fitBase, 10), -0.5 do pcall(fs.SetFont, fs, font, s, "") if text then fs:SetText(text) end local sw = fs:GetStringWidth() diff --git a/docs/screenshots/ingame-achievements.jpg b/docs/screenshots/ingame-achievements.jpg new file mode 100644 index 0000000..125020a Binary files /dev/null and b/docs/screenshots/ingame-achievements.jpg differ diff --git a/docs/screenshots/ingame-characters.jpg b/docs/screenshots/ingame-characters.jpg new file mode 100644 index 0000000..0a278f8 Binary files /dev/null and b/docs/screenshots/ingame-characters.jpg differ diff --git a/docs/screenshots/ingame-overview.jpg b/docs/screenshots/ingame-overview.jpg new file mode 100644 index 0000000..5557e78 Binary files /dev/null and b/docs/screenshots/ingame-overview.jpg differ diff --git a/docs/screenshots/ingame-travel.jpg b/docs/screenshots/ingame-travel.jpg new file mode 100644 index 0000000..9b3431b Binary files /dev/null and b/docs/screenshots/ingame-travel.jpg differ diff --git a/scripts/make_framed_textures.py b/scripts/make_framed_textures.py index e10ce83..8cec35b 100644 --- a/scripts/make_framed_textures.py +++ b/scripts/make_framed_textures.py @@ -12,6 +12,7 @@ crest 128x128 white shield (tinted per card) and crest_rim, its gold rim navsel 256x32 menu selection, pointed on the right (white, tinted) divider 256x16 an ornamental rule with a diamond (white, tinted) + arrow 32x32 the dropdown chevron (white, tinted) """ import math import random @@ -181,3 +182,8 @@ def shape(scale=4): for x in (440, 584): d.ellipse((x - 6, 26, x + 6, 38), fill=(255, 255, 255, 255)) save(big.resize((256, 16), Image.LANCZOS), "divider") + +# ---------------------------------------------------------------- dropdown arrow (white chevron, tinted) +big = Image.new("RGBA", (128, 128), (0, 0, 0, 0)) +ImageDraw.Draw(big).line([(18, 40), (64, 88), (110, 40)], fill=(255, 255, 255, 255), width=18, joint="curve") +save(big.resize((32, 32), Image.LANCZOS), "arrow") diff --git a/tests/framed.py b/tests/framed.py index 8fd788b..4e317e3 100644 --- a/tests/framed.py +++ b/tests/framed.py @@ -8,7 +8,7 @@ ROOT = Path(__file__).resolve().parent.parent -for name in ("parchment", "wood", "edge_h", "edge_v", "corner", "plaque", "emblem", "crest", "crest_rim", "navsel", "divider"): +for name in ("parchment", "wood", "edge_h", "edge_v", "corner", "plaque", "emblem", "crest", "crest_rim", "navsel", "divider", "arrow"): path = ROOT / "Media" / "framed" / (name + ".tga") assert path.exists(), path im = Image.open(path) @@ -124,6 +124,10 @@ def load(): eq(ns.settings.scope, "account", "all characters") eq(scope.text:GetText(), "All characters", "dropdown shows all characters") scope.rows[1].scripts.OnClick(scope.rows[1]); range.rows[1].scripts.OnClick(range.rows[1]) +-- achievements: categories are the right-hand tabs, so the bar that covered Sort is hidden +ns.ShowPage("achievements") +eq(ns.Page("achievements").seg:IsShown(), false, "category bar hidden in the card") +eq(rawget(win, "sectionBar"):IsShown(), true, "categories shown as tabs") -- menu ns.ShowPage("combat") local selCount = 0