forked from FOSS/BangleApps
Merge branch 'master' of github.com:espruino/BangleApps
commit
735ab75b39
|
@ -27,4 +27,5 @@ widgets would still be loaded when they weren't supposed to.
|
||||||
immediately follows the correct theme.
|
immediately follows the correct theme.
|
||||||
0.22: Bangle 2: Change to not automatically marking the first app on a page
|
0.22: Bangle 2: Change to not automatically marking the first app on a page
|
||||||
when moving pages. Add caching for faster startups.
|
when moving pages. Add caching for faster startups.
|
||||||
|
0.23: Bangle 1: Fix issue with missing icons, added touch screen interactions
|
||||||
|
|
||||||
|
|
|
@ -6,6 +6,10 @@ Bangle 1:
|
||||||
|
|
||||||
In the picture above, the Settings app is selected.
|
In the picture above, the Settings app is selected.
|
||||||
|
|
||||||
|
|
||||||
|

|
||||||
|
|
||||||
|
|
||||||
Bangle 2:
|
Bangle 2:
|
||||||
|
|
||||||

|

|
||||||
|
@ -25,6 +29,12 @@ Bangle 2:
|
||||||
|
|
||||||
**Swipe Right** - move to previous page of app icons
|
**Swipe Right** - move to previous page of app icons
|
||||||
|
|
||||||
|
**Touch Left(1) area** - "Back" to Clock
|
||||||
|
|
||||||
|
**Touch Right(2) area** - move forward through app icons
|
||||||
|
|
||||||
|
**Touch Middle(1+2) area** - run the selected app
|
||||||
|
|
||||||
## Controls- Bangle 2
|
## Controls- Bangle 2
|
||||||
|
|
||||||
**Touch** - icon to select, second touch launches app
|
**Touch** - icon to select, second touch launches app
|
||||||
|
|
|
@ -13,13 +13,13 @@ function wdog(handle,timeout){
|
||||||
wdog.timeout = timeout;
|
wdog.timeout = timeout;
|
||||||
}
|
}
|
||||||
if(wdog.timer){
|
if(wdog.timer){
|
||||||
clearTimeout(wdog.timer)
|
clearTimeout(wdog.timer);
|
||||||
}
|
}
|
||||||
wdog.timer = setTimeout(wdog.handle,wdog.timeout)
|
wdog.timer = setTimeout(wdog.handle,wdog.timeout);
|
||||||
}
|
}
|
||||||
|
|
||||||
// reset after two minutes of inactivity
|
// reset after two minutes of inactivity
|
||||||
wdog(load,120000)
|
wdog(load,120000);
|
||||||
|
|
||||||
var s = require("Storage");
|
var s = require("Storage");
|
||||||
var apps = s.list(/\.info$/).map(app=>{
|
var apps = s.list(/\.info$/).map(app=>{
|
||||||
|
@ -49,7 +49,13 @@ function draw_icon(p,n,selected) {
|
||||||
var y = n>2?130:40;
|
var y = n>2?130:40;
|
||||||
(selected?g.setColor(0.3,0.3,0.3):g.setColor(0,0,0)).fillRect(x,y,x+79,y+89);
|
(selected?g.setColor(0.3,0.3,0.3):g.setColor(0,0,0)).fillRect(x,y,x+79,y+89);
|
||||||
g.setColor(g.theme.fg);
|
g.setColor(g.theme.fg);
|
||||||
|
//bad g.drawImage(s.read(apps[p*6+n].icon),x+10,y+10,{scale:1.25});
|
||||||
|
if ((apps[p*6+n].icon)){
|
||||||
|
if (s.read(apps[p*6+n].icon)) //ensure that graph exist
|
||||||
g.drawImage(s.read(apps[p*6+n].icon),x+10,y+10,{scale:1.25});
|
g.drawImage(s.read(apps[p*6+n].icon),x+10,y+10,{scale:1.25});
|
||||||
|
else console.log("icon file NOT exist :"+apps[p*6+n].icon);
|
||||||
|
}
|
||||||
|
else console.log("icon property NOT exist");
|
||||||
g.setColor(-1).setFontAlign(0,-1,0).setFont("6x8",1);
|
g.setColor(-1).setFontAlign(0,-1,0).setFont("6x8",1);
|
||||||
var txt = apps[p*6+n].name.split(" ");
|
var txt = apps[p*6+n].name.split(" ");
|
||||||
for (var i = 0; i < txt.length; i++) {
|
for (var i = 0; i < txt.length; i++) {
|
||||||
|
@ -67,8 +73,29 @@ function drawPage(p){
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
|
|
||||||
|
// case was not working
|
||||||
|
Bangle.on("touch", function(tzone){
|
||||||
|
//(tzone)=>{
|
||||||
|
//console.log("tzone"+tzone);
|
||||||
|
switch(tzone){
|
||||||
|
case 1: //left managed by
|
||||||
|
console.log("1, left or back to clock?");
|
||||||
|
load();//clock
|
||||||
|
//nextapp(-1);
|
||||||
|
break;
|
||||||
|
case 2: // right
|
||||||
|
nextapp(1);
|
||||||
|
break;
|
||||||
|
case 3: //center 1+2 no for emul
|
||||||
|
doselect();
|
||||||
|
break;
|
||||||
|
default:
|
||||||
|
console.log("no match");
|
||||||
|
}
|
||||||
|
});
|
||||||
|
|
||||||
Bangle.on("swipe",(dir)=>{
|
Bangle.on("swipe",(dir)=>{
|
||||||
wdog()
|
wdog();
|
||||||
selected = 0;
|
selected = 0;
|
||||||
oldselected=-1;
|
oldselected=-1;
|
||||||
if (dir<0){
|
if (dir<0){
|
||||||
|
|
|
@ -1,7 +1,7 @@
|
||||||
{
|
{
|
||||||
"id": "dtlaunch",
|
"id": "dtlaunch",
|
||||||
"name": "Desktop Launcher",
|
"name": "Desktop Launcher",
|
||||||
"version": "0.22",
|
"version": "0.23",
|
||||||
"description": "Desktop style App Launcher with six (four for Bangle 2) apps per page - fast access if you have lots of apps installed.",
|
"description": "Desktop style App Launcher with six (four for Bangle 2) apps per page - fast access if you have lots of apps installed.",
|
||||||
"screenshots": [{"url":"shot1.png"},{"url":"shot2.png"},{"url":"shot3.png"}],
|
"screenshots": [{"url":"shot1.png"},{"url":"shot2.png"},{"url":"shot3.png"}],
|
||||||
"icon": "icon.png",
|
"icon": "icon.png",
|
||||||
|
|
Binary file not shown.
After Width: | Height: | Size: 5.0 KiB |
|
@ -1,2 +1,3 @@
|
||||||
0.01: 1st version !
|
0.01: 1st version !
|
||||||
0.02: Supports bottom widgets and UI based in UI4swatch!
|
0.02: Supports bottom widgets and UI based in UI4swatch!
|
||||||
|
0.03: Added compatibility with BJS2, improvements
|
||||||
|
|
|
@ -3,7 +3,6 @@
|
||||||
A cross cultural hello world!/hola mundo! app
|
A cross cultural hello world!/hola mundo! app
|
||||||
The most common testing sentence in several languages ;)
|
The most common testing sentence in several languages ;)
|
||||||
|
|
||||||
|
|
||||||
## Pictures:
|
## Pictures:
|
||||||
|
|
||||||
Launcher icon
|
Launcher icon
|
||||||
|
@ -14,6 +13,10 @@ Screen - Spanish
|
||||||
|
|
||||||

|

|
||||||
|
|
||||||
|
Screenshot BJS2 emul
|
||||||
|
|
||||||
|

|
||||||
|
|
||||||
Screen - English
|
Screen - English
|
||||||
|
|
||||||

|

|
||||||
|
@ -22,6 +25,10 @@ Screen - Japanese
|
||||||
|
|
||||||

|

|
||||||
|
|
||||||
|
Screenshot BJS1 emul
|
||||||
|
|
||||||
|

|
||||||
|
|
||||||
|
|
||||||
|
|
||||||
## Usage
|
## Usage
|
||||||
|
@ -31,17 +38,32 @@ interact to change language, color or quit.
|
||||||
|
|
||||||
## Features
|
## Features
|
||||||
|
|
||||||
Colours, all inputs , graph, widgets loaded
|
- Compatible Bangle.js1 Bangle.js2
|
||||||
Counter for Times Display
|
- Bottom Widget compatible
|
||||||
|
- Change FG/BG colors,
|
||||||
|
- Usage of many input events
|
||||||
|
|
||||||
|
|
||||||
## Controls
|
## Pending/future Features
|
||||||
|
- replace UI hardcoded colors for dynamic based on theme
|
||||||
|
- BJS2 change BTN1 from quit to Change FG Color (conflict wit setUI?)
|
||||||
|
|
||||||
finger swipe
|
|
||||||
button 1,2 and 3
|
## Controls/UI
|
||||||
touch screen left, center or right
|
- Left area: Back/Exit/launcher
|
||||||
|
- BTN3 (long press)(BJS1): default Exit/kill app
|
||||||
|
|
||||||
|
- BTN1 (BJS2): Back/Exit/launcher
|
||||||
|
- BTN1 (BJS1): Change Language
|
||||||
|
- BTN2 (BJS1): Change FG Color
|
||||||
|
- BTN3 (BJS1): Quit
|
||||||
|
|
||||||
|
- Right area: Change BG Color
|
||||||
|
- Swipe left: Change Language
|
||||||
|
- Swipe right: Change Language
|
||||||
|
|
||||||
|
|
||||||
## Creator
|
## Creator
|
||||||
|
|
||||||
Daniel Perez
|
This app is so basic that probably the easiest is to just edit the code
|
||||||
|
Otherwise you can contact me [here](https://github.com/dapgo/my_espruino_smartwatch_things)
|
|
@ -1,40 +1,62 @@
|
||||||
//HolaMundo v202103
|
//HolaMundo v202212
|
||||||
// place your const, vars, functions or classes here
|
// place your const, vars, functions or classes here
|
||||||
{
|
{
|
||||||
var contador=1;
|
var contador=1;
|
||||||
var v_color_statictxt='#e56e06';
|
var v_mode_debug=0;
|
||||||
var v_color_b_area='#111111'; //orange RGB format rrggbb //white,Orange,DarkGreen,Yellow,Maroon,Blue,green,Purple,cyan,olive,DarkCyan,pink
|
var v_model=process.env.BOARD;
|
||||||
|
|
||||||
|
var v_color_statictxt='#b30000';
|
||||||
|
//var v_color_b_area='#111111';
|
||||||
|
//orange RGB format rrggbb //white,Orange,DarkGreen,Yellow,Maroon,Blue,green,Purple,cyan,olive,DarkCyan,pink
|
||||||
var a_colors= Array(0xFFFF,0xFD20,0x03E0,0xFFE0,0x7800,0x001F,0x07E0,0x780F,0x07FF,0x7BE0,0x03EF,0xF81F);
|
var a_colors= Array(0xFFFF,0xFD20,0x03E0,0xFFE0,0x7800,0x001F,0x07E0,0x780F,0x07FF,0x7BE0,0x03EF,0xF81F);
|
||||||
|
|
||||||
|
var x_max_screen=g.getWidth();
|
||||||
|
var y_max_screen=g.getHeight();
|
||||||
|
var y_wg_bottom=g.getHeight()-25;
|
||||||
|
var y_wg_top=25;
|
||||||
|
|
||||||
|
//EMSCRIPTEN,EMSCRIPTEN2
|
||||||
|
if (v_model=='BANGLEJS'||v_model=='EMSCRIPTEN') {
|
||||||
var v_color_lines=0xFFFF; //White hex format
|
var v_color_lines=0xFFFF; //White hex format
|
||||||
//new
|
|
||||||
var v_color_text=0x07E0;
|
var v_color_text=0x07E0;
|
||||||
var v_font1size=10; //out of quotes
|
var v_font1size=10; //out of quotes
|
||||||
var v_font2size=12;
|
var v_font2size=12;
|
||||||
var v_font_banner_size=30;
|
var v_font_banner_size=30;
|
||||||
var v_font3size=12;
|
var v_font3size=12;
|
||||||
var v_arraypos=0;
|
|
||||||
var v_acolorpos=0;
|
|
||||||
var a_string1 = Array('hola', 'hello', 'saluton', 'ola','ciao', 'salut','czesc','konnichiwa');
|
|
||||||
var a_string2 = Array('mundo!', 'world!', 'mondo!','mundo!','mondo!','monde!','swiat!','sekai!');
|
|
||||||
var mem=process.memory();
|
|
||||||
var v_model=process.env.BOARD;
|
|
||||||
console.log("device="+v_model);
|
|
||||||
|
|
||||||
var x_max_screen=g.getWidth();//240;
|
|
||||||
var y_max_screen=g.getHeight(); //240;
|
|
||||||
var y_wg_bottom=g.getHeight()-25;
|
|
||||||
var y_wg_top=25;
|
|
||||||
if (v_model=='BANGLEJS') {
|
|
||||||
var x_btn_area=215;
|
var x_btn_area=215;
|
||||||
var x_max_usable_area=x_btn_area;//Pend! only for bangle.js
|
var x_max_usable_area=x_btn_area;//Pend! only for bangle.js
|
||||||
var y_btn2=124; //harcoded for bangle.js cuz it is not the half of display height
|
var y_btn2=124; //harcoded for bangle.js cuz it is not the half of display height
|
||||||
} else x_max_usable_area=240;
|
var graph_y=120;
|
||||||
|
var box_x2=195;
|
||||||
|
var box_y2=150;
|
||||||
|
}else{ //BJS2
|
||||||
|
//176x176
|
||||||
|
var v_color_lines="#000"; //White hex format
|
||||||
|
var v_color_text="#000";
|
||||||
|
var v_font1size=9; //out of quotes
|
||||||
|
var v_font2size=9;
|
||||||
|
var v_font_banner_size=16;
|
||||||
|
var v_font3size=8;
|
||||||
|
//g.setColor("#000"); //black or dark
|
||||||
|
x_max_usable_area=176;
|
||||||
|
var graph_y=60;
|
||||||
|
var box_x2=128;
|
||||||
|
var box_y2=104;
|
||||||
}
|
}
|
||||||
|
if (v_mode_debug>0) console.log("device="+v_model);
|
||||||
|
var v_arraypos=0;
|
||||||
|
var v_acolorpos=0; //for fg
|
||||||
|
var v_aBGcolorPos=5; //for bg
|
||||||
|
var a_string1 = Array('hola', 'hello', 'saluton', 'ola','ciao', 'salut','czesc','konnichiwa');
|
||||||
|
var a_string2 = Array('mundo!', 'world!', 'mondo!','mundo!','mondo!','monde!','swiat!','sekai!');
|
||||||
|
|
||||||
|
|
||||||
|
}
|
||||||
|
if (v_mode_debug>0) {
|
||||||
console.log("*** UI dimensions***");
|
console.log("*** UI dimensions***");
|
||||||
console.log("x="+x_max_screen);
|
console.log("x="+x_max_screen);
|
||||||
console.log("y_wg_bottom="+y_wg_bottom);
|
console.log("y_wg_bottom="+y_wg_bottom);
|
||||||
|
}
|
||||||
|
|
||||||
// special function to handle display switch on
|
// special function to handle display switch on
|
||||||
Bangle.on('lcdPower', (on) => {
|
Bangle.on('lcdPower', (on) => {
|
||||||
|
@ -48,9 +70,8 @@
|
||||||
|
|
||||||
//Clear/fill dynamic area except widget area, right and bottom status line
|
//Clear/fill dynamic area except widget area, right and bottom status line
|
||||||
function ClearActiveArea(){
|
function ClearActiveArea(){
|
||||||
g.setColor(v_color_b_area);
|
g.setColor(a_colors[v_aBGcolorPos]); //dynamic color
|
||||||
//harcoded values to avoid clearing areas
|
g.fillRect(0,y_wg_top,box_x2,box_y2);
|
||||||
g.fillRect(0,y_wg_top,195,150);
|
|
||||||
g.flip();
|
g.flip();
|
||||||
}
|
}
|
||||||
|
|
||||||
|
@ -58,7 +79,6 @@
|
||||||
g.setFontVector(v_font1size);
|
g.setFontVector(v_font1size);
|
||||||
g.setColor(v_color_lines);//White
|
g.setColor(v_color_lines);//White
|
||||||
|
|
||||||
|
|
||||||
g.drawString("Lang", x_max_screen-g.stringWidth("Lang"),y_wg_top+v_font1size+1);
|
g.drawString("Lang", x_max_screen-g.stringWidth("Lang"),y_wg_top+v_font1size+1);
|
||||||
//above Btn2
|
//above Btn2
|
||||||
//g.setFontVector(v_font1size).drawString("Off", x_max_screen-g.stringWidth("Off"),y_btn2-(2*v_font1size));
|
//g.setFontVector(v_font1size).drawString("Off", x_max_screen-g.stringWidth("Off"),y_btn2-(2*v_font1size));
|
||||||
|
@ -93,7 +113,7 @@ function DrawBottomInfoBanner(){
|
||||||
function PrintHelloWorld(){
|
function PrintHelloWorld(){
|
||||||
ClearActiveArea(); //except widgets and bottom
|
ClearActiveArea(); //except widgets and bottom
|
||||||
|
|
||||||
console.log("drawing a "+a_string1[v_arraypos]+" "+a_string2[v_arraypos]);
|
if (v_mode_debug>0) console.log("drawing a "+a_string1[v_arraypos]+" "+a_string2[v_arraypos]);
|
||||||
|
|
||||||
g.setColor(a_colors[v_acolorpos]); //dynamic color
|
g.setColor(a_colors[v_acolorpos]); //dynamic color
|
||||||
g.setFont("Vector",v_font_banner_size);
|
g.setFont("Vector",v_font_banner_size);
|
||||||
|
@ -107,54 +127,61 @@ function DrawBottomInfoBanner(){
|
||||||
g.flip();
|
g.flip();
|
||||||
|
|
||||||
g.setFont("Vector",v_font3size);
|
g.setFont("Vector",v_font3size);
|
||||||
g.setColor(0,0,1); //blue
|
g.setColor(v_color_statictxt);
|
||||||
g.drawString("Display count: "+contador ,10,115);
|
g.drawString("Display on/off: "+contador ,10,box_y2+7);
|
||||||
mem=process.memory();
|
//var mem=process.memory();
|
||||||
//console.log("Mem free/total: "+mem.free+"/"+mem.total);
|
//if (v_mode_debug>0) console.log("Mem free/total: "+mem.free+"/"+mem.total);
|
||||||
g.drawString("Free mem: "+mem.free+"/"+mem.total,10,135);
|
|
||||||
g.flip();
|
g.flip();
|
||||||
}
|
}
|
||||||
|
|
||||||
function PrintMainStaticArea(){
|
function PrintMainStaticArea(){
|
||||||
g.setColor(v_color_statictxt);
|
g.setColor(v_color_statictxt);
|
||||||
g.setFont("Vector",v_font3size);
|
g.setFont("Vector",v_font3size);
|
||||||
g.drawString("#by DPG #bangle.js",10,170);
|
g.drawString("#by DPG #bangle.js",10,box_y2+5+(v_font3size*2));
|
||||||
g.drawString("#javascript #espruino",10,185);
|
g.drawString("#javascript #espruino",10,box_y2+5+(v_font3size*3));
|
||||||
|
|
||||||
var img_obj_RedHi = {
|
var img_obj_RedHi = {
|
||||||
width : 40, height : 40, bpp : 4,
|
width : 40, height : 40, bpp : 4,
|
||||||
transparent : 0,
|
transparent : 0,
|
||||||
buffer : require("heatshrink").decompress(atob("AFkM7vd4EAhoTNhvQhvcgHdAQIAL5oWCFIPdExo+CEoIZCABI0DhvADIZhJL4IXDHRkMEAQmOCYgmOAAIOBHwImNRQgmPHgYmCUIIXMJobfB3jgCWZJNDEga1JYQQQCMYZoJJAJNDBwgTICQPdCY7lDRQx4DVIwTIHYZzEHZATFBwblDCZRKEO5ITFWAbIJCYrHBAAImICYwEB5raKCYwAMCYXc5gADE5hLDAAgTIBJLkBBJAyKHw5hKBRJJKKJSuII5Q0IhqPKCbjRKCc4AgA=="))
|
buffer : require("heatshrink").decompress(atob("AFkM7vd4EAhoTNhvQhvcgHdAQIAL5oWCFIPdExo+CEoIZCABI0DhvADIZhJL4IXDHRkMEAQmOCYgmOAAIOBHwImNRQgmPHgYmCUIIXMJobfB3jgCWZJNDEga1JYQQQCMYZoJJAJNDBwgTICQPdCY7lDRQx4DVIwTIHYZzEHZATFBwblDCZRKEO5ITFWAbIJCYrHBAAImICYwEB5raKCYwAMCYXc5gADE5hLDAAgTIBJLkBBJAyKHw5hKBRJJKKJSuII5Q0IhqPKCbjRKCc4AgA=="))
|
||||||
}
|
}
|
||||||
g.drawImage(img_obj_RedHi,155,160);
|
g.drawImage(img_obj_RedHi,box_x2+2,graph_y);
|
||||||
g.flip();
|
g.flip();
|
||||||
}
|
}
|
||||||
|
|
||||||
|
|
||||||
//inc var postion for text array
|
//inc var postion for text array
|
||||||
function ChangeLang(){
|
function ChangeLang(dir){
|
||||||
if (v_arraypos<a_string1.length-1) v_arraypos++;
|
if (v_mode_debug>0) console.log("ChangeLang, dir, Prev pos: "+dir+" , "+v_arraypos);
|
||||||
else v_arraypos=0;
|
|
||||||
//console.log("ChangeLang, Langpos: "+v_arraypos);
|
if ((dir==1) && (v_arraypos<a_string1.length-1)) v_arraypos++;
|
||||||
|
else if ((dir== 1) && (v_arraypos==a_string1.length-1)) v_arraypos=0;
|
||||||
|
else if ((dir== -1) && (v_arraypos>0)) v_arraypos--;
|
||||||
|
else if ((dir== -1) && (v_arraypos==0)) v_arraypos=a_string1.length-1;
|
||||||
PrintHelloWorld();
|
PrintHelloWorld();
|
||||||
}
|
}
|
||||||
|
|
||||||
//inc var postion for color array
|
//inc var postion for color array
|
||||||
function ChangeColor(){
|
function ChangeColor(){
|
||||||
//console.log("ChangeColor, colpos: "+v_acolorpos);
|
//if (v_mode_debug>0) console.log("ChangeColor, colpos: "+v_acolorpos);
|
||||||
if (v_acolorpos<a_colors.length-2) v_acolorpos++;
|
if (v_acolorpos<a_colors.length-2) v_acolorpos++;
|
||||||
else v_acolorpos=0;
|
else v_acolorpos=0;
|
||||||
PrintHelloWorld();
|
PrintHelloWorld();
|
||||||
}
|
}
|
||||||
|
function ChangeBGColor(){
|
||||||
|
if (v_aBGcolorPos<a_colors.length-2) v_aBGcolorPos++;
|
||||||
|
else v_aBGcolorPos=0;
|
||||||
|
ClearActiveArea(); //except widgets and bottom
|
||||||
|
PrintHelloWorld();
|
||||||
|
}
|
||||||
function UserInput(){
|
function UserInput(){
|
||||||
Bangle.on('touch', function(button){
|
Bangle.on('touch', function(button){
|
||||||
switch(button){
|
switch(button){
|
||||||
case 1:
|
case 1:
|
||||||
ChangeLang();//left
|
ChangeLang();//left area
|
||||||
break;
|
break;
|
||||||
case 2:
|
case 2:
|
||||||
ChangeColor();//right
|
ChangeBGColor();//right
|
||||||
break;
|
break;
|
||||||
case 3:
|
case 3:
|
||||||
ChangeColor();
|
ChangeColor();
|
||||||
|
@ -163,22 +190,28 @@ function DrawBottomInfoBanner(){
|
||||||
}
|
}
|
||||||
});
|
});
|
||||||
|
|
||||||
|
if (v_model=='BANGLEJS'||v_model=='EMSCRIPTEN') {
|
||||||
setWatch(ChangeLang, BTN1, { repeat: true });//func to quit
|
setWatch(ChangeLang, BTN1, { repeat: true });//func to quit
|
||||||
setWatch(ChangeColor, BTN2, { repeat: true });
|
setWatch(ChangeColor, BTN2, { repeat: true });
|
||||||
setWatch(Bangle.showLauncher, BTN3, { repeat: true });
|
setWatch(Bangle.showLauncher, BTN3, { repeat: true });
|
||||||
//touchscreen to quit
|
} //touchscreen to quit
|
||||||
|
else setWatch(ChangeColor, BTN1, { repeat: true });//func to quit
|
||||||
Bangle.on('swipe', dir => {
|
Bangle.on('swipe', dir => {
|
||||||
if(dir == 1) ChangeLang(); //func load() to quit
|
if(dir == 1) ChangeLang(1); //right
|
||||||
else ChangeLang();
|
else ChangeLang(-1); //left
|
||||||
});
|
});
|
||||||
}
|
}
|
||||||
|
|
||||||
console.log("**************************");
|
if (v_mode_debug>0) console.log("**************************");
|
||||||
console.log("Log: *** hola mundo app");
|
if (v_mode_debug>0) console.log("Log: *** hola mundo app");
|
||||||
g.clear();
|
g.clear();
|
||||||
Bangle.loadWidgets();
|
Bangle.loadWidgets();
|
||||||
Bangle.drawWidgets();
|
Bangle.drawWidgets();
|
||||||
if (v_model=='BANGLEJS') DrawBangleButtons();
|
Bangle.setUI({
|
||||||
|
mode : "custom",
|
||||||
|
back : function() {load();}
|
||||||
|
});
|
||||||
|
if (v_model=='BANGLEJS'||v_model=='EMSCRIPTEN') DrawBangleButtons();
|
||||||
DrawBottomInfoBanner();
|
DrawBottomInfoBanner();
|
||||||
UserInput();
|
UserInput();
|
||||||
PrintMainStaticArea();
|
PrintMainStaticArea();
|
|
@ -2,14 +2,15 @@
|
||||||
"id": "helloworld",
|
"id": "helloworld",
|
||||||
"name": "hello, world!",
|
"name": "hello, world!",
|
||||||
"shortName": "hello world",
|
"shortName": "hello world",
|
||||||
"version": "0.02",
|
"version": "0.03",
|
||||||
"description": "A cross cultural hello world!/hola mundo! app with colors and languages",
|
"description": "A cross cultural hello world!/hola mundo! app with colors and languages",
|
||||||
"icon": "app.png",
|
"icon": "app.png",
|
||||||
"tags": "input,interface,buttons,touch",
|
"tags": "input,interface,buttons,touch",
|
||||||
"supports": ["BANGLEJS"],
|
"screenshots": [{"url":"screenshot.png"}],
|
||||||
|
"supports": ["BANGLEJS","BANGLEJS2"],
|
||||||
"readme": "README.md",
|
"readme": "README.md",
|
||||||
"storage": [
|
"storage": [
|
||||||
{"name":"helloworld.app.js","url":"app.js"},
|
{"name":"helloworld.app.js","url":"helloworld.app.js"},
|
||||||
{"name":"helloworld.img","url":"app-icon.js","evaluate":true}
|
{"name":"helloworld.img","url":"app-icon.js","evaluate":true}
|
||||||
]
|
]
|
||||||
}
|
}
|
||||||
|
|
Binary file not shown.
After Width: | Height: | Size: 5.1 KiB |
Binary file not shown.
After Width: | Height: | Size: 5.1 KiB |
Binary file not shown.
After Width: | Height: | Size: 3.3 KiB |
Loading…
Reference in New Issue