summaryrefslogtreecommitdiff
path: root/plugins/MirLua/docs/examples
diff options
context:
space:
mode:
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()