Thread Tools Display Modes
10-15-14, 02:32 PM   #1
deeghan
A Kobold Labourer
Join Date: Oct 2014
Posts: 1
Large Status Bar Texture With Small Usable Area

I'm trying my hand at creating a custom UI and I've hit a snag.

I have a status bar texture that's currently defined at 1024x128. The actual part of the image that's being used is approximately 550x90.

Unfortunately, the status bar is using the entire 1024 width to represent health changes. This means that the visible bar doesn't move until the player is at roughly 70% health and is empty when the character has 20% or less.

Is there any way to constrain the status bar health to a given area or am I stuck researching a different way to solve this problem?

Thanks!
  Reply With Quote
10-15-14, 02:42 PM   #2
sticklord
A Wyrmkin Dreamwalker
AddOn Author - Click to view addons
Join Date: Aug 2014
Posts: 57
Try this:

YourStatusbar:GetStatusbarTexture():SetTexCoord(left,right,top,bottom)

If the texture is in the middle then it would be:

SetTexCoord(137/1024, 1 - 137/1024, 19/128, 1- 19/128) i think.
  Reply With Quote

WoWInterface » Featured Projects » oUF (Otravi Unit Frames) » Large Status Bar Texture With Small Usable Area


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