Skip to content

Clearing the screen while drawing the first object, e.g. button.  #13

@Metal-codes

Description

@Metal-codes

While creating the menu, I encountered an error where the text created before the button is cleared on the display.

Steps to reproduce:

  1. Add a call to the method ui->drawString(...).
  2. Add a call to the method ui->draw(btn, ...).

Expected Behavior:
The text added before the button should be displayed on the screen.

Actual Behavior:
The text added before the button is cleared from the screen.

System information:

  • FireBeetle 2 ESP32-E (DFR0654-F)
  • Fermion: 3.5” 480x320 TFT LCD (DFR0669)
  • PlatformIO

Questions:

  1. What is the purpose of this code?
  2. This fragment of code is necessary?

The code fragment responsible for this logic:

static uint8_t count = 1;
if(count == 1 ){
_gdl->fillRect(0, 0, lcdWidth, lcdHeight, bgColor);
count ++;
}

Metadata

Metadata

Assignees

No one assigned

    Labels

    No labels
    No labels

    Type

    No type

    Projects

    No projects

    Milestone

    No milestone

    Relationships

    None yet

    Development

    No branches or pull requests

    Issue actions