HandyNotes Plugin Documentation

Documentation for the core framework used in Zarillion's HandyNotes expansion plugins.

View the Project on GitHub zarillion/handynotes-plugins

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

Usage in Tooltips

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_bk'
Chest Blue chest_bl 'chest_bl'
Chest Brown chest_bn 'chest_bn'
Chest Green chest_gn 'chest_gn'
Chest Gray chest_gy 'chest_gy'
Chest Lime chest_lm 'chest_lm'
Chest Navy chest_nv 'chest_nv'
Chest Pink chest_pk 'chest_pk'
Chest Purple chest_pp 'chest_pp'
Chest Red chest_rd 'chest_rd'
Chest Teal chest_tl 'chest_tl'
Chest Yellow chest_yw 'chest_yw'
Star Chest Blue star_chest_b 'star_chest_b'
Star Chest Gray star_chest_g 'star_chest_g'
Star Chest Pink star_chest_p 'star_chest_p'
Star Chest Yellow star_chest_y 'star_chest_y'

Crystals

Name Icon name in code
Crystal Blue crystal_b 'crystal_b'
Crystal Orange crystal_o 'crystal_o'
Crystal Purple crystal_p 'crystal_p'

Flight Points

Name Icon name in code
Flight Point Gray flight_point_g 'flight_point_g'
Flight Point Yellow flight_point_y 'flight_point_y'

Horseshoes

Name Icon name in code
Horseshoe Black horseshoe_b 'horseshoe_b'
Horseshoe Gray horseshoe_g 'horseshoe_g'
Horseshoe Orange horseshoe_o 'horseshoe_o'

Pet Battle Paws

Name Icon name in code
Paw Green paw_g 'paw_g'
Paw Yellow paw_y 'paw_y'.

Pegs

Name Icon name in code
Peg Blue peg_bl 'peg_bl'
Peg Black peg_bk 'peg_bk'
Peg Green peg_gn 'peg_gn'
Peg Red peg_rd 'peg_rd'
Peg Yellow peg_yw 'peg_yw'

Portals

Name Icon name in code
Portal Blue portal_bl 'portal_bl'
Portal Gray portal_gy 'portal_gy'
Portal Green portal_gn 'portal_gn'
Portal Purple portal_pp 'portal_pp'
Portal Red portal_rd 'portal_rd'

Quests

Name Icon name in code
Quest available Blue quest_ab 'quest_ab'
Quest available Green quest_ag 'quest_ag'
Quest available Orange quest_ao 'quest_ao'
Quest available Yellow quest_ay 'quest_ay'
world_quest world_quest 'world_quest'

Skulls

Name Icon name in code
Skull Blue skull_b 'skull_b'
Skull White skull_w 'skull_w'
Star Skull Blue star_skull_b 'star_skull_b'
Star Skull White star_skull_w 'star_skull_w'

Miscellaneous Icons

Name Icon name in code
Alliance alliance 'alliance'
Horde horde 'horde'
Achievement achievement 'achievement'
Door Down door_down 'door_down'
Envelope envelope 'envelope'
Left Mouse Button left_mouse 'left_mouse'
Scroll scroll 'scroll'
War Mode Flags war_mode_flags 'war_mode_flags'
War Mode Swords war_mode_swords 'war_mode_swords'
Checkmark Blue check_bl 'check_bl'
Checkmark Green check_gn 'check_gn'
Checkmark Gray check_gy 'check_gy'
Checkmark Yellow check_yw 'check_yw'