Content:MirLua/Examples/popup: Difference between revisions
Jump to navigation
Jump to search
(MirLua/Examples/popup) |
Wishmaster (talk | contribs) No edit summary |
||
Line 29: | Line 29: | ||
clist.AddMainMenuItem({ Name = "Show lua popup2", Service = 'MirLua/ShowPopup2' }) | clist.AddMainMenuItem({ Name = "Show lua popup2", Service = 'MirLua/ShowPopup2' }) | ||
}} | }} | ||
<noinclude>[[Category:Content pages]]</noinclude> |
Revision as of 14:59, 6 October 2015
--- include m_popup module
local popup = require('m_popup')
--- include m_clist module
local clist = require('m_clist')
m.CreateServiceFunction('MirLua/ShowPopup', function()
local popupData =
{
ContactName = 'Contact',
Text = 'Popup content',
hContact = 0
}
popup.AddPopup(popupData)
end)
m.CreateServiceFunction('MirLua/ShowPopup2', function()
local popupData =
{
Title = 'Title',
Text = 'Popup content',
hContact = 0,
Flags = 1
}
popup.AddPopup2(popupData)
end)
clist.AddMainMenuItem({ Name = "Show lua popup", Service = 'MirLua/ShowPopup' })
clist.AddMainMenuItem({ Name = "Show lua popup2", Service = 'MirLua/ShowPopup2' })