forked from espruino/BangleApps
-
Notifications
You must be signed in to change notification settings - Fork 0
Commit
This commit does not belong to any branch on this repository, and may belong to a fork outside of the repository.
Layout module now allows 'soft' buttons to be cycled through and sele…
…cted using up/down on Bangle.js 1
- Loading branch information
1 parent
2cfc3ca
commit 3f26b8b
Showing
22 changed files
with
126 additions
and
34 deletions.
There are no files selected for viewing
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Binary file not shown.
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,9 @@ | ||
var BTN2 = 1, BTN3=2; | ||
process.env = process.env;process.env.HWVERSION=1; | ||
g = Graphics.createArrayBuffer(240,240,4); | ||
|
||
var layout = new Layout({ type: "v", c: [ | ||
{type:"txt", font:"6x8", label:"A test"}, | ||
]},{btns:[ // Buttons... | ||
{label:"STOP", cb:()=>{}}, | ||
]}); |
Binary file not shown.
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,6 @@ | ||
|
||
var layout = new Layout({ type: "v", c: [ | ||
{type:"txt", font:"6x8", label:"A test"}, | ||
]},{btns:[ // Buttons... | ||
{label:"STOP", cb:()=>{}}, | ||
]}); |
Binary file not shown.
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,11 @@ | ||
var BTN2 = 1, BTN3=2; | ||
process.env = process.env;process.env.HWVERSION=1; | ||
g = Graphics.createArrayBuffer(240,240,4); | ||
|
||
var layout = new Layout({ type: "v", c: [ | ||
{type:"txt", font:"6x8", label:"A test"}, | ||
]},{btns:[ // Buttons... | ||
{label:"A", cb:()=>{}}, | ||
{label:"STOP", cb:()=>{}}, | ||
{label:"B", cb:()=>{}}, | ||
]}); |
Binary file not shown.
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,8 @@ | ||
|
||
var layout = new Layout({ type: "v", c: [ | ||
{type:"txt", font:"6x8", label:"A test"}, | ||
]},{btns:[ // Buttons... | ||
{label:"A", cb:()=>{}}, | ||
{label:"STOP", cb:()=>{}}, | ||
{label:"B", cb:()=>{}}, | ||
]}); |
Binary file not shown.
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,17 @@ | ||
var BTN2 = 1, BTN3=2; | ||
process.env = process.env;process.env.HWVERSION=1; | ||
g = Graphics.createArrayBuffer(240,240,4); | ||
|
||
/* When displaying OSD buttons on Bangle.js 1 we should turn | ||
the side buttons into 'soft' buttons and then use the physical | ||
buttons for up/down selection */ | ||
|
||
var layout = new Layout({ type: "v", c: [ | ||
{type:"txt", font:"6x8", label:"A test"}, | ||
{type:"btn", label:"Button 1"}, | ||
{type:"btn", label:"Button 2"} | ||
]},{btns:[ // Buttons... | ||
{label:"A", cb:()=>{}}, | ||
{label:"STOP", cb:()=>{}}, | ||
{label:"B", cb:()=>{}}, | ||
]}); |
Binary file not shown.
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,10 @@ | ||
|
||
var layout = new Layout({ type: "v", c: [ | ||
{type:"txt", font:"6x8", label:"A test"}, | ||
{type:"btn", label:"Button 1"}, | ||
{type:"btn", label:"Button 2"} | ||
]},{btns:[ // Buttons... | ||
{label:"A", cb:()=>{}}, | ||
{label:"STOP", cb:()=>{}}, | ||
{label:"B", cb:()=>{}}, | ||
]}); |
Binary file not shown.
Binary file not shown.