stopwatch: Update UI
The time used to be yellow while paused. Changing it to white made the paused state less distinct. Blinking the time while paused makes the state distinct again.
This commit is contained in:
parent
81bc16fd92
commit
822f857d9e
3 changed files with 91 additions and 52 deletions
|
|
@ -24,19 +24,24 @@ namespace Pinetime::Applications::Screens {
|
|||
~StopWatch() override;
|
||||
void Refresh() override;
|
||||
|
||||
void playPauseBtnEventHandler(lv_event_t event);
|
||||
void stopLapBtnEventHandler(lv_event_t event);
|
||||
void playPauseBtnEventHandler();
|
||||
void stopLapBtnEventHandler();
|
||||
bool OnButtonPushed() override;
|
||||
|
||||
private:
|
||||
void SetInterfacePaused();
|
||||
void SetInterfaceRunning();
|
||||
void SetInterfaceStopped();
|
||||
|
||||
void Reset();
|
||||
void Start();
|
||||
void Pause();
|
||||
|
||||
private:
|
||||
Pinetime::System::SystemTask& systemTask;
|
||||
States currentState = States::Init;
|
||||
TickType_t startTime;
|
||||
TickType_t oldTimeElapsed = 0;
|
||||
TickType_t blinkTime = 0;
|
||||
static constexpr int maxLapCount = 20;
|
||||
TickType_t laps[maxLapCount + 1];
|
||||
static constexpr int displayedLaps = 2;
|
||||
|
|
|
|||
Loading…
Add table
Add a link
Reference in a new issue