forked from FOSS/BangleApps
Improved documentation
parent
b8215908a6
commit
6cfd764916
|
@ -6,16 +6,37 @@ less interaction. Additionally, it exposes some functions
|
||||||
that can be used by other apps or clocks to easily
|
that can be used by other apps or clocks to easily
|
||||||
implement a timer. It is used e.g. by lcars or notanalog.
|
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.
|
||||||
|
|
||||||
|

|
||||||
|
|
||||||
|
|
||||||
# Lib
|
# Lib
|
||||||
Different functions are exposed to integrate a timer
|
Different functions are exposed to integrate a timer
|
||||||
into your own app.
|
into your own app.
|
||||||
|
|
||||||
Example:
|
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:
|
||||||
```Javascript
|
```Javascript
|
||||||
WIDGETS["widtmr"].isStarted();
|
WIDGETS["widtmr"].increaseTimer(5);
|
||||||
WIDGETS["widtmr"].reload();
|
WIDGETS["widtmr"].setStarted(true);
|
||||||
WIDGETS["widtmr"].getRemainingMinutes();
|
|
||||||
```
|
```
|
||||||
|
|
||||||
|
Example to decrease the timer. This also disables the timer if time <= 0.:
|
||||||
|
```Javascript
|
||||||
|
WIDGETS["widtmr"].decreaseTimer(5);
|
||||||
|
```
|
||||||
|
|
||||||
# Creator
|
# Creator
|
||||||
|
|
||||||
[David Peer](https://github.com/peerdavid)
|
[David Peer](https://github.com/peerdavid)
|
||||||
|
|
Binary file not shown.
After Width: | Height: | Size: 7.6 KiB |
|
@ -7,7 +7,7 @@
|
||||||
"icon": "app.png",
|
"icon": "app.png",
|
||||||
"tags": "tool,widget",
|
"tags": "tool,widget",
|
||||||
"supports": ["BANGLEJS","BANGLEJS2"],
|
"supports": ["BANGLEJS","BANGLEJS2"],
|
||||||
"screenshots": [{"url":"screenshot.png"}],
|
"screenshots": [{"url":"screenshot.png"}, {"url": "screenshot_2.png"}],
|
||||||
"readme": "README.md",
|
"readme": "README.md",
|
||||||
"storage": [
|
"storage": [
|
||||||
{"name":"widtmr.wid.js","url":"widget.js"},
|
{"name":"widtmr.wid.js","url":"widget.js"},
|
||||||
|
|
Binary file not shown.
Before Width: | Height: | Size: 2.9 KiB After Width: | Height: | Size: 1.8 KiB |
Binary file not shown.
After Width: | Height: | Size: 1.9 KiB |
Loading…
Reference in New Issue