From c29d474a81dc7cfdb73152fa5d8b85c4250150bd Mon Sep 17 00:00:00 2001 From: hughbarney Date: Tue, 26 Apr 2022 23:03:01 +0100 Subject: [PATCH] kbswipe library updated cribsheet to use g.theme.fg --- apps/kbswipe/ChangeLog | 2 +- apps/kbswipe/lib.js | 12 ++++++++---- 2 files changed, 9 insertions(+), 5 deletions(-) diff --git a/apps/kbswipe/ChangeLog b/apps/kbswipe/ChangeLog index 00cda49bc..4af2ea366 100644 --- a/apps/kbswipe/ChangeLog +++ b/apps/kbswipe/ChangeLog @@ -2,4 +2,4 @@ 0.02: Now keeps user input trace intact by changing how the screen is updated. 0.03: Positioning of marker now takes the height of the widget field into account. 0.04: Fix issue if going back without typing. -0.05: updated q gesture +0.05: Gesture cribsheet use g.theme.fg instead of red diff --git a/apps/kbswipe/lib.js b/apps/kbswipe/lib.js index dcadc37ba..0422dea82 100644 --- a/apps/kbswipe/lib.js +++ b/apps/kbswipe/lib.js @@ -21,8 +21,7 @@ exports.getStrokes = function(cb) { cb("n", new Uint8Array([50, 165, 50, 160, 50, 153, 50, 140, 50, 122, 50, 103, 50, 83, 50, 65, 50, 52, 50, 45, 50, 43, 52, 52, 57, 67, 66, 90, 78, 112, 93, 131, 104, 143, 116, 152, 127, 159, 135, 160, 141, 150, 148, 125, 154, 96, 158, 71, 161, 56, 162, 49])); cb("o", new Uint8Array([107, 58, 104, 58, 97, 61, 87, 68, 75, 77, 65, 88, 58, 103, 54, 116, 53, 126, 55, 135, 61, 143, 75, 149, 91, 150, 106, 148, 119, 141, 137, 125, 143, 115, 146, 104, 146, 89, 142, 78, 130, 70, 116, 65, 104, 62])); cb("p", new Uint8Array([52, 59, 52, 64, 54, 73, 58, 88, 61, 104, 65, 119, 67, 130, 69, 138, 71, 145, 71, 147, 71, 148, 71, 143, 70, 133, 68, 120, 67, 108, 67, 97, 67, 89, 68, 79, 72, 67, 83, 60, 99, 58, 118, 58, 136, 63, 146, 70, 148, 77, 145, 84, 136, 91, 121, 95, 106, 97, 93, 97, 82, 97])); - cb("q", new Uint8Array([127, 77, 127, 72, 126, 68, 118, 63, 104, 62, 85, 64, 71, 75, 66, 88, 67, 100, 84, 114, 116, 117, 135, 114, 135, 101, 115, 84, 91, 73, 78, 69, 79, 69, 100, 69])); -// cb("q", new Uint8Array([95, 59, 93, 59, 88, 59, 79, 59, 68, 61, 57, 67, 50, 77, 48, 89, 48, 103, 50, 117, 55, 130, 65, 140, 76, 145, 85, 146, 94, 144, 101, 140, 105, 136, 106, 127, 106, 113, 100, 98, 92, 86, 86, 79, 84, 75, 84, 72, 91, 69, 106, 67, 126, 67, 144, 67, 158, 67, 168, 67, 173, 67, 177, 67])); + cb("q", new Uint8Array([95, 59, 93, 59, 88, 59, 79, 59, 68, 61, 57, 67, 50, 77, 48, 89, 48, 103, 50, 117, 55, 130, 65, 140, 76, 145, 85, 146, 94, 144, 101, 140, 105, 136, 106, 127, 106, 113, 100, 98, 92, 86, 86, 79, 84, 75, 84, 72, 91, 69, 106, 67, 126, 67, 144, 67, 158, 67, 168, 67, 173, 67, 177, 67])); cb("r", new Uint8Array([53, 49, 53, 62, 53, 91, 53, 127, 53, 146, 53, 147, 53, 128, 53, 94, 53, 69, 62, 44, 82, 42, 94, 50, 92, 68, 82, 85, 77, 93, 80, 102, 95, 119, 114, 134, 129, 145, 137, 150])); cb("s", new Uint8Array([159, 72, 157, 70, 155, 68, 151, 66, 145, 63, 134, 60, 121, 58, 108, 56, 96, 55, 83, 55, 73, 55, 64, 56, 57, 60, 52, 65, 49, 71, 49, 76, 50, 81, 55, 87, 71, 94, 94, 100, 116, 104, 131, 108, 141, 114, 145, 124, 142, 135, 124, 146, 97, 153, 70, 157, 52, 158])); cb("t", new Uint8Array([45, 55, 48, 55, 55, 55, 72, 55, 96, 55, 120, 55, 136, 55, 147, 55, 152, 55, 155, 55, 157, 55, 158, 56, 158, 60, 156, 70, 154, 86, 151, 102, 150, 114, 148, 125, 148, 138, 148, 146])); @@ -83,7 +82,12 @@ exports.getStrokes( (id,s) => Bangle.strokes[id] = Unistroke.new(s) ); g.drawString(l.join("\n"),R.x+4,R.y+4); } - // This draws a big image to use in the README + /** + This draws a big image to use in the README file + uncomment and each time the library is loaded it will dump to the IDE + you must be connected to the IDE. + */ + /* (function() { E.defrag(); var b = Graphics.createArrayBuffer(500,420,1,{msb:true}); @@ -98,10 +102,10 @@ exports.getStrokes( (id,s) => Bangle.strokes[id] = Unistroke.new(s) ); }); b.dump(); })() + */ function show() { g.reset(); - //g.clearRect(R).setColor("#f00"); g.clearRect(R).setColor(g.theme.fg); var n=0; exports.getStrokes((id,s) => {