summaryrefslogtreecommitdiff
path: root/plugins/MirLua/docs/examples
diff options
context:
space:
mode:
authorAlexander Lantsev <aunsane@gmail.com>2015-06-17 10:25:19 +0000
committerAlexander Lantsev <aunsane@gmail.com>2015-06-17 10:25:19 +0000
commit43ec2293b69ed3eab4140c7bc49ae5b0d2799a09 (patch)
tree40110d486c4d181c7ebdc355d5c91db6ab28cf57 /plugins/MirLua/docs/examples
parenta28aad9bda9b24df099cc5bf001c4cb4d4740d75 (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')
-rw-r--r--plugins/MirLua/docs/examples/popup.lua19
-rw-r--r--plugins/MirLua/docs/examples/toptoolbar.lua2
2 files changed, 20 insertions, 1 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)
diff --git a/plugins/MirLua/docs/examples/toptoolbar.lua b/plugins/MirLua/docs/examples/toptoolbar.lua
index ea24ec31e1..d942927fd5 100644
--- a/plugins/MirLua/docs/examples/toptoolbar.lua
+++ b/plugins/MirLua/docs/examples/toptoolbar.lua
@@ -3,7 +3,7 @@ local ttb = require('m_toptoolbar')
--- include m_icolib module
local icolib = require('m_icolib')
-local TTBBF_VISIBLE = tonumber("0x0002", 16)
+local TTBBF_VISIBLE = tonumber("0002", 16)
m.OnModulesLoaded(function()
ttb.OnTopToolBarLoaded(function()