mirror of https://github.com/espruino/BangleApps
gave up on acceleration, changed from hard tabs to double spaced, updated README.md
parent
8823427560
commit
69140a58d5
|
@ -19,3 +19,4 @@
|
||||||
1.17: made changes to when accelHandler gets overwritten, temporarily disabled button usage
|
1.17: made changes to when accelHandler gets overwritten, temporarily disabled button usage
|
||||||
1.18: decided to keep around the button even while testing, disabled all safety round the accelHandler self-triggering
|
1.18: decided to keep around the button even while testing, disabled all safety round the accelHandler self-triggering
|
||||||
1.19: added longer delay before resetting accelHandler
|
1.19: added longer delay before resetting accelHandler
|
||||||
|
1.20: removed all traces of accel b/c I've given up
|
||||||
|
|
|
@ -5,8 +5,8 @@ roll anywhere from 1-8 dice at the same time.
|
||||||
|
|
||||||
## Usage
|
## Usage
|
||||||
|
|
||||||
On the menu screen: tap on the dice to change what variant is selected, & shake the watch in order to roll those dice
|
On the menu screen: tap on the dice to change what variant is selected, & press the button to roll the dice
|
||||||
On the dice screen: tap anywhere on the screen to go back to the menu, or shake to roll the dice again
|
On the dice screen: tap anywhere on the screen to go back to the menu, or press the button to roll the dice
|
||||||
|
|
||||||
## Features
|
## Features
|
||||||
|
|
||||||
|
@ -14,4 +14,5 @@ roll anywhere from 1-8 dice (d4, d6, d8, d10, d12, d20, & d percentile). You can
|
||||||
|
|
||||||
## Controls
|
## Controls
|
||||||
|
|
||||||
No button is used in the app, it simply uses touch controls & the accelerometor
|
App uses touchscreen to cycle through different dice, and BTN to roll them
|
||||||
|
(W.I.P. using acceleration to roll dice)
|
||||||
|
|
|
@ -79,20 +79,6 @@ function touchHandler (button, xy) {
|
||||||
drawMenu();
|
drawMenu();
|
||||||
}
|
}
|
||||||
|
|
||||||
function accelHandler (xyz) {
|
|
||||||
|
|
||||||
if (xyz.diff >= 0.3) {
|
|
||||||
|
|
||||||
Bangle.on ('accel', voidFn); // temporarily disable more acceleration events
|
|
||||||
|
|
||||||
menu = false;
|
|
||||||
rollDice (function() {
|
|
||||||
|
|
||||||
Bangle.on ('accel', accelHandler); // re-enable acceleration events
|
|
||||||
});
|
|
||||||
}
|
|
||||||
}
|
|
||||||
|
|
||||||
function voidFn() {
|
function voidFn() {
|
||||||
|
|
||||||
return;
|
return;
|
||||||
|
@ -146,7 +132,6 @@ function random (max) {
|
||||||
|
|
||||||
drawMenu();
|
drawMenu();
|
||||||
Bangle.on ('touch', touchHandler);
|
Bangle.on ('touch', touchHandler);
|
||||||
Bangle.on ('accel', accelHandler);
|
|
||||||
setWatch (function() {
|
setWatch (function() {
|
||||||
|
|
||||||
menu = false;
|
menu = false;
|
||||||
|
|
Loading…
Reference in New Issue