- Added support for changing the outline/shadowing of all non-DogTag strings on all modules.

This commit is contained in:
Parnic
2012-09-01 04:22:50 +00:00
parent d18c5465da
commit d2aa315b8d
2 changed files with 36 additions and 2 deletions

View File

@ -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()

View File

@ -382,14 +382,24 @@ 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
if self.settings.TextDecoration == "Shadow" then
fontString:SetShadowColor(0, 0, 0, 1)
fontString:SetShadowOffset(1, -1)
end
end
return fontString
end