WoWInterface

WoWInterface (https://www.wowinterface.com/forums/index.php)
-   Lua/XML Help (https://www.wowinterface.com/forums/forumdisplay.php?f=16)
-   -   How to widen default unit frames for custom texture? (https://www.wowinterface.com/forums/showthread.php?t=57632)

cbjewelz 10-24-19 04:21 PM

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

Seerah 10-25-19 11:54 AM

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.

cbjewelz 10-26-19 11:29 AM

Quote:

Originally Posted by Seerah (Post 334400)
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

Seerah 10-26-19 12:30 PM

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

cbjewelz 10-26-19 03:08 PM

Quote:

Originally Posted by Seerah (Post 334416)
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


All times are GMT -6. The time now is 08:18 PM.

vBulletin © 2020, Jelsoft Enterprises Ltd
© 2004 - 2020 MMOUI