Icon System
The icon system provides a comprehensive set of custom icons for map nodes, along with utility functions for icon management and display.
Icon Structure
Each icon entry contains both the main icon texture and an optional glow texture:
ns.icons.chest_yw = {
'Interface\\Addons\\HandyNotes\\core\\artwork\\icons\\chest_yellow.blp', -- Main icon
'Interface\\Addons\\HandyNotes\\core\\artwork\\glows\\chest.blp' -- Glow texture
}
Functions
ns.GetIconPath(name)
Returns the file path to the main icon texture:
local path = ns.GetIconPath('chest_yw')
-- Returns: 'Interface\\Addons\\HandyNotes\\core\\artwork\\icons\\chest_yellow.blp'
ns.GetGlowPath(name)
Returns the file path to the glow texture:
local glowPath = ns.GetGlowPath('chest_yw')
-- Returns: 'Interface\\Addons\\HandyNotes\\core\\artwork\\glows\\chest.blp'
ns.GetIconLink(name, size, offsetX, offsetY)
Creates a texture link for inline text display (see Wowpedia):
-- Basic usage
local link = ns.GetIconLink('chest_yw')
-- Returns: '|TInterface\\Addons\\...\\chest_yellow.blp:0:0|t'
-- With custom size and offset
local link = ns.GetIconLink('chest_yw', 16, 2, 4)
-- Returns: '|TInterface\\Addons\\...\\chest_yellow.blp:16:16:2:4|t'
Usage in Nodes
Icons can be specified by name or texture ID:
-- From Azj-Kahet plugin - Using framework treasure icon
map.nodes[62601430] = ns.node.Treasure({
quest = 82718,
note = L['concealed_contraband_note'],
icon = 'chest_gy' -- Framework gray chest icon
})
-- From Azj-Kahet plugin - Using game texture ID for vendor
cot.nodes[58463084] = ns.node.NPC({
id = 220867,
icon = 4254892, -- Game texture for vendor NPCs
group = ns.groups.VENDOR
}) -- Memory Cache Merchant
-- From profession treasures - Using profession icons
cot.nodes[45321322] = ns.node.ProfessionTreasures.Alchemy({
quest = 83846,
id = 226271,
icon = 'crystal_o' -- Orange crystal for alchemy
}) -- Nerubian Mixing Salts
-- Rare with default skull icon (framework handles automatically)
map.nodes[61411274] = ns.node.Rare({
id = 221327,
quest = 81705,
-- icon defaults to 'skull_b', changes to 'skull_w' when completed
note = L['tka_fleshripper_note']
}) -- Tka'ktath Fleshripper
Icons can be embedded in tooltip text:
-- From project plugins - Embedding icons in notes
local node = ns.node.Treasure({
quest = 82721,
label = '{item:224783}', -- Item icon via game link
note = ns.GetIconLink('chest_gy', 16) .. ' ' .. L['memory_cache_note'],
icon = 'chest_gy'
}) -- Trapped Memory Cache
-- From Kej Pet Vendor - Using profession icons in notes
map.nodes[59235348] = ns.node.KejPetVendor({
id = 218187,
note = ns.GetIconLink('paw_y', 14) .. ' ' .. L['kej_pet_vendor_note'],
group = ns.groups.VENDOR
}) -- Kej Pet Vendor
Default Icons
The framework provides a default icon system:
local DEFAULT_ICON = 454046 -- Default texture ID
local DEFAULT_GLOW = 'Interface\\Addons\\...\\square_icon.blp'
-- Fallback when icon not found
function GetNodeIcon(iconName)
return ns.icons[iconName] or DEFAULT_ICON
end
Icons
Chests
| Name |
Icon |
name in code |
| Chest Black |
 |
'chest_bk' |
| Chest Blue |
 |
'chest_bl' |
| Chest Brown |
 |
'chest_bn' |
| Chest Green |
 |
'chest_gn' |
| Chest Gray |
 |
'chest_gy' |
| Chest Lime |
 |
'chest_lm' |
| Chest Navy |
 |
'chest_nv' |
| Chest Pink |
 |
'chest_pk' |
| Chest Purple |
 |
'chest_pp' |
| Chest Red |
 |
'chest_rd' |
| Chest Teal |
 |
'chest_tl' |
| Chest Yellow |
 |
'chest_yw' |
| Star Chest Blue |
 |
'star_chest_b' |
| Star Chest Gray |
 |
'star_chest_g' |
| Star Chest Pink |
 |
'star_chest_p' |
| Star Chest Yellow |
 |
'star_chest_y' |
Crystals
| Name |
Icon |
name in code |
| Crystal Blue |
 |
'crystal_b' |
| Crystal Orange |
 |
'crystal_o' |
| Crystal Purple |
 |
'crystal_p' |
Flight Points
| Name |
Icon |
name in code |
| Flight Point Gray |
 |
'flight_point_g' |
| Flight Point Yellow |
 |
'flight_point_y' |
Horseshoes
| Name |
Icon |
name in code |
| Horseshoe Black |
 |
'horseshoe_b' |
| Horseshoe Gray |
 |
'horseshoe_g' |
| Horseshoe Orange |
 |
'horseshoe_o' |
Pet Battle Paws
| Name |
Icon |
name in code |
| Paw Green |
 |
'paw_g' |
| Paw Yellow |
 |
'paw_y'. |
Pegs
| Name |
Icon |
name in code |
| Peg Blue |
 |
'peg_bl' |
| Peg Black |
 |
'peg_bk' |
| Peg Green |
 |
'peg_gn' |
| Peg Red |
 |
'peg_rd' |
| Peg Yellow |
 |
'peg_yw' |
Portals
| Name |
Icon |
name in code |
| Portal Blue |
 |
'portal_bl' |
| Portal Gray |
 |
'portal_gy' |
| Portal Green |
 |
'portal_gn' |
| Portal Purple |
 |
'portal_pp' |
| Portal Red |
 |
'portal_rd' |
Quests
| Name |
Icon |
name in code |
| Quest available Blue |
 |
'quest_ab' |
| Quest available Green |
 |
'quest_ag' |
| Quest available Orange |
 |
'quest_ao' |
| Quest available Yellow |
 |
'quest_ay' |
| world_quest |
 |
'world_quest' |
Skulls
| Name |
Icon |
name in code |
| Skull Blue |
 |
'skull_b' |
| Skull White |
 |
'skull_w' |
| Star Skull Blue |
 |
'star_skull_b' |
| Star Skull White |
 |
'star_skull_w' |
Miscellaneous Icons
| Name |
Icon |
name in code |
| Alliance |
 |
'alliance' |
| Horde |
 |
'horde' |
| Achievement |
 |
'achievement' |
| Door Down |
 |
'door_down' |
| Envelope |
 |
'envelope' |
| Left Mouse Button |
 |
'left_mouse' |
| Scroll |
 |
'scroll' |
| War Mode Flags |
 |
'war_mode_flags' |
| War Mode Swords |
 |
'war_mode_swords' |
| Checkmark Blue |
 |
'check_bl' |
| Checkmark Green |
 |
'check_gn' |
| Checkmark Gray |
 |
'check_gy' |
| Checkmark Yellow |
 |
'check_yw' |