Content:MirLua/Examples/icons: Difference between revisions

From Miranda NG
Jump to navigation Jump to search
No edit summary
(Undo revision 16990 by Wishmaster - category will be placed in the template)
 
Line 23: Line 23:
icolib.RemoveIcon('testRemoved')
icolib.RemoveIcon('testRemoved')
}}
}}
<noinclude>[[Category:Content pages]]</noinclude>

Latest revision as of 19:55, 9 October 2015

--- include m_icolib module
local icolib = require('m_icolib')

--- 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
icolib.AddIcon('testIcon', 'Lua icon', 'MirLua')

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

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

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