mirror of
https://github.com/Next-Flip/Momentum-Firmware.git
synced 2026-07-04 22:33:36 -07:00
Merge remote-tracking branch 'OFW/dev' into dev
This commit is contained in:
@@ -12,6 +12,7 @@ let filePicker = require("gui/file_picker");
|
||||
let widget = require("gui/widget");
|
||||
let icon = require("gui/icon");
|
||||
let flipper = require("flipper");
|
||||
let math = require("math");
|
||||
|
||||
// declare clock widget children
|
||||
let cuteDolphinWithWatch = icon.getBuiltin("DolphinWait_59x54");
|
||||
@@ -144,7 +145,7 @@ eventLoop.subscribe(views.stopwatchWidget.button, function (_sub, buttonEvent, g
|
||||
|
||||
// count time
|
||||
eventLoop.subscribe(eventLoop.timer("periodic", 500), function (_sub, _item, views, stopwatchWidgetElements, halfSeconds) {
|
||||
let text = (halfSeconds / 2 / 60).toString();
|
||||
let text = math.floor(halfSeconds / 2 / 60).toString();
|
||||
if (halfSeconds < 10 * 60 * 2)
|
||||
text = "0" + text;
|
||||
|
||||
@@ -152,7 +153,7 @@ eventLoop.subscribe(eventLoop.timer("periodic", 500), function (_sub, _item, vie
|
||||
|
||||
if (((halfSeconds / 2) % 60) < 10)
|
||||
text += "0";
|
||||
text += ((halfSeconds / 2) % 60).toString();
|
||||
text += (math.floor(halfSeconds / 2) % 60).toString();
|
||||
|
||||
stopwatchWidgetElements[0].text = text;
|
||||
views.stopwatchWidget.setChildren(stopwatchWidgetElements);
|
||||
|
||||
Reference in New Issue
Block a user