options.otui

main 272 lines · 5.7 KB Raw
Alex Alex Commit Client Upload Part 2 19/10/2026 00:06
1TabBarVerticalButton < UIButton
2 size: 290 40
3 color: #aaaaaa
4 anchors.left: parent.left
5 anchors.right: parent.right
6 image-source: settings/bgitemselect
7 image-border: 5
8 image-offset-y: 5
9 text-align: Top-Left
10 text-offset: 20 17
11 font: poppins-14-px
12 icon-align: right
13 icon-offset-x: -15
14 icon-offset-y: 5
15 icon-clip: 0 0 25 25
16 $first:
17 anchors.top: parent.top
18 $!first:
19 anchors.top: prev.bottom
20 margin-top: 11
21 $hover !checked:
22 icon-clip: 0 0 25 25
23 $disabled:
24 icon-clip: 0 0 25 25
25 image-source: settings/bgitemselect
26 $checked:
27 icon-clip: 0 25 25 25
28 image-source: settings/bgitemselectactive
29 color: #ffffff
30 $on !checked:
31 color: #A6AAB2
32
33OptionCheckBox < UICheckBox
34 size: 34 22
35 text-align: center
36 text-offset: 105 -2
37 !text: tr('Off')
38 font: poppins-14-px
39 color: #dfdfdf
40 image-color: #dfdfdfff
41 image-rect: 0 0 34 22
42 image-source: /modules/client_options/settings/checkbox
43 image-offset: 275 0
44 change-cursor-image: true
45 cursor: pointer
46 @onCheckChange: modules.client_options.setOption(self:getId(), self:isChecked())
47
48 $hover !disabled:
49 color: #ffffff
50
51 $!checked:
52 image-source: /modules/client_options/settings/checkbox
53 !text: tr('Off')
54 color: #ffffff
55
56 $hover !checked:
57 image-source: /modules/client_options/settings/checkbox
58
59 $checked:
60 image-source: /modules/client_options/settings/checkboxactive
61 !text: tr('On')
62 color: #77f558
63
64 $hover checked:
65 image-source: /modules/client_options/settings/checkboxactive
66
67 $disabled:
68 image-color: #dfdfdf88
69 color: #dfdfdf88
70 opacity: 0.8
71 change-cursor-image: false
72
73ScrollBarSliderBG < UIButton
74 id: sliderButton
75 anchors.centerIn: parent
76 size: 22 22
77 image-source: settings/cursorslider
78
79OptionScrollbarBG < UIScrollBar
80 orientation: horizontal
81 height: 10
82 width: 39
83 image-source: settings/bgslider
84 image-size: 210 10
85 image-offset-x: 20
86
87 $disabled:
88 color: #bbbbbb88
89
90 UIButton
91 id: decrementButton
92 anchors.top: parent.top
93 anchors.left: parent.left
94 image-source: /images/ui/scrollbar
95 image-clip: 0 39 13 13
96 image-color: #ffffffff
97 size: 13 13
98 visible: false
99 enable: false
100 $hover:
101 image-clip: 13 39 13 13
102 $pressed:
103 image-clip: 26 39 13 13
104 $disabled:
105 image-color: #ffffff66
106
107 UIButton
108 id: incrementButton
109 anchors.bottom: parent.bottom
110 anchors.right: parent.right
111 size: 13 13
112 visible: false
113 enable: false
114 image-source: /images/ui/scrollbar
115 image-clip: 0 52 13 13
116 image-color: #ffffffff
117 $hover:
118 image-clip: 13 52 13 13
119 $pressed:
120 image-clip: 26 52 13 13
121 $disabled:
122 image-color: #ffffff66
123
124 UIWidget
125 id: activeScroll
126 anchors.left: parent.left
127 margin-left: 10
128 height: 10
129 image-source: settings/bgslideractive
130 phantom: true
131
132 ScrollBarSliderBG
133
134 ScrollBarValueLabel
135
136OptionScrollbar < OptionScrollbarBG
137 step: 1
138 @onValueChange: modules.client_options.setOption(self:getId(), self:getValue())
139
140OptionComboBox < ComboBox
141 font: verdana-11px-antialised
142 color: #dfdfdf
143 size: 200 40
144 text-offset: 3 0
145 text-align: left
146 image-source: settings/combobox
147 image-border: 3
148 image-border-right: 19
149 image-clip: 0 0 200 40
150
151 $hover !disabled:
152 image-clip: 0 41 200 40
153
154 $on:
155 image-clip: 0 82 200 40
156
157 $disabled:
158 color: #dfdfdf88
159 opacity: 0.8
160
161OptionPanel < Panel
162 layout:
163 type: verticalBox
164
165TabBarVertical < UITabBar
166 width: 290
167
168 ScrollableFlatPanel
169 id: buttonsPanel
170 anchors.top: parent.top
171 anchors.left: parent.left
172 anchors.right: scrollBar.left
173 anchors.bottom: parent.bottom
174 vertical-scrollbar: scrollBar
175 margin-right: 1
176 image-source:
177
178 VerticalScrollBar
179 id: scrollBar
180 anchors.top: parent.top
181 anchors.bottom: parent.bottom
182 anchors.right: parent.right
183 step: 16
184 pixels-scroll: true
185 $!on:
186 width: 0
187
188UIWindow
189 id: optionsWindow
190 anchors.horizontalCenter: parent.horizontalCenter
191 anchors.verticalCenter: parent.verticalCenter
192 !text: tr('Options')
193 text-align: Top-Left
194 text-offset: 42 15
195 font: poppins-14-px
196 size: 910 704
197 image-source: settings/background
198 image-border-top: 6
199 image-border-bottom: 6
200 $mobile:
201 size: 490 360
202
203 UIWidget
204 id: optionsIcon
205 anchors.left: parent.left
206 anchors.top: parent.top
207 margin: 10 0 0 15
208 image-source: settings/options
209
210 Label
211 id: optionsKey
212 anchors.left: parent.left
213 anchors.top: parent.top
214 margin: 15 0 0 91
215 color: #77f558
216 font: poppins-14-px
217 text: (O)
218
219 UIWidget
220 id: optionsEdgeHorizontal
221 anchors.left: parent.left
222 anchors.right: parent.right
223 anchors.top: parent.top
224 height: 2
225 margin: 46 0 0 0
226 image-source: settings/edge_top
227
228 UIWidget
229 id: optionsEdgeVertical
230 anchors.horizontalCenter: parent.horizontalCenter
231 anchors.top: optionsEdgeHorizontal.bottom
232 anchors.bottom: parent.bottom
233 width: 2
234 margin: 0 123 0 0
235 image-source: settings/edgevertical
236
237 @onEnter: modules.client_options.hide()
238 @onEscape: modules.client_options.hide()
239
240 TabBarVertical
241 id: optionsTabBar
242 anchors.top: parent.top
243 anchors.left: parent.left
244 anchors.bottom: parent.bottom
245 margin: 62 0 0 22
246
247 Panel
248 id: optionsTabContent
249 anchors.top: optionsTabBar.top
250 anchors.left: optionsTabBar.right
251 anchors.right: parent.right
252 anchors.bottom: optionsTabBar.bottom
253 margin-left: 43
254 margin-top: 10
255
256 UIButton
257 anchors.right: parent.right
258 anchors.top: parent.top
259 size: 25 25
260 margin: 12 20 0 0
261 image-source: settings/close_button
262
263 $hover !checked:
264 image-source: settings/close_button_active
265
266 $pressed:
267 image-source: settings/close_button_active
268
269 @onClick: |
270 g_settings.save()
271 modules.client_options.hide()
272
Top