menu on k3

pull/599/head
nicolua 10 years ago
parent 6b80314aa7
commit 90d9c3ddb1

@ -142,6 +142,9 @@ function ReaderToc:onShowToc()
end end
UIManager:show(menu_container) UIManager:show(menu_container)
--nicolua
UIManager:show(toc_menu)
return true return true
end end

@ -80,7 +80,7 @@ function FocusManager:onFocusMove(args)
current_item:handleEvent(Event:new("Unfocus")) current_item:handleEvent(Event:new("Unfocus"))
self.layout[self.selected.y][self.selected.x]:handleEvent(Event:new("Focus")) self.layout[self.selected.y][self.selected.x]:handleEvent(Event:new("Focus"))
-- trigger a repaint (we need to be the registered widget!) -- trigger a repaint (we need to be the registered widget!)
UIManager:setDirty(self, "partial") UIManager:setDirty(self.show_parent or self, "partial")
break break
end end
end end

@ -542,8 +542,11 @@ function Menu:updateItems(select_number)
end end
-- FIXME: this is a dirty hack to clear previous menus -- FIXME: this is a dirty hack to clear previous menus
UIManager.repaint_all = true -- UIManager.repaint_all = true
--UIManager:setDirty(self) --UIManager:setDirty(self)
--nicolua
UIManager:setDirty(self.show_parent or self)
end end
function Menu:swithItemTable(new_title, new_item_table) function Menu:swithItemTable(new_title, new_item_table)

Loading…
Cancel
Save