mirror of
https://github.com/parnic/ice-hud.git
synced 2025-06-16 14:50:13 -05:00
- added the ability for runes to draw vertically stacked. new configuration option to choose horizontal/vertical alignment
This commit is contained in:
@ -101,6 +101,24 @@ function Runes.prototype:GetOptions()
|
||||
end,
|
||||
order = 32
|
||||
}
|
||||
|
||||
opts["displayMode"] = {
|
||||
type = 'text',
|
||||
name = 'Rune orientation',
|
||||
desc = 'Whether the runes should draw side-by-side or on top of one another',
|
||||
get = function()
|
||||
return self.moduleSettings.displayMode
|
||||
end,
|
||||
set = function(v)
|
||||
self.moduleSettings.displayMode = v
|
||||
self:Redraw()
|
||||
end,
|
||||
validate = { "Horizontal", "Vertical" },
|
||||
disabled = function()
|
||||
return not self.moduleSettings.enabled
|
||||
end,
|
||||
order = 35
|
||||
}
|
||||
-- todo: numeric mode isn't supported just yet...so these options are removed for now
|
||||
--[[
|
||||
opts["runeFontSize"] = {
|
||||
@ -156,6 +174,7 @@ function Runes.prototype:GetDefaultSettings()
|
||||
defaults["usesDogTagStrings"] = false
|
||||
defaults["hideBlizz"] = true
|
||||
defaults["alwaysFullAlpha"] = false
|
||||
defaults["displayMode"] = "Horizontal"
|
||||
|
||||
return defaults
|
||||
end
|
||||
@ -301,7 +320,11 @@ function Runes.prototype:CreateRune(i, type, name)
|
||||
else
|
||||
runeSwapI = i
|
||||
end
|
||||
if self.moduleSettings.displayMode == "Horizontal" then
|
||||
self.frame.graphical[i]:SetPoint("TOPLEFT", (runeSwapI-1) * (self.runeSize-5) + (runeSwapI-1), 0)
|
||||
else
|
||||
self.frame.graphical[i]:SetPoint("TOPLEFT", 0, -1 * ((runeSwapI-1) * (self.runeSize-5) + (runeSwapI-1)))
|
||||
end
|
||||
|
||||
self.frame.graphical[i]:SetStatusBarColor(self:GetColor("Runes"..name))
|
||||
self.frame.graphical[i]:Show()
|
||||
|
Reference in New Issue
Block a user