commit e0373132ea035a64d4bb1ba91594e242c5186a25
Author: Jon Bell <j.to.the.bell@gmail.com>
AuthorDate: Wed Apr 17 06:56:30 2024 -0600
Commit: Jon Bell <j.to.the.bell@gmail.com>
CommitDate: Wed Apr 17 06:56:30 2024 -0600
allow menu items without a callback
---
source/p8GlobalLuaFunctions.h | 5 ++---
1 file changed, 2 insertions(+), 3 deletions(-)
diff --git a/source/p8GlobalLuaFunctions.h b/source/p8GlobalLuaFunctions.h
index ddd0be7..82c69cd 100644
--- a/source/p8GlobalLuaFunctions.h
+++ b/source/p8GlobalLuaFunctions.h
@@ -149,7 +149,6 @@ function menuitem(index, label, callback)
if index < 1 or index > 5 then return end
if not label or not callback then
- label = nil
callback = nil
end
@@ -225,7 +224,7 @@ function __f08_menu_draw()
local itemcount = 0
for i=0, 8, 1 do
item = __f08_menu_items[i]
- if item and item[1] and item[2] then
+ if item and item[1] then
itemcount = itemcount + 1
end
end
@@ -241,7 +240,7 @@ function __f08_menu_draw()
for i=0, 8, 1 do
item = __f08_menu_items[i]
- if item and item[1] and item[2] then
+ if item and item[1] then
print(item[1], itemx, itemy, 7)
--draw selection indicator