• As the topic: in LCD-Mode 'doublebuffered' the widget bar at the top turns on and off, every time any button is pressed. Why the menu doesn't fill the whole screen? Is there a solution or workaround?

    Minimum example:

    Bangle.setLCDMode("doublebuffered");
    
    Bangle.loadWidgets();
    
    let menu = {
      "": { title: '--- DUMMY ---' },
      "Foo": 'Bar',
      "Exit": function() {
        E.showMenu();
      }
    };
    
    setWatch(function() {
      E.showMenu(menu);
    }, BTN2, { repeat: true, edge: 'rising'});
    
    Bangle.drawWidgets();
    g.clear();
    g.flip();
    E.showMenu(menu);
    
  • Hi - I'm afraid widgets don't work in double-buffered mode, because they're only expecting a single buffer.

    You can hack around it using:

    Bangle.drawWidgets();
    g.flip();
    Bangle.drawWidgets();
    g.flip();
    

    But every time a widget changes after that, you'll get flickering.

    You can use a memory-based buffer with Graphics.createArrayBuffer though, and copy that to the screen when you're done (there are a few examples in BangleApps). The widget bar will then work fine, plus it'll be right at the top of the screen

  • Hello Gordon. For the rest of the application the widgets work very well. They only cause problems when drawing the menus.

  • Post a reply
    • Bold
    • Italics
    • Link
    • Image
    • List
    • Quote
    • code
    • Preview
About

Widget turns on/off with every button press in menu (LCD-Mode 'doublebuffered')

Posted by Avatar for AxelRHD @AxelRHD

Actions