clock_info: call focus() after redraw
parent
2c92c94574
commit
33088c6257
|
|
@ -292,13 +292,17 @@ exports.addInteractive = function(menu, options) {
|
||||||
if (itm.blur) itm.blur(options);
|
if (itm.blur) itm.blur(options);
|
||||||
};
|
};
|
||||||
const focus = (redraw) => {
|
const focus = (redraw) => {
|
||||||
|
let shown = false;
|
||||||
if (!options.focus) {
|
if (!options.focus) {
|
||||||
options.focus=true;
|
options.focus=true;
|
||||||
Bangle.CLKINFO_FOCUS=true;
|
Bangle.CLKINFO_FOCUS=true;
|
||||||
|
shown = true;
|
||||||
|
}
|
||||||
|
if (redraw) options.redraw();
|
||||||
|
if (shown) {
|
||||||
const itm = menu[options.menuA].items[options.menuB];
|
const itm = menu[options.menuA].items[options.menuB];
|
||||||
if (itm.focus) itm.focus(options);
|
if (itm.focus) itm.focus(options);
|
||||||
}
|
}
|
||||||
if (redraw) options.redraw();
|
|
||||||
};
|
};
|
||||||
let touchHandler, lockHandler;
|
let touchHandler, lockHandler;
|
||||||
if (options.x!==undefined && options.y!==undefined && options.w && options.h) {
|
if (options.x!==undefined && options.y!==undefined && options.w && options.h) {
|
||||||
|
|
|
||||||
Loading…
Reference in New Issue