diff --git a/apps/widtmr/README.md b/apps/widtmr/README.md index 6820b74d0..9216a7b05 100644 --- a/apps/widtmr/README.md +++ b/apps/widtmr/README.md @@ -6,16 +6,37 @@ 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. + +![](description.png) + + # Lib Different functions are exposed to integrate a timer 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 -WIDGETS["widtmr"].isStarted(); -WIDGETS["widtmr"].reload(); -WIDGETS["widtmr"].getRemainingMinutes(); +WIDGETS["widtmr"].increaseTimer(5); +WIDGETS["widtmr"].setStarted(true); ``` + +Example to decrease the timer. This also disables the timer if time <= 0.: +```Javascript +WIDGETS["widtmr"].decreaseTimer(5); +``` + # Creator [David Peer](https://github.com/peerdavid) diff --git a/apps/widtmr/description.png b/apps/widtmr/description.png new file mode 100644 index 000000000..1286d1ab9 Binary files /dev/null and b/apps/widtmr/description.png differ diff --git a/apps/widtmr/metadata.json b/apps/widtmr/metadata.json index 9645cc00c..a30aea4c3 100644 --- a/apps/widtmr/metadata.json +++ b/apps/widtmr/metadata.json @@ -7,7 +7,7 @@ "icon": "app.png", "tags": "tool,widget", "supports": ["BANGLEJS","BANGLEJS2"], - "screenshots": [{"url":"screenshot.png"}], + "screenshots": [{"url":"screenshot.png"}, {"url": "screenshot_2.png"}], "readme": "README.md", "storage": [ {"name":"widtmr.wid.js","url":"widget.js"}, diff --git a/apps/widtmr/screenshot.png b/apps/widtmr/screenshot.png index f94eece94..eff94475c 100644 Binary files a/apps/widtmr/screenshot.png and b/apps/widtmr/screenshot.png differ diff --git a/apps/widtmr/screenshot_2.png b/apps/widtmr/screenshot_2.png new file mode 100644 index 000000000..7b5dc9a3d Binary files /dev/null and b/apps/widtmr/screenshot_2.png differ