View Single Post
Old 10-14-2015, 04:14 AM   #8
brucelee
Addict
brucelee can program the VCR without an owner's manual.brucelee can program the VCR without an owner's manual.brucelee can program the VCR without an owner's manual.brucelee can program the VCR without an owner's manual.brucelee can program the VCR without an owner's manual.brucelee can program the VCR without an owner's manual.brucelee can program the VCR without an owner's manual.brucelee can program the VCR without an owner's manual.brucelee can program the VCR without an owner's manual.brucelee can program the VCR without an owner's manual.brucelee can program the VCR without an owner's manual.
 
Posts: 352
Karma: 188498
Join Date: Jan 2015
Location: Romania
Device: Kobo Aura One
I had issues with this too. For example, when showing the menu in CR (FW5), the entire display buffer offsets with PanelHeight() pixels.
So I did a dirty workaround for that (being the fact that while the menu is shown, no interaction is allowed with the rest of the app).
I activate the panel without drawing it, take an offset screenshot, redraw the screenshot, draw top & bottom parts of the menu and then update the screen.
If I wouldn't do the screenshot part I'd always get an annoying offset of the page text when toggling menu.
It's not an elegant way of solving things but I was too lazy to go deeper into the problem. )

PHP Code:
virtual void OpenTouchMenu() {

    [...]

    
// Activate system panel
    
CRLog::trace("CRPocketBookQuickMenuWindow::OpenTouchMenu(): Activate system panel");
    
showSystemPanel(false);

    
// Offset the background
    
CRLog::trace("CRPocketBookQuickMenuWindow::OpenTouchMenu(): Offset the background");
    
ibitmap bkg BitmapFromScreen(0PanelHeight(), ScreenWidth(), ScreenHeight()-PanelHeight());
    
DrawBitmap(00bkg);
    
free(bkg);

    [...]

    
// Draw
    
CRLog::trace("CRPocketBookQuickMenuWindow::OpenTouchMenu(): Draw");
    
DrawTop(false);
    
DrawBottom(false, -1, -1);

    
// Update screen
    
CRLog::trace("CRPocketBookQuickMenuWindow::OpenTouchMenu(): PartialUpdate(0, 0, %d);",
        
ScreenWidth(), ScreenHeight());
    
PartialUpdate(00ScreenWidth(), ScreenHeight());

brucelee is offline   Reply With Quote