Skip to content
Merged
Show file tree
Hide file tree
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension

Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
49 changes: 49 additions & 0 deletions Options/modules/indicators/Indicator.lua
Original file line number Diff line number Diff line change
Expand Up @@ -745,6 +745,55 @@ function Grid2Options:MakeIndicatorCooldownTextOptions(indicator, options)
end,
hidden= function() return indicator.dbx.enableCooldownText==nil end,
}
options.ctFontJustify = {
type = 'select',
order = 144,
name = L["Text Location"],
desc = L["Text Location"],
values = Grid2Options.pointValueList,
get = function()
local JustifyH = indicator.dbx.ctFontJustifyH or "CENTER"
local JustifyV = indicator.dbx.ctFontJustifyV or "MIDDLE"
return self.pointMapText[ JustifyH..JustifyV ]
end,
set = function(_, v)
local justify = self.pointMapText[v]
indicator.dbx.ctFontJustifyH = justify[1]
indicator.dbx.ctFontJustifyV = justify[2]
self:RefreshIndicator( indicator, "Layout")
end,
hidden= function() return indicator.dbx.enableCooldownText==nil end,
}
options.ctFontOffsetX = {
type = "range",
order = 145,
name = L["X Offset"],
desc = L["Adjust the horizontal offset of the text"],
softMin = -50,
softMax = 50,
step = 1,
get = function () return indicator.dbx.ctFontOffsetX or 0 end,
set = function (_, v)
indicator.dbx.ctFontOffsetX = v
self:RefreshIndicator(indicator, "Layout")
end,
hidden= function() return indicator.dbx.enableCooldownText==nil end,
}
options.ctFontOffsetY = {
type = "range",
order = 146,
name = L["Y Offset"],
desc = L["Adjust the vertical offset of the text"],
softMin = -50,
softMax = 50,
step = 1,
get = function () return indicator.dbx.ctFontOffsetY or 0 end,
set = function (_, v)
indicator.dbx.ctFontOffsetY = v
self:RefreshIndicator(indicator, "Layout")
end,
hidden= function() return indicator.dbx.enableCooldownText==nil end,
}
end

-- Grid2Options:MakeIndicatorTooltipsOptions()
Expand Down
2 changes: 2 additions & 0 deletions modules/IndicatorIcon.lua
Original file line number Diff line number Diff line change
Expand Up @@ -160,6 +160,8 @@ local function Icon_Layout(self, parent)
local color, text = self.ctColor, f.Cooldown:GetCountdownFontString()
text:SetFont(self.ctFont, self.ctFontSize, self.ctFontFlags)
text:SetTextColor(color.r, color.g, color.b, color.a)
text:ClearAllPoints()
text:SetPoint(self.ctFontPoint, self.ctFontOffsetX, self.ctFontOffsetY)
end

if not self.disableStack then
Expand Down
2 changes: 2 additions & 0 deletions modules/IndicatorIcons.lua
Original file line number Diff line number Diff line change
Expand Up @@ -220,6 +220,8 @@ local function Icon_Layout(self, parent)
local color, text = self.ctColor, frame.cooldown:GetCountdownFontString()
text:SetFont(self.ctFont, self.ctFontSize, self.ctFontFlags)
text:SetTextColor(color.r, color.g, color.b, color.a)
text:ClearAllPoints()
text:SetPoint(self.ctFontPoint, self.ctFontOffsetX, self.ctFontOffsetY)
text:SetMaxLines(1)
end
frame.cooldown:Show()
Expand Down