-
Notifications
You must be signed in to change notification settings - Fork 5
/
menu.js
86 lines (86 loc) · 3.26 KB
/
menu.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
44
45
46
47
48
49
50
51
52
53
54
55
56
57
58
59
60
61
62
63
64
65
66
67
68
69
70
71
72
73
74
75
76
77
78
79
80
81
82
83
84
85
86
import 'frida-il2cpp-bridge'
import { Mod } from './mod'
export const getMenu = () => {
return [
{
type: 'tab',
item: [
{
title: 'tab1',
item: [
{
type: 'button',
title: 'Test1',
callback: (data) => {
console.log('这是 tab1 的 Test1');
}
},
{
type: 'slider',
title: 'slider1',
val: Mod.var.slider1,
min: 0,
max: 100,
callback: (data) => {
console.log(`Mod.var.slider1 changed: ${Mod.var.slider1} -> ${data.val}`);
Mod.var.slider1 = parseInt(data.val);
}
},
{
type: "switch",
title: "switch1",
val: Mod.var.switch1,
callback: (data) => {
console.log(`Mod.var.switch1 changed: ${Mod.var.switch1} -> ${data.val}`);
Mod.var.switch1 = data.val;
}
},
{
type: 'input',
title: 'Input Test',
val: Mod.var.test,
callback: (data) => {
console.log(`Mod.var.test changed: ${Mod.var.switch1} -> ${data.val}`);
Mod.var.test = data.val;
}
}
]
},
{
title: '关于',
item: [
{
type: 'text',
val: 'Mod: ' + Mod.name
},
{
type: 'text',
val: 'Version: ' + Mod.version
},
{
type: 'text',
val: 'Build: ' + Mod.build
},
{
type: 'text',
val: 'CoreVersionCode: ' + runtime.coreVersionCode
},
{
type: 'button',
title: 'Dump unity',
callback: (data) => {
Il2Cpp.perform(() => {
console.log(Il2Cpp.unityVersion);
console.log('Dump Start');
Il2Cpp.dump();
console.log('Dump Complete');
});
}
}
]
}
],
default: 1
}
]
}