1
0
Fork 0
BangleApps/apps/widtmr
David Peer 2cc953e2b3 Updated readme 2022-02-25 18:58:35 +01:00
..
ChangeLog Renaming 2022-02-25 17:14:19 +01:00
README.md Updated readme 2022-02-25 18:58:35 +01:00
app-icon.js New icon 2022-02-25 18:23:22 +01:00
app.js Expose timer functions for other apps. Updated notanalog and lcars to use this lib. 2022-02-25 17:55:47 +01:00
app.png Updated icons. 2022-02-25 18:13:01 +01:00
description.png Improved documentation 2022-02-25 18:07:09 +01:00
metadata.json Improved documentation 2022-02-25 18:07:09 +01:00
screenshot.png Improved documentation 2022-02-25 18:07:09 +01:00
screenshot_2.png Improved documentation 2022-02-25 18:07:09 +01:00
widget.js Expose timer functions for other apps. Updated notanalog and lcars to use this lib. 2022-02-25 17:55:47 +01:00

README.md

Timer Widget

This is a fork of the Chrono Widget, but implements a simpler UI which to be able to set a timer faster with less interaction. Additionally, it exposes some functions that can be used by other apps or clocks to easily implement a timer. It is used e.g. by lcars or notanalog.

Overview

If you open the app, you can simply control the timer by clicking on top, bottom, left or right of the screen. If you tab at the middle of the screen, the timer is started / stopped.

Library for other Apps

Different functions are exposed to integrate a timer into your own app.

The following functions are available:

  • isStarted() -> boolean
  • setStarted(boolean) -> void
  • increaseTimer(int) -> void
  • decreaseTimer(int) -> void
  • getRemainingMinutes() -> int

Example to increase the timer by 5 and ensure that its started:

Bangle.loadWidgets();
...
WIDGETS["widtmr"].increaseTimer(5);
WIDGETS["widtmr"].setStarted(true);

Example to decrease the timer. This also disables the timer if time <= 0.:

Bangle.loadWidgets();
...
WIDGETS["widtmr"].decreaseTimer(5);

Creator

David Peer

Thanks to...

Forked from Chrono Widget of Purple-Tentacle

Time icon created by CreativeCons - Flaticon