Thread Tools Display Modes
08-12-12, 12:55 PM   #1
CrusaderHeimdall
A Defias Bandit
AddOn Author - Click to view addons
Join Date: Aug 2012
Posts: 2
Custom Bar Textures

Hello all, I am having trouble setting a custom bar texture for my addon. The texture is borrowed from a released, working addon, i am trying to use :SetStatusBarTexture("filename...") to apply it, however since it is not a default texture, i am not sure where it should be put. right now i have it in my addon folder and the filename is pointing to it, but it does not display

UIObject[i].bar:SetStatusBarTexture("Interface\\Addons\\MyAddon\\texture")

this is the code im using with generic file terms.
  Reply With Quote
08-12-12, 01:15 PM   #2
Unkn
Premium Member
 
Unkn's Avatar
AddOn Author - Click to view addons
Join Date: Oct 2008
Posts: 258
Is it the right size and format? That tends to stump me every now and then.
__________________
"I'm very feminine. And I'll beat the crap out of ANYONE who disagrees!"
  Reply With Quote
08-12-12, 01:39 PM   #3
Kendian
A Molten Giant
 
Kendian's Avatar
AddOn Author - Click to view addons
Join Date: Mar 2010
Posts: 614
and it may be small, but should be ("Interface\\AddOns\\MyAddon\\texture") , right?
__________________
  Reply With Quote
08-12-12, 02:09 PM   #4
p3lim
A Pyroguard Emberseer
 
p3lim's Avatar
AddOn Author - Click to view addons
Join Date: Feb 2007
Posts: 1,710
The size of the texture has to be by the power of two, so, 16x16, 32x32, 64x128, etc.
  Reply With Quote
08-12-12, 07:32 PM   #5
Seerah
Fishing Trainer
 
Seerah's Avatar
WoWInterface Super Mod
Featured
Join Date: Oct 2006
Posts: 10,860
He said he took the texture from another addon, so it's probably the correct size/format.

CrusaderHeimdall: Have you completely exited and restarted WoW?

PS- don't use "generic file terms", just use what you actually have. Oftentimes, an error lies in the code or file paths. But pseudo-code and "generic file terms" don't show us what you actually have.

/edit: lastly, what problem are you having exactly?
__________________
"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
08-15-12, 09:52 PM   #6
Seerah
Fishing Trainer
 
Seerah's Avatar
WoWInterface Super Mod
Featured
Join Date: Oct 2006
Posts: 10,860
Nah, you don't really need the extension there.
__________________
"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
08-15-12, 10:16 PM   #7
jeffy162
A Pyroguard Emberseer
 
jeffy162's Avatar
AddOn Author - Click to view addons
Join Date: May 2009
Posts: 2,364
Originally Posted by CrusaderHeimdall View Post
Hello all, I am having trouble setting a custom bar texture for my addon. The texture is borrowed from a released, working addon, i am trying to use :SetStatusBarTexture("filename...") to apply it, however since it is not a default texture, i am not sure where it should be put. right now i have it in my addon folder and the filename is pointing to it, but it does not display

UIObject[i].bar:SetStatusBarTexture("Interface\\Addons\\MyAddon\\texture")

this is the code im using with generic file terms.
Check for the proper spelling in your file path. For example:

Is it
Code:
UIObject[i].bar:SetStatusBarTexture("Interface\\Addons\\MyAddon\\texture")
Or:
Code:
UIObject[i].bar:SetStatusBarTexture("Interface\\AddOns\\MyAddon\\texture")
A small difference, but that might be the problem. I know that if I don't spell the folder name where all of my addons are correctly when I add a graphic for kgPanels, the graphic just doesn't show up. At all. Correct the spelling for that folder in the file path, though, and everything's hunky dory.

Like Kendian said:
Originally Posted by Kendian View Post
and it may be small, but should be ("Interface\\AddOns\\MyAddon\\texture") , right?
__________________
Ahhhh, the vagueries of the aging mind. Wait.... What was I saying?


Carbonite <----- GitHub main module (Maps ONLY) download link. The other modules are also available on GitHub.
Carbonite-CLASSIC<----- GitHub link to Carbonite Classic. Thanks to ircdirk for this!
  Reply With Quote
08-21-12, 07:02 PM   #8
CrusaderHeimdall
A Defias Bandit
AddOn Author - Click to view addons
Join Date: Aug 2012
Posts: 2
Ok to answer some questions quickly:
Yes its the right size, I hijacked it from Forte for testing purposes.
Exact problem, texture is changing to no texture, removes the bar texture.
I highly think it is the "O" capitalization problem. Being well versed with Cpp I should have seen that...
And yes I have done a cold load. needed to do that for another issue.

Ok, just tested it, It was the capitalization problem. I feel silly about outing myself over that, but, then, it happens to us all at some point. Thank you all for your tips and suggestions!!

Last edited by CrusaderHeimdall : 08-21-12 at 07:03 PM. Reason: Solution
  Reply With Quote
08-21-12, 10:08 PM   #9
Phanx
Cat.
 
Phanx's Avatar
AddOn Author - Click to view addons
Join Date: Mar 2006
Posts: 5,617
Case sensitivity depends on your file system. Windows file systems are usually not case-sensitive (technically NTFS is, but Windows acts like it's not, for most practical intents and purposes). Mac is not case-sensitive by default, though you can switch it. Linux file systems usually are case-sensitive. Even if you expect to only ever run code on your own machine, capitalizing things properly is still a good habit to be in.

If you're ever working with textures that are part of the game client, and aren't sure of the proper capitalization (since Blizzard can't seem to make up their mind whether to CamelCase or UPPERCASE their folder names), the artwork browser and XML browser on wowprogramming.com both preserve the original capitalization, or you can extract the art files from your game client, or you can just browse the contents of the MPQ files.
__________________
Retired author of too many addons.
Message me if you're interested in taking over one of my addons.
Don’t message me about addon bugs or programming questions.

Last edited by Phanx : 08-22-12 at 05:15 PM.
  Reply With Quote
08-22-12, 04:13 PM   #10
Torhal
A Pyroguard Emberseer
 
Torhal's Avatar
AddOn Author - Click to view addons
Join Date: Aug 2008
Posts: 1,196
Actually, OSX by default is case-insensitive though you can switch it to case-sensitive like most other *NIX OSes - WoW will happily refuse to run, however.
__________________
Whenever someone says "pls" because it's shorter than "please", I say "no" because it's shorter than "yes".

Author of NPCScan and many other AddOns.
  Reply With Quote
08-22-12, 05:14 PM   #11
Phanx
Cat.
 
Phanx's Avatar
AddOn Author - Click to view addons
Join Date: Mar 2006
Posts: 5,617
ORLY

Edited my previous post.
__________________
Retired author of too many addons.
Message me if you're interested in taking over one of my addons.
Don’t message me about addon bugs or programming questions.
  Reply With Quote

WoWInterface » Developer Discussions » General Authoring Discussion » Custom Bar Textures


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