Thread Tools Display Modes
11-24-10, 12:52 PM   #1
zork
A Pyroguard Emberseer
 
zork's Avatar
AddOn Author - Click to view addons
Join Date: Jul 2008
Posts: 1,740
textures in fontsstrings

Can I add a scull or a lootrollcancel icon in a fontstring?

If yes, how?

Need this example for my tag because my problem is that the tag has no access to the object. or does it?

skull texture: "interface\\targetingframe\\ui-targetingframe-skull"

basically what I want to do is to display the skull if the unit is dead and the lootroll cancel if the unit is disconnected.

Or if that is possible...can I add tags to textures? So to speak.?

Example what I want to do:


*edit* just saw that health has the UNIT_CONNECTION registered aswell. So I'm going to do the texture artwork in the postUpdateHealth and the fontstring via tags. Alright for me.

Done:
__________________
| 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 : 11-24-10 at 01:47 PM.
  Reply With Quote
11-26-10, 04:02 AM   #2
Waverian
A Chromatic Dragonspawn
AddOn Author - Click to view addons
Join Date: Dec 2006
Posts: 188
Just for future reference it is possible to add textures to a fontstring.

http://www.wowpedia.org/UI_escape_sequences#Textures

For example: "|TInterface/Icons/Ability_Rogue_SliceDice:20:20:0:0:64:64:5:59:5:59|tMyText"

That's a 20x20 S&D icon (cropped by 5 pixels on each size to remove border) followed by MyText.
  Reply With Quote
11-26-10, 04:36 AM   #3
zork
A Pyroguard Emberseer
 
zork's Avatar
AddOn Author - Click to view addons
Join Date: Jul 2008
Posts: 1,740
Awesome. Ty. Exactly what I was looking for.

Code:
|T
  TexturePath:
  Width:
  Height:
  PositionX:
  PositionY:
  OrigTextureWidth:
  OrigTextureHeight:
  CropTop:
  OrigTextureHeight-CropBottom:
  CropLeft:
  OrigTextureWidth-CropRight
|t
__________________
| 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 : 11-26-10 at 04:46 AM.
  Reply With Quote
11-26-10, 04:48 AM   #4
drakull
A Cyclonian
 
drakull's Avatar
AddOn Author - Click to view addons
Join Date: Apr 2008
Posts: 49
Wow, that's a great idea. And I thought that textures inside fontstrings where limited by the font's height.

PS: Can someone please teach me the best way to find out the game's textures name and path? Thanks a lot!
  Reply With Quote
11-26-10, 05:16 AM   #5
yj589794
A Rage Talon Dragon Guard
AddOn Author - Click to view addons
Join Date: Mar 2009
Posts: 314
You can either extract them yourself with the WoW developer SDK, or check the listing on wowprogramming.com.
  Reply With Quote

WoWInterface » Featured Projects » oUF (Otravi Unit Frames) » textures in fontsstrings


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