Add progress bar to endurance view

This commit is contained in:
2024-06-11 22:34:36 +02:00
parent cb2f55be1b
commit f0db650c30
10 changed files with 40 additions and 26 deletions

View File

@ -12,6 +12,7 @@
#include <touchgfx/widgets/BoxWithBorder.hpp>
#include <touchgfx/widgets/TextArea.hpp>
#include <touchgfx/widgets/TextAreaWithWildcard.hpp>
#include <gui/containers/ProgressBar.hpp>
class EnduranceViewBase : public touchgfx::View<EndurancePresenter>
{
@ -69,6 +70,7 @@ protected:
touchgfx::BoxWithBorder lastLapBox;
touchgfx::TextArea textArea1;
touchgfx::TextAreaWithOneWildcard lastLapBat;
ProgressBar progressBar;
private:

View File

@ -115,6 +115,9 @@ EnduranceViewBase::EnduranceViewBase()
lastLapContainer.add(lastLapBat);
add(lastLapContainer);
progressBar.setXY(12, 15);
add(progressBar);
}
EnduranceViewBase::~EnduranceViewBase()
@ -124,7 +127,7 @@ EnduranceViewBase::~EnduranceViewBase()
void EnduranceViewBase::setupScreen()
{
progressBar.initialize();
}
void EnduranceViewBase::handleKeyEvent(uint8_t key)