mirror of https://github.com/koreader/koreader
small changes to menu and addition of a reader menu
the reader menu is still very bare-bone, I plan to enhance it now.pull/2/merge
parent
5b4ce0af82
commit
4d3e6af106
@ -0,0 +1,24 @@
|
|||||||
|
ReaderMenu = InputContainer:new{
|
||||||
|
key_events = {
|
||||||
|
ShowMenu = { { "Menu" }, doc = "show menu" },
|
||||||
|
},
|
||||||
|
}
|
||||||
|
|
||||||
|
function ReaderMenu:onShowMenu()
|
||||||
|
local item_table = {}
|
||||||
|
|
||||||
|
table.insert(item_table, {
|
||||||
|
text = "Return to file browser"
|
||||||
|
})
|
||||||
|
|
||||||
|
local main_menu = Menu:new{
|
||||||
|
title = "Document menu",
|
||||||
|
item_table = item_table,
|
||||||
|
width = 300,
|
||||||
|
height = #item_table + 3 * 28
|
||||||
|
}
|
||||||
|
|
||||||
|
UIManager:show(main_menu)
|
||||||
|
|
||||||
|
return true
|
||||||
|
end
|
Loading…
Reference in New Issue