Thread Tools Display Modes
06-07-24, 06:39 AM   #1
btarb24
A Defias Bandit
Join Date: Jun 2024
Posts: 3
crop texture display via texture string?

"some more text|TInterface\\PETBATTLES\\PetBattle-StatIcons:24|t"

That statIcon is the size of a normal icon, but is actually a sprite consisting of 4 separate icons inside. Any idea how i can zoom in/crop/position the icon so that only 1 of the sub-icons is visible?

I'm currently trying to write the text and icon within a LibQTip tooltip cell.

  Reply With Quote
06-07-24, 08:00 AM   #2
btarb24
A Defias Bandit
Join Date: Jun 2024
Posts: 3
got it figured out with help from here:
* https://www.wowinterface.com/forums/...ad.php?t=46221
* https://wowpedia.fandom.com/wiki/UI_...ences#Textures



breakdown for my specific case:
"|TInterface\\PETBATTLES\\PetBattle-StatIcons:16:16:0:0:32:32:16:32:0:16|t"

16 - width i wanted to draw
16 - height i wanted to draw
0 - the horizontal indent i wanted
0 - the vertical indent i wanted
32 - width of the original image
32 - height of the original image
16 - the X1 of where to start my crop
32 - the X2 of where to end my crop
0 - the y1 of where to start my crop
16 - the y2 of where to end my crop
  Reply With Quote

WoWInterface » Developer Discussions » Lua/XML Help » crop texture display via texture string?


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