add: status bar in reading menu & font.lua

* Since fontchooser is replaced by selectmenu, it
is no longer needed. So I rewrite it into font.lua
module which can cache faces that shared among all
UIs.

* add progressBar method in graphics.lua to draw
reading progress.

* add reading progress information in reading menu.
It is just a demo. Should be clean up in next release
when the real reading menu is out. :)
This commit is contained in:
Qingping Hou
2012-03-10 16:41:23 +08:00
parent d3c9062c7c
commit f95231d789
8 changed files with 148 additions and 116 deletions

View File

@@ -43,7 +43,8 @@ Screen = {
cur_rotation_mode = 0,
}
-- @ orien: 1 for clockwise rotate, -1 for anti-clockwise
-- @orien: 1 for clockwise rotate, -1 for anti-clockwise
-- Remember to reread screen resolution after this function call
function Screen:screenRotate(orien)
if orien == "clockwise" then
orien = -1
@@ -57,9 +58,6 @@ function Screen:screenRotate(orien)
-- you have to reopen framebuffer after rotate
fb:setOrientation(self.cur_rotation_mode)
fb:close()
--local mode = self.rotation_modes[self.cur_rotation_mode]
--self.cur_rotation_mode = (self.cur_rotation_mode-1 + 1*orien)%4 + 1
--os.execute("lipc-send-event -r 3 com.lab126.hal orientation"..mode)
fb = einkfb.open("/dev/fb0")
end