mirror of
https://github.com/parnic/ice-hud.git
synced 2025-06-16 06:40:13 -05:00
- Added support for changing the outline/shadowing of all non-DogTag strings on all modules.
This commit is contained in:
24
IceCore.lua
24
IceCore.lua
@ -34,6 +34,13 @@ IceCore.prototype.enabled = nil
|
||||
IceCore.prototype.presets = {}
|
||||
IceCore.prototype.bConfigMode = false
|
||||
|
||||
IceCore.TextDecorationStyle = {
|
||||
Shadow = L["Shadow"],
|
||||
Outline = L["Outline"],
|
||||
ThickOutline = L["Thick outline"],
|
||||
NoDecoration = L["No decoration"],
|
||||
}
|
||||
|
||||
local SUNDER_SPELL_ID = 7386
|
||||
local LACERATE_SPELL_ID = 33745
|
||||
local MAELSTROM_SPELL_ID = 53817
|
||||
@ -82,6 +89,8 @@ function IceCore.prototype:SetupDefaults()
|
||||
|
||||
updatePeriod = 0.033,
|
||||
minimap = {},
|
||||
|
||||
TextDecoration = "Shadow",
|
||||
},
|
||||
global = {
|
||||
lastRunVersion = 0,
|
||||
@ -499,6 +508,21 @@ function IceCore.prototype:GetModuleOptions()
|
||||
order = 1
|
||||
}
|
||||
|
||||
options["bbbGlobalTextSettings"] = {
|
||||
type = 'select',
|
||||
name = L["Text appearance"],
|
||||
desc = L["This controls how all non-DogTag text on all modules appears.\n\nNOTE: Requires a UI reload to take effect."],
|
||||
get = function(info)
|
||||
return self.settings.TextDecoration
|
||||
end,
|
||||
set = function(info, v)
|
||||
self.settings.TextDecoration = v
|
||||
StaticPopup_Show("ICEHUD_CHANGED_DOGTAG")
|
||||
end,
|
||||
values = IceCore.TextDecorationStyle,
|
||||
order = 2
|
||||
}
|
||||
|
||||
for i = 1, table.getn(self.elements) do
|
||||
local modName = self.elements[i]:GetElementName()
|
||||
local opt = self.elements[i]:GetOptions()
|
||||
|
@ -382,13 +382,23 @@ function IceElement.prototype:FontFactory(size, frame, font, flags)
|
||||
fontString = font
|
||||
end
|
||||
|
||||
if not flags then
|
||||
if self.settings.TextDecoration == "Outline" then
|
||||
flags = "OUTLINE"
|
||||
elseif self.settings.TextDecoration == "ThickOutline" then
|
||||
flags = "THICKOUTLINE"
|
||||
end
|
||||
end
|
||||
|
||||
if not fontString:SetFont(SML:Fetch('font', self.settings.fontFamily), size, flags) then
|
||||
fontString:SetFont("Fonts\\FRIZQT__.TTF", size, flags)
|
||||
end
|
||||
|
||||
if not (flags) then
|
||||
fontString:SetShadowColor(0, 0, 0, 1)
|
||||
fontString:SetShadowOffset(1, -1)
|
||||
if self.settings.TextDecoration == "Shadow" then
|
||||
fontString:SetShadowColor(0, 0, 0, 1)
|
||||
fontString:SetShadowOffset(1, -1)
|
||||
end
|
||||
end
|
||||
|
||||
return fontString
|
||||
|
Reference in New Issue
Block a user