summaryrefslogtreecommitdiff
path: root/plugins/MirLua/docs/examples/popup.lua
blob: 172b98ea59e0b48921775e353e6086013331bfff (plain)
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
22
23
24
25
26
27
28
--- 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' })