-
Notifications
You must be signed in to change notification settings - Fork 25
/
candybot.otui
324 lines (281 loc) · 7.18 KB
/
candybot.otui
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
160
161
162
163
164
165
166
167
168
169
170
171
172
173
174
175
176
177
178
179
180
181
182
183
184
185
186
187
188
189
190
191
192
193
194
195
196
197
198
199
200
201
202
203
204
205
206
207
208
209
210
211
212
213
214
215
216
217
218
219
220
221
222
223
224
225
226
227
228
229
230
231
232
233
234
235
236
237
238
239
240
241
242
243
244
245
246
247
248
249
250
251
252
253
254
255
256
257
258
259
260
261
262
263
264
265
266
267
268
269
270
271
272
273
274
275
276
277
278
279
280
281
282
283
284
285
286
287
288
289
290
291
292
293
294
295
296
297
298
299
300
301
302
303
304
305
306
307
308
309
310
311
312
313
314
315
316
317
318
319
320
321
322
323
324
BotOptionLineEdit < TextEdit
@onTextChange: CandyBot.changeOption(self:getId(), self:getText())
BotOptionCheckBox < CheckBox
@onCheckChange: CandyBot.changeOption(self:getId(), self:isChecked())
BotOptionTextList < TextList
@onChildFocusChange: |
local focusedChild = self:getFocusedChild()
if focusedChild then
CandyBot.changeOption(self:getId(), focusedChild:getText())
end
BotOptionHorizontalScrollBar < HorizontalScrollBar
@onValueChange: CandyBot.changeOption(self:getId(), self:getValue())
BotOptionVerticalScrollBar < VerticalScrollBar
@onValueChange: CandyBot.changeOption(self:getId(), self:getValue())
BotOptionComboBoxPopupMenuButton < ComboBoxPopupMenuButton
BotOptionComboBoxPopupMenu < ComboBoxPopupMenu
BotOptionComboBoxPopupScrollMenu < ComboBoxPopupScrollMenu
BotOptionComboBoxPopupScrollMenuButton < ComboBoxPopupScrollMenuButton
BotOptionComboBox < ComboBox
@onOptionChange: CandyBot.changeOption(self:getId(), self:getCurrentOption().text)
ListRowComplex < UIWidget
height: 14
background-color: alpha
&updateOnStates: |
function(self)
local children = self:getChildren()
for i=1,#children do
children[i]:setOn(self:isFocused())
end
end
@onFocusChange: self:updateOnStates()
@onSetup: self:updateOnStates()
$focus:
background-color: #ffffff22
Label
id: details
color: #aaaaaa
anchors.top: parent.top
anchors.left: parent.left
font: verdana-11px-monochrome
text-auto-resize: true
background-color: alpha
text-offset: 2 2
$on:
color: #ffffff
Button
id: remove
text: x
width: 12
height: 12
anchors.top: parent.top
anchors.right: parent.right
margin-right: 4
margin-top: 1
LootListRow < UIWidget
height: 36
background-color: alpha
&updateOnStates: |
function(self)
local children = self:getChildren()
for i=1,#children do
children[i]:setOn(self:isFocused())
end
end
@onFocusChange: self:updateOnStates()
@onSetup: self:updateOnStates()
$focus:
background-color: #ffffff22
Label
id: details
color: #aaaaaa
anchors.top: parent.top
anchors.left: parent.left
font: verdana-11px-monochrome
text-auto-resize: true
background-color: alpha
text-offset: 2 2
$on:
color: #ffffff
Button
id: remove
text: x
width: 14
height: 13
anchors.top: parent.top
anchors.right: parent.right
margin-right: 4
margin-top: 4
text-offset: 1 -2
Button
id: ignore
width: 14
height: 13
anchors.bottom: parent.bottom
anchors.right: parent.right
margin-right: 4
margin-bottom: 4
text-offset: 0 -1
Item
id: item
size: 36 36
offset: 2 2
margin-top: 2
margin-left: 2
focusable: false
virtual: true
anchors.top: parent.top
anchors.left: parent.left
LogLabel < UILabel
font: verdana-11px-antialised
height: 14
color: white
margin-left: 2
text-wrap: true
text-auto-resize: true
BotTabBar < MoveableTabBar
BotTabBarPanel < MoveableTabBarPanel
ScrollablePanel
id: tabBuffer
vertical-scrollbar: tabScrollBar
anchors.fill: parent
padding: 1
margin-right: 12
VerticalScrollBar
id: tabScrollBar
anchors.top: parent.top
anchors.bottom: parent.bottom
anchors.right: parent.right
padding-top: -6
padding-bottom: -6
step: 45
pixels-scroll: true
BotTabBarButton < MoveableTabBarButton
height: 25
padding: 18
PathMap < UIPathMap
draggable: true
focusable: false
cross: true
color: black
MinimapFloorUpButton
id: floorUp
@onClick: self:getParent():floorUp(1)
MinimapFloorDownButton
id: floorDown
@onClick: self:getParent():floorDown(1)
MinimapZoomInButton
id: zoomIn
@onClick: self:getParent():zoomIn()
MinimapZoomOutButton
id: zoomOut
@onClick: self:getParent():zoomOut()
MinimapResetButton
id: reset
@onClick: self:getParent():reset()
MainWindow
id: botWindow
!text: tr('CandyBot')
size: 422 605
@onEscape: CandyBot.hide()
&save: true
BotTabBar
id: botTabBar
anchors.top: parent.top
anchors.left: parent.left
anchors.right: parent.right
margin-top: 25
margin-left: -6
Panel
id: botContent
anchors.top: botTabBar.bottom
anchors.left: parent.left
anchors.right: parent.right
height: 330
image-source: /images/ui/panel_content
image-color: #ffffff99
padding-left: 9
padding-top: 6
padding-bottom: 6
margin-top: 5
margin-bottom: 7
margin-left: -6
Panel
anchors.left: botContent.left
anchors.right: botContent.right
anchors.top: botContent.bottom
anchors.bottom: hideButton.top
margin-top: 5
margin-bottom: 5
Window
id: logWindow
clipping: true
anchors.fill: parent
text: Log
dragable: false
padding-top: 23
padding-left: 5
padding-right: 5
padding-bottom: 5
ScrollablePanel
id: logBuffer
anchors.left: parent.left
anchors.right: logScrollBar.left
anchors.top: logScrollBar.top
anchors.bottom: parent.bottom
layout:
type: verticalBox
align-bottom: true
focusable: false
vertical-scrollbar: logScrollBar
inverted-scroll: true
background-color: #000000
opacity: 0.85
VerticalScrollBar
id: logScrollBar
anchors.top: parent.top
anchors.bottom: parent.bottom
anchors.right: parent.right
step: 15
pixels-scroll: true
ResizeBorder
id: bottomResizeBorder
anchors.bottom: parent.bottom
anchors.left: parent.left
anchors.right: parent.right
enabled: true
Button
id: hideButton
!text: tr('Hide')
width: 64
height: 15
anchors.right: parent.right
anchors.bottom: parent.bottom
margin-right: -6
margin-bottom: -5
@onClick: CandyBot.hide()
BotOptionComboBox
id: LoggerType
!tooltip: tr('Log level determining what log messages will be shown. This will show messages')
anchors.left: parent.left
anchors.bottom: parent.bottom
margin-bottom: -10
margin-left: -7
options:
-Info
-Warning
-Error
-Debug
@onOptionChange: |
local option = self:getCurrentOption()
if option.text == "Info" then
BotLogger.logType = BotLogTypes.info
elseif option.text == "Warning" then
BotLogger.logType = BotLogTypes.warning
elseif option.text == "Error" then
BotLogger.logType = BotLogTypes.error
elseif option.text == "Debug" then
BotLogger.logType = BotLogTypes.debug
end
CandyBot.changeOption(self:getId(), self:getCurrentOption().text)
BotOptionCheckBox
id: PrintLogs
width: 80
!text: tr('Print Logs')
!tooltip: tr('Also print the logs to the terminal.')
anchors.left: LoggerType.right
anchors.bottom: parent.bottom
margin-bottom: -7
margin-left: 5
checked: false
Label
id: versionInfo
!text: tr('v0.1 Alpha')
anchors.right: hideButton.left
anchors.bottom: parent.bottom
margin-bottom: -5
margin-right: 10
color: #ffffff44
text-auto-resize: true
$hover:
color: #ffffffff