mirror of
https://github.com/darksaid98/overextended.github.io.git
synced 2026-12-01 14:38:50 +00:00
Update context menu info and list menu image
This commit is contained in:
1 parent
2d3347d5d2
commit
bd4e1368c5
2 files changed
+83
-74
No files matched your search
@@ -17,6 +17,7 @@ Registers and caches a menu under the specified id.
|
||||
-- values: table of strings (optional - if provided creates a side scrollable list)
|
||||
-- defaultIndex: number (optional - sets the current index for the list to specified number)
|
||||
-- args: any (optional)
|
||||
-- position: 'top-left' or 'top-right' or 'bottom-left' or 'bottom-right' (optional - default is top-left)
|
||||
-- onClose: function (optional)
|
||||
-- onSelected: function (optional - triggers every time a new button is selected)
|
||||
-- onSideScroll: function (optional - triggers every time a side list is scrolled)
|
||||
@@ -78,6 +79,7 @@ Avoid constantly re-registering a menu that does not depend on any outside value
|
||||
lib.registerMenu({
|
||||
id = 'some_menu_id',
|
||||
title = 'Menu title',
|
||||
position = 'top-right',
|
||||
onSideScroll = function(selected, scrollIndex, args)
|
||||
print(selected, scrollIndex, args)
|
||||
end,
|
||||
@@ -103,3 +105,4 @@ RegisterCommand('testmenu', function()
|
||||
lib.showMenu('some_menu_id')
|
||||
end)
|
||||
```
|
||||

|
||||
Reference in new issue
Block a user