From 43ec2293b69ed3eab4140c7bc49ae5b0d2799a09 Mon Sep 17 00:00:00 2001 From: Alexander Lantsev Date: Wed, 17 Jun 2015 10:25:19 +0000 Subject: MirLua: added m_popup module git-svn-id: http://svn.miranda-ng.org/main/trunk@14232 1316c22d-e87f-b044-9b9b-93d7a3e3ba9c --- plugins/MirLua/docs/examples/popup.lua | 19 +++++++++++++++++++ 1 file changed, 19 insertions(+) create mode 100644 plugins/MirLua/docs/examples/popup.lua (limited to 'plugins/MirLua/docs/examples/popup.lua') 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) -- cgit v1.2.3