DFRobot / DFRobot_GDL

DFRobot_GDL is a comprehensive display interactive framework that combines display, touch, and UI.
MIT License
20 stars 13 forks source link

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

Open Metal-codes opened 3 months ago

Metal-codes commented 3 months ago

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:

Questions:

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

The code fragment responsible for this logic: https://github.com/DFRobot/DFRobot_GDL/blob/8b22fa9b69ffb3e455fc0212300110c06da76ff4/src/DFRobot_UI.cpp#L350-L354