Permalink
Browse files

Converted to font settings rather than templates

  • Loading branch information...
Cladhaire-15704 Cladhaire-15704
Cladhaire-15704 authored and Cladhaire-15704 committed Jul 23, 2009
1 parent 63b6b3c commit f438f026f14c2721bbbe6fcaba67df41ed69d6dd
Showing with 6 additions and 11 deletions.
  1. +6 −11 OhSnap.lua
View
@@ -3,17 +3,13 @@ local targetMsgs = {}
local rows = {}
local guidmap = {}
local uidcount = 0
-local font = {"WorldMapTextFont","Fonts\\FRIZQT__.TTF"}
local fonts = {
- [1] = {32,"OUTLINE, THICKOUTLINE"},
- [2] = {18,"OUTLINE"},
- [3] = {14,"OUTLINE"},
- [4] = {11,"OUTLINE"},
+ [1] = {"Fonts\\FRIZQT__.TTF", 32,"OUTLINE, THICKOUTLINE"},
+ [2] = {"Fonts\\FRIZQT__.TTF", 18,"OUTLINE"},
+ [3] = {"Fonts\\FRIZQT__.TTF", 14,"OUTLINE"},
+ [4] = {"Fonts\\FRIZQT__.TTF", 11,"OUTLINE"},
}
--- Set up default priority fonts
-setmetatable(fonts, {__index = function(t,k) return rawget(t, 0) end})
-
-- Automatically create the sub-tables for GUID
local done = setmetatable({}, {__index = function(t,k)
local new = {}
@@ -119,8 +115,7 @@ function OhSnap:Update()
end
row:SetHeight(20)
row:SetWidth(250)
- row.text:SetFontObject(font[1])
- row.text:SetFont(font[2],fonts[entry.pri][1],fonts[entry.pri][2])
+ row.text:SetFont(unpack(fonts[entry.pri]))
local duration = floor(entry.dura-GetTime())
local message
-- Coloring the time
@@ -350,4 +345,4 @@ EventFrame:SetScript("OnEvent",function(self, event, ...)
OhSnap:DelMessage(uid)
done[guid][spellname] = nil
end
-end)
+end)

0 comments on commit f438f02

Please sign in to comment.