Skip to content

Commit

Permalink
allow menu items without a callback
Browse files Browse the repository at this point in the history
  • Loading branch information
jtothebell committed Apr 17, 2024
1 parent c6fffb8 commit e037313
Showing 1 changed file with 2 additions and 3 deletions.
5 changes: 2 additions & 3 deletions source/p8GlobalLuaFunctions.h
Original file line number Diff line number Diff line change
Expand Up @@ -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
Expand Down Expand Up @@ -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
Expand All @@ -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
Expand Down

0 comments on commit e037313

Please sign in to comment.