diff options
author | Alexander Lantsev <aunsane@gmail.com> | 2015-06-17 10:25:19 +0000 |
---|---|---|
committer | Alexander Lantsev <aunsane@gmail.com> | 2015-06-17 10:25:19 +0000 |
commit | 43ec2293b69ed3eab4140c7bc49ae5b0d2799a09 (patch) | |
tree | 40110d486c4d181c7ebdc355d5c91db6ab28cf57 /plugins/MirLua/docs/examples/popup.lua | |
parent | a28aad9bda9b24df099cc5bf001c4cb4d4740d75 (diff) |
MirLua: added m_popup module
git-svn-id: http://svn.miranda-ng.org/main/trunk@14232 1316c22d-e87f-b044-9b9b-93d7a3e3ba9c
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) |