Thread Tools Display Modes
10-24-19, 04:21 PM   #1
cbjewelz
A Murloc Raider
Join Date: Oct 2019
Posts: 4
How to widen default unit frames for custom texture?

Hi all, I'm modifying the existing whoathickframes addon and trying to use a wider frame texture. I created it successfully in photoshop as a tga and it's loading correctly but the end is chopped off. I've tried SetWidth on every frame I can think of and the only one that does anything is PlayerFrame but then the texture stretches to fill it out and is still cropped. PlayerFrameBackground width setting works for the semi-opaque black background behind the healthbar but not the texture itself. See picture here: https://imgur.com/a/WW7Xnpx

Here is my code for changing the texture:

PlayerFrameTexture:SetTexture("Interface\\Addons\\whoaThickFrames_Classic\\media\\UI-TargetingFrame");

Trying to set the width of this frame does nothing.

Thanks in advance
  Reply With Quote
10-25-19, 11:54 AM   #2
Seerah
Fishing Trainer
 
Seerah's Avatar
WoWInterface Super Mod
Featured
Join Date: Oct 2006
Posts: 10,860
The PlayerFrame uses the texture from the target frame, but flipped. The texture file is also cropped.
(taken from PlayerFrame.xml)
Code:
<Texture name="PlayerFrameTexture" file="Interface\TargetingFrame\UI-TargetingFrame">
		<TexCoords left="1.0" right="0.09375" top="0" bottom="0.78125"/>
</Texture>
You need to either a) make the graphic in your texture match the dimensions of the graphic in UI-TargetingFrame.blp, or b) alter the texture coordinates on the player frame border texture.
__________________
"You'd be surprised how many people violate this simple principle every day of their lives and try to fit square pegs into round holes, ignoring the clear reality that Things Are As They Are." -Benjamin Hoff, The Tao of Pooh

  Reply With Quote
10-26-19, 11:29 AM   #3
cbjewelz
A Murloc Raider
Join Date: Oct 2019
Posts: 4
Originally Posted by Seerah View Post
The PlayerFrame uses the texture from the target frame, but flipped. The texture file is also cropped.
(taken from PlayerFrame.xml)
Code:
<Texture name="PlayerFrameTexture" file="Interface\TargetingFrame\UI-TargetingFrame">
		<TexCoords left="1.0" right="0.09375" top="0" bottom="0.78125"/>
</Texture>
You need to either a) make the graphic in your texture match the dimensions of the graphic in UI-TargetingFrame.blp, or b) alter the texture coordinates on the player frame border texture.

Ah thank you, it must be the coordinates since my texture is the same size. That property is such a pain to change though, it rescales so you need to know all the coordinates and it's not "pixels" or anything standard. I may give up
  Reply With Quote
10-26-19, 12:30 PM   #4
Seerah
Fishing Trainer
 
Seerah's Avatar
WoWInterface Super Mod
Featured
Join Date: Oct 2006
Posts: 10,860
The actual graphic (colored pixels) in your texture is not the same size and/or position as in the default texture. Otherwise yours would not get cut off.

https://wow.gamepedia.com/Viewing_Bl...interface_code
-or-
https://wow.gamepedia.com/API_Texture_SetTexCoord
__________________
"You'd be surprised how many people violate this simple principle every day of their lives and try to fit square pegs into round holes, ignoring the clear reality that Things Are As They Are." -Benjamin Hoff, The Tao of Pooh

  Reply With Quote
10-26-19, 03:08 PM   #5
cbjewelz
A Murloc Raider
Join Date: Oct 2019
Posts: 4
Originally Posted by Seerah View Post
The actual graphic (colored pixels) in your texture is not the same size and/or position as in the default texture. Otherwise yours would not get cut off.

https://wow.gamepedia.com/Viewing_Bl...interface_code
-or-
https://wow.gamepedia.com/API_Texture_SetTexCoord
Right I just got frustrated with trying to use Set TextCoords. The coordinate system is so annoying ha. Wish there was an easy setSize
  Reply With Quote

WoWInterface » Developer Discussions » Lua/XML Help » How to widen default unit frames for custom texture?

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