1
0
Fork 0

hide widget bar

master
Ian Ward 2024-10-21 19:48:12 +01:00
parent 993873c9a7
commit 77f82b7c1e
1 changed files with 6 additions and 0 deletions

View File

@ -7,6 +7,8 @@ exports.input = function(options) {
let chartX = 0; let chartX = 0;
let chartY = 0; let chartY = 0;
let shouldShowWidgetBar = Bangle.appRect.y > 0;
options = options||{}; options = options||{};
let text = options.text; let text = options.text;
if ('string' != typeof text) text=''; if ('string' != typeof text) text='';
@ -216,6 +218,7 @@ exports.input = function(options) {
}; };
// Draw initial string // Draw initial string
require("widget_utils").hide();
g.setBgColor(g.theme.bg); g.setBgColor(g.theme.bg);
draw(); draw();
@ -237,6 +240,9 @@ exports.input = function(options) {
draw(); draw();
} else { } else {
// Exit and return text on button // Exit and return text on button
if (shouldShowWidgetBar) {
require("widget_utils").show();
}
Bangle.setUI(); Bangle.setUI();
g.clearRect(Bangle.appRect); g.clearRect(Bangle.appRect);
resolve(text); resolve(text);