Thread Tools Display Modes
03-14-21, 11:25 PM   #1
sirpucna
An Aku'mai Servant
Join Date: Nov 2016
Posts: 31
TargetFrame SetTextCoords

i'm looking for a demonstration on how to cut out a portion of the PlayerFrame/TargetFrame with SetTextCoords as show here:


My intent is to use blizzards texture and not use a custom one to create thick health bar, but doing so without it being obvious(green highlighted square to cut and paste the part below it)

I've seen it done with a addon called Baik UnitFrame Module, but its complexity is far beyond my skills.

Last edited by sirpucna : 03-15-21 at 07:07 AM.
  Reply With Quote
03-15-21, 06:21 AM   #2
d87
A Chromatic Dragonspawn
 
d87's Avatar
AddOn Author - Click to view addons
Join Date: Jan 2006
Posts: 163
If you want to cut out the green rectangle it'll be something like tex:SetTexCoord(0.1, 0.12, 0.4, 0.45)
That's left, right, top, bottom. And the values are how deep into the image the cut is starting from top left
  Reply With Quote
03-15-21, 07:12 AM   #3
sirpucna
An Aku'mai Servant
Join Date: Nov 2016
Posts: 31
thanks for the reply, i uploaded a better picture of the area i want to cut(green), but doing so would leave a ugly mark on the left, so i was thinking using the purple highlighted area to copy and paste this portion of the frame, and drop it down to cover up the mark.
  Reply With Quote
03-15-21, 11:46 AM   #4
d87
A Chromatic Dragonspawn
 
d87's Avatar
AddOn Author - Click to view addons
Join Date: Jan 2006
Posts: 163
Then you should use texture mask on the default texture to completely cut out the separator with the sides and then cover the hole with the purple part

Lua Code:
  1. local mask = self:CreateMaskTexture(nil, "BACKGROUND", nil, 0)
  2. mask:SetTexture("Interface\\Addons\\tmask", "CLAMPTOWHITE", "CLAMPTOWHITE")
  3. mask:SetAllPoints(self)
  4. mainTexture:AddMaskTexture(mask)
  Reply With Quote

WoWInterface » Developer Discussions » Lua/XML Help » TargetFrame SetTextCoords

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