-
Notifications
You must be signed in to change notification settings - Fork 0
/
ClockData.js
74 lines (63 loc) · 1.84 KB
/
ClockData.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
class ClockData {
gameName = "CLOCK";
eventName = "TIME";
displayName = "Clock";
registerGameData = {
"game": this.gameName,
"game_display_name": this.displayName,
"developer": "My Game Studios"
}
messageData = {
"game": this.gameName,
"event": this.eventName,
"data": {
"value": 15,
"frame": {
"textvalue": "test text",
"numericalvalue": 12
}
}
}
registerEventData = {
"game": this.gameName,
"event": this.eventName,
"min_value": 0,
"max_value": 59,
"value_optional": true
}
// "Note: Engine 3.7.0 and later"
screenHandler = {
"device-type": "screened",
"zone": "one",
"mode": "screen",
"datas": [{
"icon-id": 15,
"lines": [
{
"has-text": true,
"context-frame-key": "textvalue",
// "context-frame-key": "numericalvalue",
// "arg": "(value: self)",
// "prefix": " Hour :("
// "suffix": ":",
"bold": true
},
{
"has-text": false,
// "context-frame-key": "second-line",
"has-progress-bar": true
}
]
}]
}
bindEventData;
removeEventData;
constructor() {
// make deep copies
this.bindEventData = JSON.parse(JSON.stringify(this.registerEventData));
this.removeEventData = JSON.parse(JSON.stringify(this.messageData));
// modify properties
this.bindEventData["handlers"] = [this.screenHandler];
delete this.removeEventData["data"];
}
} export default ClockData;