Quantcast Outline for Name in default Unit Frames - WoWInterface
Thread Tools Display Modes
10-09-17, 03:09 PM   #1
Ezi
A Kobold Labourer
Join Date: Jan 2010
Posts: 1
Outline for Name in default Unit Frames

I' m looking to add outline to name in target and focus names on default unit frames, i've found this code:

Code:
local FrameTypes = {'target', 'focus'}

	local DefaultFont, DefaultSize, _  = PlayerName:GetFont()
    
    for i, FrameType in ipairs(FrameTypes) do
        FrameTextureFrameName = loadstring("return " .. FrameType:sub(1,1):upper()..FrameType:sub(2) .. "FrameTextureFrameName")()
        local FontStyle = self.sets['textOutline'] and "OUTLINE" or nil;
        FrameTextureFrameName:SetFont(DefaultFont, DefaultSize, FontStyle)
    end
It's from rozbur's UI tweaks. However this addon is broken and this is only feature i'm looking for. This alone does not work, could anyone help me tweak this piece of code?
  Reply With Quote
10-12-17, 04:15 PM   #2
Dasteman
A Murloc Raider
 
Dasteman's Avatar
Join Date: Feb 2017
Posts: 8
Try this:
Lua Code:
  1. TargetFrameTextureFrameName:SetFont("Fonts\\FRIZQT__.TTF", 10, "OUTLINE")
  2. TargetFrameTextureFrameName:SetTextColor(1,.9,0)
  3. FocusFrameTextureFrameName:SetFont("Fonts\\FRIZQT__.TTF", 10, "OUTLINE")
  4. FocusFrameTextureFrameName:SetTextColor(1,.9,0)
  Reply With Quote
10-12-17, 06:19 PM   #3
MunkDev
A Scalebane Royal Guard
 
MunkDev's Avatar
AddOn Author - Click to view addons
Join Date: Mar 2015
Posts: 416
Lua Code:
  1. FrameTextureFrameName = loadstring("return " .. FrameType:sub(1,1):upper()..FrameType:sub(2) .. "FrameTextureFrameName")()

... but why.
__________________
  Reply With Quote
10-12-17, 09:06 PM   #4
Ammako
A Frostmaul Preserver
AddOn Author - Click to view addons
Join Date: Jun 2016
Posts: 256
Originally Posted by Dasteman View Post
Try this:
Lua Code:
  1. TargetFrameTextureFrameName:SetFont("Fonts\\FRIZQT__.TTF", 10, "OUTLINE")
  2. TargetFrameTextureFrameName:SetTextColor(1,.9,0)
  3. FocusFrameTextureFrameName:SetFont("Fonts\\FRIZQT__.TTF", 10, "OUTLINE")
  4. FocusFrameTextureFrameName:SetTextColor(1,.9,0)
Just keep in mind if you hardcode the font to FRIZQT__.TTF it will break when fed Russian character names (not strictly, but the name will be replaced with ???????'s)

This may not be a problem for OP if they play on NA servers, but if anyone found this code and wanted to use it while playing on EU servers this can be a problem.
  Reply With Quote

WoWInterface » AddOns, Compilations, Macros » AddOn Search/Requests » Outline for Name in default Unit Frames

Thread Tools
Display Modes

Posting Rules
You may not post new threads
You may not post replies
You may not post attachments
You may not edit your posts

vB code is On
Smilies are On
[IMG] code is On
HTML code is Off