Content:MirLua/Examples/menus

From Miranda NG
Jump to: navigation, search

Add restart menu item to main menu local clist = require("m_clist") local icolib = require("m_icolib")

m.CreateServiceFunction("Lua/Restart", function()

 m.CallService("Miranda/System/Restart", 1)

end)

clist.AddMainMenuItem{

 Name = "Restart",
 Service = "Lua/Restart",
 Uid = '9FC57A01-FAC6-41AC-A009-52F1C6594095',
 Icon = icolib.AddIcon('restart', 'Restart')

}