View Single Post
02-29-16, 02:31 AM   #21
zork
A Pyroguard Emberseer
 
zork's Avatar
AddOn Author - Click to view addons
Join Date: Jul 2008
Posts: 1,740
You can solve any framelevel and strata issues via frame stacking. This can be done by parenting any frame to the last frame you created.

Like if you want power below health you create power first with all the desired layers and anchor your base health frame to your highest power frame (overlay?).

Example:
local power = CreateFrame("Statusbar",nil,self)
power.overlay = CreateFrame("Frame",nil,power)
local health = CreateFrame("Statusbar",nil,power.overlay)
self.power =power
self.health = health

For statusbar texture. Your texture is 258x34 pixel. If that is the case that is the wrong size. It has to be 256x32 pixel. (Multiplier of 8).

By default any statusbar is stretched into the space given. StatusbarTexture accepts two types of variables. A texture path string and a texture object. You could create a texture beforehand and pass into to SetStatusbarTexture. You do not have to do it that way because GetStatusbarTexture will return the texture object.

Either way. A texture objext can have SetVertTile and SetHorizTile. This will prevent texture stretching and will repeat the texture the way you defined it.

http://wowprogramming.com/docs/widgets/Texture
http://wowprogramming.com/docs/widgets/StatusBar
__________________
| Simple is beautiful.
| WoWI AddOns | GitHub | Zork (WoW)

"I wonder what the non-pathetic people are doing tonight?" - Rajesh Koothrappali (The Big Bang Theory)

Last edited by zork : 02-29-16 at 02:33 AM.
  Reply With Quote