coa.27: Skills polish - tighter rank column, gold Name(Class) headers, spacer rows
release / release (push) Successful in 5s
release / release (push) Successful in 5s
Rank column pulled left (250->195), name cell narrowed. Headers now show class-colored character name from the key (reliable) + (Class), with a blank spacer row between characters.
This commit is contained in:
@@ -338,7 +338,7 @@ function addon:OnEnable()
|
|||||||
-- CoA: use a Lua constant, not GetAddOnMetadata — TOC metadata is cached at game launch
|
-- CoA: use a Lua constant, not GetAddOnMetadata — TOC metadata is cached at game launch
|
||||||
-- and does NOT refresh on /reload, so the .toc version looked stale ("still .18"). A Lua
|
-- and does NOT refresh on /reload, so the .toc version looked stale ("still .18"). A Lua
|
||||||
-- constant re-evaluates on every /reload, giving a truthful loaded-code version. Bump with the .toc.
|
-- constant re-evaluates on every /reload, giving a truthful loaded-code version. Bump with the .toc.
|
||||||
AltoholicFrameName:SetText("Altoholic |cFFFFFFFF3.3.002b-coa.26|r")
|
AltoholicFrameName:SetText("Altoholic |cFFFFFFFF3.3.002b-coa.27|r")
|
||||||
|
|
||||||
local realm = GetRealmName()
|
local realm = GetRealmName()
|
||||||
local player = UnitName("player")
|
local player = UnitName("player")
|
||||||
|
|||||||
@@ -13,7 +13,7 @@
|
|||||||
|
|
||||||
## Author: Thaoky, Telkar-RG
|
## Author: Thaoky, Telkar-RG
|
||||||
## X-Edited-By: Exiles (Sub-Net) — florian.berthold@sub-net.at
|
## X-Edited-By: Exiles (Sub-Net) — florian.berthold@sub-net.at
|
||||||
## Version: 3.3.002b-coa.26
|
## Version: 3.3.002b-coa.27
|
||||||
## X-Category: Inventory, Tradeskill, Mail
|
## X-Category: Inventory, Tradeskill, Mail
|
||||||
## X-Localizations: enUS, frFR, zhCN, zhTW, deDE, koKR, esES, esMX, ruRU
|
## X-Localizations: enUS, frFR, zhCN, zhTW, deDE, koKR, esES, esMX, ruRU
|
||||||
## X-Website: http://wow.curse.com/downloads/wow-addons/details/altoholic.aspx
|
## X-Website: http://wow.curse.com/downloads/wow-addons/details/altoholic.aspx
|
||||||
|
|||||||
@@ -66,6 +66,7 @@ function ns:Update()
|
|||||||
items[#items + 1] = { kind = "skill", viewLine = viewLine, character = character,
|
items[#items + 1] = { kind = "skill", viewLine = viewLine, character = character,
|
||||||
spellID = 33388, name = (L and L["Riding"]) or "Riding", rank = riding, maxRank = 300 }
|
spellID = 33388, name = (L and L["Riding"]) or "Riding", rank = riding, maxRank = 300 }
|
||||||
end
|
end
|
||||||
|
items[#items + 1] = { kind = "spacer" } -- blank row between characters
|
||||||
end
|
end
|
||||||
end
|
end
|
||||||
|
|
||||||
@@ -82,14 +83,21 @@ function ns:Update()
|
|||||||
_G[e.."FishingNormalText"]:SetText("")
|
_G[e.."FishingNormalText"]:SetText("")
|
||||||
_G[e.."RidingNormalText"]:SetText("")
|
_G[e.."RidingNormalText"]:SetText("")
|
||||||
|
|
||||||
if item.kind == "header" then
|
if item.kind == "spacer" then
|
||||||
-- character header: colored name + (class) across the row, no rank column
|
-- blank separator row between characters
|
||||||
_G[e.."Name"]:SetPoint("TOPLEFT", 15, 0)
|
_G[e.."Name"]:SetPoint("TOPLEFT", 15, 0)
|
||||||
|
_G[e.."NameNormalText"]:SetText("")
|
||||||
|
_G[e.."Level"]:SetText("")
|
||||||
|
elseif item.kind == "header" then
|
||||||
|
-- character header: gold "Name (Class)" across the row, no rank column
|
||||||
|
_G[e.."Name"]:SetPoint("TOPLEFT", 12, 0)
|
||||||
_G[e.."Name"]:SetWidth(420)
|
_G[e.."Name"]:SetWidth(420)
|
||||||
_G[e.."NameNormalText"]:SetWidth(420)
|
_G[e.."NameNormalText"]:SetWidth(420)
|
||||||
|
local cname = Characters:GetInfo(item.viewLine) or "?" -- name from the key, always present (scanned char.name can be nil)
|
||||||
local locClass, engClass = DS:GetCharacterClass(item.character)
|
local locClass, engClass = DS:GetCharacterClass(item.character)
|
||||||
local className = Altoholic:GetCoAClassName(engClass) or locClass or "" -- CoA: PROPHET->Venomancer, MONK->Templar, …
|
local className = Altoholic:GetCoAClassName(engClass) or locClass or "" -- CoA: PROPHET->Venomancer, MONK->Templar, …
|
||||||
_G[e.."NameNormalText"]:SetText( (DS:GetColoredCharacterName(item.character) or "?") .. " " .. WHITE .. "(" .. className .. ")" )
|
local classColor = DS:GetClassColor(item.character) or WHITE
|
||||||
|
_G[e.."NameNormalText"]:SetText( classColor .. cname .. "|r " .. WHITE .. "(" .. className .. ")" )
|
||||||
_G[e.."Level"]:SetText("")
|
_G[e.."Level"]:SetText("")
|
||||||
else
|
else
|
||||||
-- profession row: [icon] name in the Name cell (indented), rank/max in its own column
|
-- profession row: [icon] name in the Name cell (indented), rank/max in its own column
|
||||||
@@ -97,13 +105,13 @@ function ns:Update()
|
|||||||
if item.spellID then
|
if item.spellID then
|
||||||
iconEsc = addon:TextureToFontstring2(addon:GetSpellIcon(item.spellID), size, size, inset, inset, inset, inset) .. " "
|
iconEsc = addon:TextureToFontstring2(addon:GetSpellIcon(item.spellID), size, size, inset, inset, inset, inset) .. " "
|
||||||
end
|
end
|
||||||
_G[e.."Name"]:SetPoint("TOPLEFT", 38, 0)
|
_G[e.."Name"]:SetPoint("TOPLEFT", 34, 0)
|
||||||
_G[e.."Name"]:SetWidth(200)
|
_G[e.."Name"]:SetWidth(170)
|
||||||
_G[e.."NameNormalText"]:SetWidth(200)
|
_G[e.."NameNormalText"]:SetWidth(170)
|
||||||
_G[e.."NameNormalText"]:SetText( iconEsc .. WHITE .. item.name )
|
_G[e.."NameNormalText"]:SetText( iconEsc .. WHITE .. item.name )
|
||||||
|
|
||||||
local cap = (item.maxRank > 0) and item.maxRank or 450
|
local cap = (item.maxRank > 0) and item.maxRank or 450
|
||||||
_G[e.."Level"]:SetPoint("TOPLEFT", 250, 0)
|
_G[e.."Level"]:SetPoint("TOPLEFT", 195, 0)
|
||||||
_G[e.."Level"]:SetWidth(120)
|
_G[e.."Level"]:SetWidth(120)
|
||||||
_G[e.."Level"]:SetJustifyH("LEFT")
|
_G[e.."Level"]:SetJustifyH("LEFT")
|
||||||
_G[e.."Level"]:SetText( ns:GetColor(item.rank, cap) .. item.rank .. " / " .. item.maxRank )
|
_G[e.."Level"]:SetText( ns:GetColor(item.rank, cap) .. item.rank .. " / " .. item.maxRank )
|
||||||
|
|||||||
Reference in New Issue
Block a user