-
Notifications
You must be signed in to change notification settings - Fork 0
/
Copy pathsetup.vs
159 lines (130 loc) · 4.48 KB
/
setup.vs
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
87
88
89
90
91
92
93
94
95
96
97
98
99
100
101
102
103
104
105
106
107
108
109
110
111
112
113
114
115
116
117
118
119
120
121
122
123
124
125
126
127
128
129
130
131
132
133
134
135
136
137
138
139
140
141
142
143
144
145
146
147
148
149
150
151
152
153
154
155
156
157
158
159
Client
screenBackground = '#23272A'
hideFPS = true
onMouseMove(diob, x, y)
if (this.dragging)
this.dragging['element'].setPos(x - this.dragging['xOff'], y - this.dragging['yOff'])
onMouseUp(diob, x, y, button)
if (this.dragging && button === 1)
this.dragging = null
onConnect()
this.showInterface('interface')
output = this.getInterfaceElement('interface', 'import_output')
client = this
JS.document.getElementById('ti_interface_buffer_x_input').setAttribute('type', 'number')
JS.document.getElementById('ti_interface_buffer_y_input').setAttribute('type', 'number')
JS.document.getElementById('ti_interface_buffer_x_input').setAttribute('min', 0)
JS.document.getElementById('ti_interface_buffer_y_input').setAttribute('min', 0)
JS.document.getElementById('ti_interface_buffer_x_input').setAttribute('placeholder', 0)
JS.document.getElementById('ti_interface_buffer_y_input').setAttribute('placeholder', 0)
JS.document.getElementById('ti_interface_buffer_x_input').setAttribute('max', 100)
JS.document.getElementById('ti_interface_buffer_y_input').setAttribute('max', 100)
JS.document.getElementById('ti_interface_buffer_x_input').setAttribute('list', 'defaultNumbers')
JS.document.getElementById('ti_interface_buffer_y_input').setAttribute('list', 'defaultNumbers')
#DEFINE HUD_LAYER 1000
var uploadedFiles = 0
var fileContent = []
var fileName = []
var frameInfo = {'maxRows': 15}
var output
var client
var BUFFER_X = 0
var BUFFER_Y = 0
Interface
layer = HUD_LAYER
textStyle = {'fill': '#f3f3f3'}
onMouseDown(client, x, y, button)
if (this.draggable && button === 1)
client.dragging = {'element': this, 'xOff': x, 'yOff': y}
Import
interfaceType = 'WebBox'
Import_Output
width = 300
height = 200
color = '#f8f7ed'
textStyle = {'fill': '#313639'}
Import_Button
width = 120
height = 18
textStyle = { 'fill': '#f3f3f3', 'fontFamily': 'Helvetica', 'fontSize': 13 }
onShow()
this.text = '
<label class="fake-button">
<input type="file" onchange="handleFileSelect(event)" style="display: none; id="upload" accept=".vyi">
<div>Import</div>
</label>
'
Canvas
width = 960
height = 540
// mouseOpacity = 0
layer = HUD_LAYER - 100
var draggable = true
var defaultText
onShow()
this.defaultPos = {'x': this.xPos, 'y': this.yPos}
this.text = '<canvas id="canvas"></canvas>'
this.defaultText = this.text
onMouseClick(client, x, y, button)
if (button === 3)
this.setPos(this.defaultPos['x'], this.defaultPos['y'])
Export
Export_Button
interfaceType = 'WebBox'
width = 120
height = 18
textStyle = { 'fill': '#f3f3f3', 'fontFamily': 'Helvetica', 'fontSize': 13 }
onShow()
this.text = '
<label class="fake-button">
<a id="export">Export</a>
</label>
'
Info
interfaceType = 'WebBox'
textStyle = { 'fill': '#f3f3f3', 'fontFamily': 'Helvetica', 'fontSize': 13 }
Buffer_X_Input
interfaceType = 'CommandInput'
width = 40
height = 20
color = '#fff'
textStyle = { 'fill': '#313639', 'fontFamily': 'Helvetica', 'fontSize': 11}
onExecute(client)
if (this.text > 100)
return alert('Number can\'t be over 100')
BUFFER_X = Util.toNumber(this.text)
spawn()
this.text = BUFFER_X
Buffer_Y_Input
interfaceType = 'CommandInput'
width = 40
height = 20
color = '#fff'
textStyle = { 'fill': '#313639', 'fontFamily': 'Helvetica', 'fontSize': 11}
onExecute(client)
if (this.text > 100)
return alert('Number can\'t be over 100')
BUFFER_Y = Util.toNumber(this.text)
spawn()
this.text = BUFFER_Y
x
mouseOpacity = 0
onShow()
this.text = '<div class="log-text">X</div>
<datalist id="defaultNumbers">
<option value="8">
<option value="16">
<option value="24">
<option value="32">
<option value="48">
</datalist>'
Y
mouseOpacity = 0
onShow()
this.text = '<div class="log-text">Y</div>'
Text
mouseOpacity = 0
width = 200
height = 250
onShow()
this.text = '<div class="log-text">• Only input values in here when the .vyi you supplied has icons in it that differ in size. These values allow you to change the buffer size between rows/colums.<br><br> • Note, input these values before the import. The system tries to do this for you, where it grabs the tallest image, and the widest image, and uses that as a buffer by default. If the results aren\'t as fined tuned as you\'d like. Use these values to tweak'