2019-03-21 19:43:03 +00:00
|
|
|
const nav = {};
|
2016-06-19 00:13:33 +00:00
|
|
|
|
|
|
|
//NAV
|
|
|
|
nav.active = 'sequencer';
|
|
|
|
nav.init = function () {
|
|
|
|
'use strict';
|
|
|
|
$('#toolbar').w2toolbar({
|
|
|
|
name: 'toolbar',
|
|
|
|
items: [
|
|
|
|
{ type: 'radio', id: 'sequencer', group: '1', caption: 'Sequencer', icon: 'fa fa-th', checked: true },
|
|
|
|
{ type: 'radio', id: 'controls', group: '1', caption: 'Controls', icon: 'fa fa-tasks' },
|
|
|
|
{ type: 'radio', id: 'light', group: '1', caption: 'Light', icon: 'mcopy-light' },
|
2018-01-02 06:14:06 +00:00
|
|
|
{ type: 'radio', id: 'script', group: '1', caption: 'Script', icon: 'fa fa-code' },
|
2019-06-25 01:11:14 +00:00
|
|
|
{ type: 'radio', id: 'video', group: '1', caption : 'Film Out', icon: 'fa fa-video-camera'},
|
2016-06-19 00:13:33 +00:00
|
|
|
{ type: 'spacer' },
|
2018-01-02 06:14:06 +00:00
|
|
|
{ type: 'radio', id: 'settings', group: '1', caption: 'Settings', icon: 'fa fa-cogs' }
|
2016-06-19 00:13:33 +00:00
|
|
|
],
|
|
|
|
onClick : function (event) {
|
|
|
|
nav.change(event.target);
|
|
|
|
}
|
|
|
|
});
|
|
|
|
};
|
|
|
|
nav.change = function (id) {
|
|
|
|
'use strict';
|
|
|
|
nav.active = id;
|
|
|
|
$('.screen').hide();
|
|
|
|
$('#' + id).show();
|
2019-03-21 23:45:48 +00:00
|
|
|
if (id === 'light') {
|
2016-06-19 00:13:33 +00:00
|
|
|
if (w2ui['colors'].active === 'rgb') {
|
|
|
|
light.rgb.set(light.color);
|
|
|
|
}
|
|
|
|
} else if (id === 'script') {
|
2018-03-05 18:27:00 +00:00
|
|
|
mse.mscript.open();
|
2016-06-19 00:13:33 +00:00
|
|
|
}
|
|
|
|
};
|
|
|
|
|
|
|
|
module.exports = nav;
|