summaryrefslogtreecommitdiff
path: root/plugins/MirLua/docs/examples/core.lua
blob: 58d3863543b6e65440c3c7ac6d625a3a477b02e2 (plain)
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
-- core module (m) is included by default
-- include m_genmenu module
-- include m_icolib module
local genmenu = require('m_genmenu')
local icolib = require('m_icolib')

-- Add icon for menu items
local hRestartIcon = icolib.AddIcon('testMenuIcon', 'Lua icon for menus')


-- Subscribe to [[Miranda/System/ModulesLoaded]] event
m.OnModulesLoaded(function()
    -- Add menu item to main menu that allow to restart Miranda NG
    genmenu.AddMainMenuItem("Restart", 0, 0, hRestartIcon, "Miranda/System/Restart")
  end)