make screen a shutter hotspot (fixes #8) - webgbcam - [fork] gameboy webcam
HTML git clone git://src.adamsgaard.dk/webgbcam
DIR Log
DIR Files
DIR Refs
DIR README
DIR LICENSE
---
DIR commit 46a06d9f4325826225fbff43dbfc612a5cfcde5b
DIR parent 53b3ec81830b02634d1a135db258cbf507a24c4d
HTML Author: Erin Pinheiro <hello@mynameiser.in>
Date: Sat, 31 Oct 2020 17:35:41 -0300
make screen a shutter hotspot (fixes #8)
Diffstat:
M app.js | 8 +++++++-
1 file changed, 7 insertions(+), 1 deletion(-)
---
DIR diff --git a/app.js b/app.js
@@ -368,6 +368,12 @@ var buttons = {
width:15,
height:13
},
+ screenHotspot: {
+ x:31,
+ y:31,
+ width:98,
+ height:82
+ }
};
function applyLevels(value, brightness, contrast, gamma) {
@@ -539,7 +545,7 @@ function initCameraUI() {
// buttons in main screen
if(currentUI === uiMain) {
- if(isInside(mousePos, buttons.bottomLeft)) {
+ if(isInside(mousePos, buttons.bottomLeft) || isInside(mousePos, buttons.screenHotspot)) {
// shutter
cameraStream.pause();
currentUI = uiCapture;