-
Notifications
You must be signed in to change notification settings - Fork 14
/
Copy pathmain.js
43 lines (38 loc) · 810 Bytes
/
main.js
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
22
23
24
25
26
27
28
29
30
31
32
33
34
35
36
37
38
39
40
41
42
43
'use strict';
let isOpen = false;
module.exports = {
load() {
// execute when package loaded
},
unload() {
// execute when package unloaded
},
// register your ipc messages here
messages: {
'open'() {
if (!isOpen) {
}
Editor.Panel.open('quick-open-x');
},
'search-scene-prefab'() {
if (!isOpen) {
Editor.Panel.open('quick-open-x');
} else {
Editor.Ipc.sendToPanel('quick-open-x', 'quick-open-x:search', true);
}
},
'search-all'() {
if (!isOpen) {
Editor.Panel.open('quick-open-x');
} else {
Editor.Ipc.sendToPanel('quick-open-x', 'quick-open-x:search', false);
}
},
'panel-ready'() {
isOpen = true;
},
'panel-close'() {
isOpen = false;
},
},
};