feat: menu items now accept selectable and align options

Allows creating placeholder items like "Empty" that can't be selected or clicked.
This commit is contained in:
tomasklaen
2023-05-15 11:22:53 +02:00
parent 9c544bf565
commit 128c76c3ba
5 changed files with 43 additions and 16 deletions

View File

@@ -617,7 +617,7 @@ end
function select_current_chapter()
local current_chapter
if state.time and state.chapters then
_, current_chapter = itable_find(state.chapters, function(c) return state.time >= c.time end, true)
_, current_chapter = itable_find(state.chapters, function(c) return state.time >= c.time end, #state.chapters, 1)
end
set_state('current_chapter', current_chapter)
end