DungeonPreQuest: move log mark after the title
Co-Authored-By: Claude Opus 5.5 <noreply@anthropic.com>
This commit is contained in:
parent
ddb05c7d52
commit
adc76b9a87
2 changed files with 33 additions and 5 deletions
|
|
@ -6,6 +6,8 @@ local _, ns = ...
|
|||
|
||||
local COLOR = "|cffffd100"
|
||||
local LABEL = "Dungeon pre-quest"
|
||||
local ROW_MARK = "|cffc77dff[D]|r"
|
||||
local ROW_MARK_GAP = 5
|
||||
|
||||
local function HasClass(mask, classID)
|
||||
return mask == 0 or math.floor(mask / 2 ^ (classID - 1)) % 2 == 1
|
||||
|
|
@ -60,10 +62,19 @@ local function MarkRow(button)
|
|||
return
|
||||
end
|
||||
if not button.dpqMark then
|
||||
button.dpqMark = button:CreateFontString(nil, "ARTWORK", "GameFontNormalSmall")
|
||||
button.dpqMark:SetPoint("TOPLEFT", button, "TOPLEFT", 12, -9)
|
||||
button.dpqMark:SetText(COLOR .. "D|r")
|
||||
button.dpqMark = button:CreateFontString(nil, "ARTWORK", "GameFontNormalLeft")
|
||||
button.dpqMark:SetText(ROW_MARK)
|
||||
end
|
||||
|
||||
-- Follows the title rather than sitting in the left gutter, which belongs
|
||||
-- to the map icons. A wrapped title reports its unwrapped length.
|
||||
local offset = button.Text:GetStringWidth()
|
||||
local boxWidth = button.Text:GetWidth()
|
||||
if boxWidth > 0 then
|
||||
offset = math.min(offset, boxWidth)
|
||||
end
|
||||
button.dpqMark:ClearAllPoints()
|
||||
button.dpqMark:SetPoint("TOPLEFT", button.Text, "TOPLEFT", offset + ROW_MARK_GAP, 0)
|
||||
button.dpqMark:Show()
|
||||
end
|
||||
|
||||
|
|
|
|||
Loading…
Add table
Add a link
Reference in a new issue