Reply
Thread Tools Display Modes
Unread 04-09-13, 11:45 AM   #1
zork
A Pyroguard Emberseer
 
zork's Avatar
AddOn Author - Click to view addons
Join Date: Jul 2008
Posts: 1,367
The string icon archive

Today I wanted to write myself a world marker addon. I wanted the icons on a button so I needed the string derivate of that icon. So I sat down and grabbed every single icon string I could find in the WoW-Source.

I did not find class strings. So I added them myself. Not that hard with the square classes texture.

Have fun with it.



Lua Code:
  1. --addon code
  2.  
  3.   local addon, ns = ...
  4.  
  5.   --stuff
  6.  
  7.   local tinsert = tinsert
  8.   local NUM_WORLD_RAID_MARKERS = NUM_WORLD_RAID_MARKERS
  9.  
  10.   local icons = {}
  11.  
  12.   --tank
  13.   tinsert(icons, "|TInterface\\LFGFrame\\LFGRole:14:14:0:0:64:16:32:48:0:16|t")
  14.   tinsert(icons, "|TInterface\\LFGFrame\\UI-LFG-ICON-PORTRAITROLES:16:16:0:0:64:64:0:19:22:41|t")
  15.   --healer
  16.   tinsert(icons, "|TInterface\\LFGFrame\\LFGRole:14:14:0:0:64:16:48:64:0:16|t")
  17.   tinsert(icons, "|TInterface\\LFGFrame\\UI-LFG-ICON-PORTRAITROLES:16:16:0:0:64:64:20:39:1:20|t")
  18.   --dps
  19.   tinsert(icons, "|TInterface\\LFGFrame\\LFGRole:14:14:0:0:64:16:16:32:0:16|t")
  20.   tinsert(icons, "|TInterface\\LFGFrame\\UI-LFG-ICON-PORTRAITROLES:16:16:0:0:64:64:20:39:22:41|t")
  21.  
  22.   --raid target
  23.   tinsert(icons, "|TInterface\\TargetingFrame\\UI-RaidTargetingIcon_1:0|t")
  24.   tinsert(icons, "|TInterface\\TargetingFrame\\UI-RaidTargetingIcon_2:0|t")
  25.   tinsert(icons, "|TInterface\\TargetingFrame\\UI-RaidTargetingIcon_3:0|t")
  26.   tinsert(icons, "|TInterface\\TargetingFrame\\UI-RaidTargetingIcon_4:0|t")
  27.   tinsert(icons, "|TInterface\\TargetingFrame\\UI-RaidTargetingIcon_5:0|t")
  28.   tinsert(icons, "|TInterface\\TargetingFrame\\UI-RaidTargetingIcon_6:0|t")
  29.   tinsert(icons, "|TInterface\\TargetingFrame\\UI-RaidTargetingIcon_7:0|t")
  30.   tinsert(icons, "|TInterface\\TargetingFrame\\UI-RaidTargetingIcon_8:0|t")
  31.  
  32.   --world marker
  33.   tinsert(icons, "|TInterface\\TargetingFrame\\UI-RaidTargetingIcon_6:14:14|t")
  34.   tinsert(icons, "|TInterface\\TargetingFrame\\UI-RaidTargetingIcon_4:14:14|t")
  35.   tinsert(icons, "|TInterface\\TargetingFrame\\UI-RaidTargetingIcon_3:14:14|t")
  36.   tinsert(icons, "|TInterface\\TargetingFrame\\UI-RaidTargetingIcon_7:14:14|t")
  37.   tinsert(icons, "|TInterface\\TargetingFrame\\UI-RaidTargetingIcon_1:14:14|t")
  38.  
  39.   --blizzard icon
  40.   tinsert(icons, "|TInterface\\ChatFrame\\UI-ChatIcon-Blizz:12:20:0:0:32:16:4:28:0:16|t")
  41.   tinsert(icons, "|TInterface\\ChatFrame\\UI-ChatIcon-Blizz:0:2:0:0|t")
  42.  
  43.   --guild reward
  44.   tinsert(icons, "|TInterface\\AchievementFrame\\UI-Achievement-Guild:18:16:0:1:512:512:324:344:67:85|t")
  45.  
  46.   --mobile busy
  47.   tinsert(icons, "|TInterface\\ChatFrame\\UI-ChatIcon-ArmoryChat-BusyMobile:14:14:0:0:16:16:0:16:0:16|t")
  48.   --mobile away
  49.   tinsert(icons, "|TInterface\\ChatFrame\\UI-ChatIcon-ArmoryChat-AwayMobile:14:14:0:0:16:16:0:16:0:16|t")
  50.  
  51.   --assist
  52.   tinsert(icons, "|TInterface\\GroupFrame\\UI-Group-AssistantIcon:20:20:0:1|t")
  53.  
  54.   --noloot
  55.   tinsert(icons, "|TInterface\\Common\\Icon-NoLoot:13:13:0:0|t")
  56.  
  57.   --status
  58.   tinsert(icons, "|TInterface\\OptionsFrame\\UI-OptionsFrame-NewFeatureIcon:0:0:0:-1|t")
  59.  
  60.   --article updated
  61.   tinsert(icons, "|TInterface\\GossipFrame\\AvailableQuestIcon:0:0:0:0|t")
  62.   --article hot
  63.   tinsert(icons, "|TInterface\\HelpFrame\\HotIssueIcon:0:0:0:0|t")
  64.  
  65.   --lock
  66.   tinsert(icons, "|TInterface\\LFGFrame\\UI-LFG-ICON-LOCK:14:14:0:0:32:32:0:28:0:28|t")
  67.  
  68.   --heroic
  69.   tinsert(icons, "|TInterface\\LFGFrame\\UI-LFG-ICON-HEROIC:16:13:-5:-3:32:32:0:16:0:20|t")
  70.  
  71.   --alliance
  72.   tinsert(icons, "|TInterface\\TargetingFrame\\UI-PVP-ALLIANCE:19:16:0:0:64:64:0:32:0:38|t")
  73.   --horde
  74.   tinsert(icons, "|TInterface\\TargetingFrame\\UI-PVP-HORDE:18:19:0:0:64:64:0:38:0:36|t")
  75.  
  76.   --skull
  77.   tinsert(icons, "|TInterface\\TargetingFrame\\UI-TargetingFrame-Skull:0|t")
  78.  
  79.   --petbattle strong
  80.   tinsert(icons, "|TInterface\\petbattles\\battlebar-abilitybadge-strong-small:0|t")
  81.   --petbattle weak
  82.   tinsert(icons, "|TInterface\\petbattles\\battlebar-abilitybadge-weak-small:0|t")
  83.  
  84.   --classes
  85.   --warrior
  86.   tinsert(icons, "|TInterface\\WorldStateFrame\\ICONS-CLASSES:14:14:0:0:256:256:0:64:0:64|t")
  87.   --mage
  88.   tinsert(icons, "|TInterface\\WorldStateFrame\\ICONS-CLASSES:14:14:0:0:256:256:64:128:0:64|t")
  89.   --rogue
  90.   tinsert(icons, "|TInterface\\WorldStateFrame\\ICONS-CLASSES:14:14:0:0:256:256:128:196:0:64|t")
  91.   --druid
  92.   tinsert(icons, "|TInterface\\WorldStateFrame\\ICONS-CLASSES:14:14:0:0:256:256:196:256:0:64|t")
  93.   --hunter
  94.   tinsert(icons, "|TInterface\\WorldStateFrame\\ICONS-CLASSES:14:14:0:0:256:256:0:64:64:128|t")
  95.   --shaman
  96.   tinsert(icons, "|TInterface\\WorldStateFrame\\ICONS-CLASSES:14:14:0:0:256:256:64:128:64:128|t")
  97.   --priest
  98.   tinsert(icons, "|TInterface\\WorldStateFrame\\ICONS-CLASSES:14:14:0:0:256:256:128:196:64:128|t")
  99.   --warlock
  100.   tinsert(icons, "|TInterface\\WorldStateFrame\\ICONS-CLASSES:14:14:0:0:256:256:196:256:64:128|t")
  101.   --paladin
  102.   tinsert(icons, "|TInterface\\WorldStateFrame\\ICONS-CLASSES:14:14:0:0:256:256:0:64:128:196|t")
  103.   --deathknight
  104.   tinsert(icons, "|TInterface\\WorldStateFrame\\ICONS-CLASSES:14:14:0:0:256:256:64:128:128:196|t")
  105.   --monk
  106.   tinsert(icons, "|TInterface\\WorldStateFrame\\ICONS-CLASSES:14:14:0:0:256:256:128:196:128:196|t")
  107.  
  108.   --ready check wait
  109.   tinsert(icons, "|TInterface\\RaidFrame\\ReadyCheck-Waiting:14:14:0:0|t")
  110.   --ready check ready
  111.   tinsert(icons, "|TInterface\\RaidFrame\\ReadyCheck-Ready:14:14:0:0|t")
  112.   --ready check not ready
  113.   tinsert(icons, "|TInterface\\RaidFrame\\ReadyCheck-NotReady:14:14:0:0|t")
  114.  
  115.   --info
  116.   tinsert(icons, "|TInterface\\FriendsFrame\\InformationIcon:14:14:0:0|t")
  117.  
  118.   --raidleader
  119.   tinsert(icons, "|TInterface\\GroupFrame\\UI-Group-LeaderIcon:14:14:0:0|t")
  120.   --maintank
  121.   tinsert(icons, "|TInterface\\GROUPFRAME\\UI-GROUP-MAINTANKICON:14:14:0:0|t")
  122.   --mainassist
  123.   tinsert(icons, "|TInterface\\GROUPFRAME\\UI-GROUP-MAINASSISTICON:14:14:0:0|t")
  124.   --masterlooter
  125.   tinsert(icons, "|TInterface\\GroupFrame\\UI-Group-MasterLooter:14:14:0:0|t")
  126.  
  127.   --roll dice
  128.   tinsert(icons, "|TInterface\\Buttons\\UI-GroupLoot-Dice-Up:14:14:0:0|t")
  129.   --roll coin
  130.   tinsert(icons, "|TInterface\\Buttons\\UI-GroupLoot-Coin-Up:14:14:0:0|t")
  131.   --roll disenchant
  132.   tinsert(icons, "|TInterface\\Buttons\\UI-GroupLoot-DE-Up:14:14:0:0|t")
  133.   --roll cancel
  134.   tinsert(icons, "|TInterface\\Buttons\\UI-GroupLoot-Pass-Up:14:14:0:0|t")
  135.  
  136.  
  137.   local string = ""
  138.  
  139.   for key, value in pairs(icons) do
  140.     string = string..value
  141.   end
  142.  
  143.   print(string)

You can use those texture strings on any fontstring via SetText(str).

Read more: http://www.wowwiki.com/UI_escape_sequences#Textures

|TTexturePath:size1:size2:xoffset:yoffset|t
|TTexturePath:size1:size2:xoffset:yoffset:dimx:dimy:coordx1:coordx2:coordy1:coordy2|t
Will insert a texture into a font string. Parameter size2 is optional (see below). The offsets are optional and will shift the texture from where it would normally be placed. TextHeight is based on size of the font used - this is used to automatically scale icons based on the size of the text.

size1 == 0; size2 omitted: Width = Height = TextHeight (always square!)
size1 > 0; size2 omitted: Width = Height = size1 (always square!)
size1 == 0; size2 == 0 : Width = Height = TextHeight (always square!)
size1 > 0; size2 == 0 : Width = TextHeight; Height = size1 (size1 is height!!!)
size1 == 0; size2 > 0 : Width = size2 * TextHeight; Height = TextHeight (size2 is an aspect ratio and defines width!!!)
size1 > 0; size2 > 0 : Width = size1; Height = size2
dimx dimy: Size of the source image, in pixels
coordx1 coordx2 coordy1 coordy2: Number of pixels to crop the texture by from each edge
__________________
| Simple is beautiful.
| Roth UI | Roth UI FAQ | GoogleCode | Zork | TDMOG

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

Last edited by zork : 06-24-13 at 02:22 AM.
zork is offline   Reply With Quote
Reply

Go BackWoWInterface » Developer Discussions » Tutorials & Other Helpful Info. » The string icon archive

Thread Tools
Display Modes

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