Merge pull request #350 from dpavlin/debug_only_page_indicator

show reneding page_indicator only in debug mode
This commit is contained in:
{Qingping,Dave} Hou
2012-10-02 17:37:02 -07:00
2 changed files with 6 additions and 4 deletions

View File

@@ -100,6 +100,7 @@ function Debug(...)
end
end
print("#"..line)
return true -- debug enabled
end
-- simple serialization function, won't do uservalues, functions, loops

View File

@@ -1048,10 +1048,11 @@ function UniReader:drawOrCache(no, preCache)
-- #4 goal: we render next page, too. (TODO)
local pg_w = G_width / ( self.doc:getPages() )
local page_indicator = function()
fb.bb:invertRect( pg_w*(no-1),0, pg_w,10)
fb:refresh(1, pg_w*(no-1),0, pg_w,10)
Debug('page_indicator',no)
local page_indicator = function()
if Debug('page_indicator',no) then
fb.bb:invertRect( pg_w*(no-1),0, pg_w,10)
fb:refresh(1, pg_w*(no-1),0, pg_w,10)
end
end
page_indicator()