mirror of https://github.com/espruino/BangleApps
Merge branch 'master' into multitimer-fastload
Conflicts: apps/multitimer/ChangeLogpull/2879/head
commit
56d7149932
|
@ -1,5 +1,5 @@
|
|||
<?xml version="1.0"?>
|
||||
<xsl:stylesheet xmlns:xsl="http://www.w3.org/1999/XSL/Transform" xmlns:exslt="http://exslt.org/common" xmlns="http://www.topografix.com/GPX/1/1" xmlns:osmand="https://osmand.net" xmlns:xsi="http://www.w3.org/2001/XMLSchema-instance" xmlns:_="http://www.topografix.com/GPX/1/1" xmlns:DEFAULT="http://www.topografix.com/GPX/1/1" version="1.0" extension-element-prefixes="exslt">
|
||||
<xsl:stylesheet xmlns:xsl="http://www.w3.org/1999/XSL/Transform" xmlns:exslt="http://exslt.org/common" xmlns="http://www.topografix.com/GPX/1/1" xmlns:xsi="http://www.w3.org/2001/XMLSchema-instance" xmlns:_="http://www.topografix.com/GPX/1/1" xmlns:DEFAULT="http://www.topografix.com/GPX/1/1" version="1.0" extension-element-prefixes="exslt">
|
||||
<xsl:output omit-xml-declaration="no" indent="yes"/>
|
||||
|
||||
<xsl:template match="/">
|
||||
|
|
|
@ -15,6 +15,9 @@
|
|||
function handleOnload(readerEvent){
|
||||
var content = readerEvent.target.result;
|
||||
|
||||
// Replace the gpx version 1.0 with 1.1 to allow parsing older gpx files. The nodes referenced by the xsl exist in both versions.
|
||||
content = content.replaceAll("http://www.topografix.com/GPX/1/0", "http://www.topografix.com/GPX/1/1");
|
||||
|
||||
var xsltProcessor = new XSLTProcessor();
|
||||
|
||||
var myXMLHTTPRequest = new XMLHttpRequest();
|
||||
|
|
|
@ -1,3 +1,4 @@
|
|||
0.01: New app!
|
||||
0.02: Submitted to the app loader
|
||||
0.03: Rewrote to use scheduler library
|
||||
0.04: Use theme colors
|
||||
|
|
|
@ -95,7 +95,8 @@ function getFontSize(length) {
|
|||
|
||||
function updateDisplay() {
|
||||
let displayString = inputStringToDisplayString(common.state.inputString);
|
||||
g.clearRect(0, 24, 175, 43).setColor(storage.readJSON('setting.json').theme.fg2).setFontAlign(1, -1).setFont("Vector", getFontSize(displayString.length)).drawString(displayString, 176, 24);
|
||||
let t = storage.readJSON('setting.json').theme;
|
||||
g.setBgColor(t.bg2).clearRect(0, 24, 175, 43).setColor(t.fg2).setFontAlign(1, -1).setFont("Vector", getFontSize(displayString.length)).drawString(displayString, 176, 24);
|
||||
}
|
||||
|
||||
exports.show = function (callerCommon) {
|
||||
|
|
|
@ -1,7 +1,7 @@
|
|||
{
|
||||
"id": "keytimer",
|
||||
"name": "Keypad Timer",
|
||||
"version": "0.03",
|
||||
"version": "0.04",
|
||||
"description": "A timer with a keypad that runs in the background",
|
||||
"icon": "icon.png",
|
||||
"type": "app",
|
||||
|
|
|
@ -7,21 +7,25 @@ const BUTTON_ICONS = {
|
|||
|
||||
let common;
|
||||
|
||||
let s = require("Storage").readJSON("setting.json");
|
||||
|
||||
function drawButtons() {
|
||||
//Draw the backdrop
|
||||
const BAR_TOP = g.getHeight() - 24;
|
||||
g.setColor(0, 0, 1).setFontAlign(0, -1)
|
||||
g.setBgColor(s.theme.bg2).setColor(s.theme.fg2).setFontAlign(0, -1)
|
||||
.clearRect(0, BAR_TOP, g.getWidth(), g.getHeight())
|
||||
.fillRect(0, BAR_TOP, g.getWidth(), g.getHeight())
|
||||
.setColor(1, 1, 1)
|
||||
.setColor(s.theme.fg2)
|
||||
.drawLine(g.getWidth() / 2, BAR_TOP, g.getWidth() / 2, g.getHeight())
|
||||
|
||||
//Draw the buttons
|
||||
.drawImage(BUTTON_ICONS.reset, g.getWidth() / 4, BAR_TOP);
|
||||
.setColor(s.theme.fg2)
|
||||
.drawImage(BUTTON_ICONS.reset, g.getWidth() / 4, BAR_TOP + 12, {rotate:0}); // rotate option centers the image
|
||||
if (common.running()) {
|
||||
g.drawImage(BUTTON_ICONS.pause, g.getWidth() * 3 / 4, BAR_TOP);
|
||||
g.setColor(s.theme.fg2)
|
||||
.drawImage(BUTTON_ICONS.pause, g.getWidth() * 3 / 4, BAR_TOP + 12, {rotate:0});
|
||||
} else {
|
||||
g.drawImage(BUTTON_ICONS.play, g.getWidth() * 3 / 4, BAR_TOP);
|
||||
g.setColor(s.theme.fg2)
|
||||
.drawImage(BUTTON_ICONS.play, g.getWidth() * 3 / 4, BAR_TOP + 12, {rotate:0});
|
||||
}
|
||||
}
|
||||
|
||||
|
|
|
@ -2,4 +2,5 @@
|
|||
0.02: Update for time_utils module
|
||||
0.03: Use default Bangle formatter for booleans
|
||||
0.04: Remove copied sched alarm.js & import newer features (oneshot alarms)
|
||||
0.05: Support fastloading
|
||||
0.05: Fix creating new alarms/timers in hardmode
|
||||
0.06: Support fastloading
|
||||
|
|
|
@ -265,7 +265,6 @@ function editTimer(idx, a) {
|
|||
a.last = 0;
|
||||
a.data.ot = a.timer;
|
||||
a.appid = "multitimer";
|
||||
a.js = "(require('Storage').read('multitimer.alarm.js') !== undefined) ? load('multitimer.alarm.js') : load('sched.js')";
|
||||
if (idx < 0) alarms.push(a);
|
||||
else alarms[timerIdx[idx]] = a;
|
||||
require("sched").setAlarms(alarms);
|
||||
|
|
|
@ -1,7 +1,7 @@
|
|||
{
|
||||
"id": "multitimer",
|
||||
"name": "Multi Timer",
|
||||
"version": "0.05",
|
||||
"version": "0.06",
|
||||
"description": "Set timers and chronographs (stopwatches) and watch them count down in real time. Pause, create, edit, and delete timers and chronos, and add custom labels/messages. Also sets alarms.",
|
||||
"icon": "app.png",
|
||||
"screenshots": [
|
||||
|
|
Loading…
Reference in New Issue