diff options
Diffstat (limited to 'plugins/MirLua/docs/examples/popup.lua')
-rw-r--r-- | plugins/MirLua/docs/examples/popup.lua | 19 |
1 files changed, 19 insertions, 0 deletions
diff --git a/plugins/MirLua/docs/examples/popup.lua b/plugins/MirLua/docs/examples/popup.lua new file mode 100644 index 0000000000..395f650267 --- /dev/null +++ b/plugins/MirLua/docs/examples/popup.lua @@ -0,0 +1,19 @@ +--- include m_popup module +local popup = require('m_popup') +--- include m_genmenu module +local genmenu = require('m_genmenu') + +m.CreateServiceFunction('MirLua/ShowPopup', function() + local popupData = + { + Title = 'Title', + Text = 'Popup content', + hContact = 0, + Flags = 1 + } + popup.AddPopup(popupData) + end) + +m.OnModulesLoaded(function() + genmenu.AddMainMenuItem({ Name = "Show lua popup", Service = 'MirLua/ShowPopup' }) +end) |