diff --git a/app/lib/devices-ui.js b/app/lib/devices-ui.js new file mode 100644 index 0000000..fcf510f --- /dev/null +++ b/app/lib/devices-ui.js @@ -0,0 +1,24 @@ +var devices = {}; + +devices.init = function () { + 'use strict'; + devices.listen(); + gui.overlay(true); + gui.spinner(true); +}; +devices.listen = function () { + 'use strict'; + ipcRenderer.on('ready', function (event, arg) { + //console.log(arg.camera); + //console.log(arg.projector); + devices.ready(); + return event.returnValue = true; + }); +}; +devices.ready = function () { + 'use strict'; + gui.spinner(false); + gui.overlay(false); +}; + +module.exports = devices; \ No newline at end of file diff --git a/app/src/index.js b/app/src/index.js index d4df2b8..4c452fe 100644 --- a/app/src/index.js +++ b/app/src/index.js @@ -10,11 +10,12 @@ var remote = require('remote'), light = require('./lib/light-ui.js'), proj = require('./lib/proj-ui.js'), cam = require('./lib/cam-ui.js'), - nav = {}, + nav = require('./lib/nav-ui.js'), seq = require('./lib/seq-ui.js'), cmd = require('./lib/cmd-ui.js'), gui = require('./lib/gui.js'), log = require('./lib/log-ui.js'), + devices = require('./lib/devices-ui.js'), mscript = require('./lib/mscript.js'); //console.log(ipcRenderer.sendSync('light', { 'fuck' : true }) ); @@ -59,28 +60,6 @@ mcopy.state = { //mcopy.gui.updateState(); -var devices = {}; -devices.init = function () { - 'use strict'; - devices.listen(); - gui.overlay(true); - gui.spinner(true); -}; -devices.listen = function () { - 'use strict'; - ipcRenderer.on('ready', function (event, arg) { - //console.log(arg.camera); - //console.log(arg.projector); - devices.ready(); - return event.returnValue = true; - }); -}; -devices.ready = function () { - 'use strict'; - gui.spinner(false); - gui.overlay(false); -}; - var init = function () { 'use strict'; nav.init();