summaryrefslogtreecommitdiff
path: root/plugins/MirLua/docs/examples/icons.lua
blob: 7b9f6dca6c5300e9f68b509b32dacf06f654d224 (plain)
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
22
--- include m_icons module
require('m_icons')

--- Add icon to icoLib
-- @param name The name of icon
-- @param description The description of icon
-- @param section The section in witch icon will be stored (default 'MirLua')
-- @return handle of icon
M.Icons.AddIcon('testIcon', 'Lua icon', 'MirLua')

--- Create the icon which will be deleted below
M.Icons.AddIcon('testRemoved', 'Lua temporary icon')

--- Get icon by name
-- @param name The name of icon
-- @return handle of icon
local hIcon = M.Icons.GetIcon('testRemoved')

--- Remove icon from iconLib
-- @param handle The handle of icon (or name)
-- @return 0 on success
M.Icons.RemoveIcon('testRemoved')