cards: hiding widgets while showing the code
parent
86729904b8
commit
60a7cbcf5b
|
|
@ -18,9 +18,8 @@ Bangle.drawWidgets();
|
||||||
const WHITE=-1
|
const WHITE=-1
|
||||||
const BLACK=0
|
const BLACK=0
|
||||||
|
|
||||||
var FILE = "android.cards.json";
|
const Locale = require("locale");
|
||||||
|
const widget_utils = require('widget_utils');
|
||||||
var Locale = require("locale");
|
|
||||||
|
|
||||||
var fontSmall = "6x8";
|
var fontSmall = "6x8";
|
||||||
var fontMedium = g.getFonts().includes("6x15")?"6x15":"6x8:2";
|
var fontMedium = g.getFonts().includes("6x15")?"6x15":"6x8:2";
|
||||||
|
|
@ -90,6 +89,7 @@ function printLinearCode(binary) {
|
||||||
}
|
}
|
||||||
|
|
||||||
function showCode(card) {
|
function showCode(card) {
|
||||||
|
widget_utils.hide();
|
||||||
E.showScroller();
|
E.showScroller();
|
||||||
// keeping it on rising edge would come back twice..
|
// keeping it on rising edge would come back twice..
|
||||||
setWatch(()=>showCard(card), BTN, {edge:"falling"});
|
setWatch(()=>showCard(card), BTN, {edge:"falling"});
|
||||||
|
|
@ -151,6 +151,7 @@ function showCard(card) {
|
||||||
var titleColor = g.theme.fg2;
|
var titleColor = g.theme.fg2;
|
||||||
if (card.color)
|
if (card.color)
|
||||||
titleColor = isLight(titleBgColor) ? BLACK : WHITE;
|
titleColor = isLight(titleBgColor) ? BLACK : WHITE;
|
||||||
|
widget_utils.show();
|
||||||
E.showScroller({
|
E.showScroller({
|
||||||
h : g.getFontHeight(), // height of each menu item in pixels
|
h : g.getFontHeight(), // height of each menu item in pixels
|
||||||
c : lines.length, // number of menu items
|
c : lines.length, // number of menu items
|
||||||
|
|
|
||||||
Loading…
Reference in New Issue