From bf148c6784e16402043d167b03ca18fa111a8adc Mon Sep 17 00:00:00 2001 From: mmcw-dev Date: Sat, 23 Feb 2019 22:19:03 -0500 Subject: [PATCH] Set value to digital projector feature when changing it in UI --- app/lib/ui/index.js | 1 + app/lib/ui/proj.js | 9 +++++++++ 2 files changed, 10 insertions(+) diff --git a/app/lib/ui/index.js b/app/lib/ui/index.js index 6214aef..9c2fd29 100644 --- a/app/lib/ui/index.js +++ b/app/lib/ui/index.js @@ -75,6 +75,7 @@ gui.updateProj = function (t) { t.value = mcopy.state.projector.pos; gui.counterFormat(t); } + proj.setValue(t.value); }; gui.updateState = function () { 'use strict'; diff --git a/app/lib/ui/proj.js b/app/lib/ui/proj.js index 90d7491..519a50a 100644 --- a/app/lib/ui/proj.js +++ b/app/lib/ui/proj.js @@ -71,4 +71,13 @@ proj.listen = function () { }); }; +proj.setValue = function (val) { + 'use strict'; + var obj = { + val: val, + id : uuid.v4() + }; + ipcRenderer.sendSync('proj', obj); +} + module.exports = proj; \ No newline at end of file