From 9e0b695265ca78574fa98bb549a5015237776872 Mon Sep 17 00:00:00 2001 From: nthnn Date: Tue, 12 Sep 2023 22:37:24 +0800 Subject: [PATCH] Fixed progress bar vertical rendition. --- src/planet096_scene.cpp | 6 +++--- 1 file changed, 3 insertions(+), 3 deletions(-) diff --git a/src/planet096_scene.cpp b/src/planet096_scene.cpp index 90e12cc..989e6d2 100644 --- a/src/planet096_scene.cpp +++ b/src/planet096_scene.cpp @@ -408,8 +408,8 @@ void Planet096Scene::renderProgressBarWidget(Planet096ProgressBar* progressBarUI switch(direction) { case PLANET096_PROGRESS_BAR_BOTTOM_TOP: this->display.fillRect( - x, y + (height - progress), - width, progress, + x, y + height - (progress - y), + width, progress - y, PLANET096_WHITE ); break; @@ -417,7 +417,7 @@ void Planet096Scene::renderProgressBarWidget(Planet096ProgressBar* progressBarUI default: this->display.fillRect( x, y, - width, progress, + width, progress - y, PLANET096_WHITE ); break;