1OptionPanel
2 Label
3 text-wrap: false
4 font: poppins-14-px
5 @onSetup: |
6 self:setText(tr("GPU: ") .. g_graphics.getRenderer())
7
8 Label
9 text-wrap: false
10 font: poppins-14-px
11 @onSetup: |
12 self:setText(tr("Version: ") .. g_graphics.getVersion())
13
14 HorizontalSeparator
15 id: separator
16 margin: 5 5 5 5
17
18 OptionCheckBox
19 id: vsync
20 margin: 27 0 0 8
21
22 UILabel
23 id: label
24 anchors.left: parent.left
25 anchors.verticalCenter: parent.verticalCenter
26 size: 275 30
27 !text: tr('Enable vertical synchronization')
28 !tooltip: tr('Limits FPS (usually to 60)')
29 text-offset: 0 5
30 font: poppins-14-px
31
32 OptionCheckBox
33 id: showFps
34 margin: 27 0 0 8
35
36 UILabel
37 id: label
38 anchors.left: parent.left
39 anchors.verticalCenter: parent.verticalCenter
40 size: 275 30
41 !text: tr('Show frame rate')
42 text-offset: 0 5
43 font: poppins-14-px
44
45 OptionCheckBox
46 id: enableLights
47 margin: 27 0 0 8
48
49 UILabel
50 id: label
51 anchors.left: parent.left
52 anchors.verticalCenter: parent.verticalCenter
53 size: 275 30
54 !text: tr('Enable lights')
55 text-offset: 0 5
56 font: poppins-14-px
57
58 OptionCheckBox
59 id: fullscreen
60 margin: 27 0 0 8
61 tooltip: Ctrl+Shift+F
62
63 UILabel
64 id: label
65 anchors.left: parent.left
66 anchors.verticalCenter: parent.verticalCenter
67 size: 275 30
68 !text: tr('Fullscreen')
69 text-offset: 0 5
70 font: poppins-14-px
71
72 Label
73 margin: 27 0 0 6
74 id: optimizationLevelLabel
75 font: poppins-14-px
76 !text: tr("Optimization level")
77
78 OptionComboBox
79 id: optimizationLevel
80 image-source: settings/combobox
81 image-size: 200 40
82 font: poppins-14-px
83 opacity: 0.5
84 @onMousePress: |
85 addEvent(function()
86 local menuStyle = self:getStyleName()
87 if self:getStyleName() == 'OptionComboBox' then menuStyle = 'ComboBox' end
88 local menu
89 if self.menuScroll then
90 menu = g_ui.createWidget(menuStyle .. 'PopupScrollMenu')
91 menu:setHeight(self.menuHeight)
92 if self.menuScrollStep > 0 then
93 menu:setScrollbarStep(self.menuScrollStep)
94 end
95 else
96 menu = g_ui.createWidget(menuStyle .. 'PopupMenu')
97 end
98 menu:setId(self:getId() .. 'PopupMenu')
99 for i,v in ipairs(self.options) do
100 menu:addOption(v.text, function() self:setCurrentOption(v.text) end)
101 end
102 menu:setWidth(self:getWidth())
103 menu:display({ x = self:getX(), y = self:getY() + self:getHeight() })
104 connect(menu, { onDestroy = function() self:setOn(false) end })
105 self:setOn(true)
106 menu:setWidth(200)
107 menu:setImageSource('settings/comboboxActive')
108 end)
109 @onOptionChange: modules.client_options.setOption(self:getId(), self.currentIndex)
110 @onSetup: |
111 self:addOption("Automatic")
112 self:addOption("None")
113 self:addOption("Low")
114 self:addOption("Medium")
115 self:addOption("High")
116 self:addOption("Maximum")
117
118 Label
119 !text: tr('High/Maximum optimization level may cause visual defects.')
120 margin: 5 0 0 4
121 height: 30
122 font: poppins-14-px
123
124 UIWidget
125 id: backgroundFrameRateBG
126 margin: 10 0 0 0
127 height: 15
128 font: poppins-14-px
129 text: Game framerate limit
130 text-align: left
131 text-offset: 2 -2
132
133 OptionScrollbar
134 id: backgroundFrameRate
135 anchors.verticalCenter: parent.verticalCenter
136 anchors.horizontalCenter: parent.horizontalCenter
137 margin: 0 0 0 105
138 width: 220
139 minimum: 10
140 maximum: 201
141
142 Label
143 id: backgroundFrameRateLabelBG
144 anchors.top: parent.top
145 anchors.right: parent.right
146 width: 35
147 margin: 0 35 0 0
148 font: poppins-14-px
149 color: #77f558
150 @onSetup: |
151 local value = modules.client_options.getOption('backgroundFrameRate')
152 local text = value
153 if value <= 0 or value >= 201 then
154 text = 'max'
155 end
156 self:setText(tr('%s', text))
157
158 UIWidget
159 id: ambientLightBG
160 margin: 27 0 0 0
161 height: 15
162 font: poppins-14-px
163 text: Ambient light
164 text-align: left
165 text-offset: 2 -8
166
167 OptionScrollbar
168 id: ambientLight
169 anchors.verticalCenter: parent.verticalCenter
170 anchors.horizontalCenter: parent.horizontalCenter
171 margin: 0 0 0 105
172 width: 220
173 minimum: 0
174 maximum: 100
175
176 Label
177 id: ambientLightLabelBG
178 anchors.top: parent.top
179 anchors.right: parent.right
180 width: 35
181 margin: 0 29 0 0
182 font: poppins-14-px
183 color: #77f558
184 @onSetup: |
185 local value = modules.client_options.getOption('ambientLight')
186 self:setText(tr('%s%%', value))
187
188 UIWidget
189 id: missilesOpacityBG
190 margin: 27 0 0 0
191 height: 15
192 font: poppins-14-px
193 text: Missiles opacity
194 text-align: left
195 text-offset: 2 -8
196
197 OptionScrollbar
198 id: missilesOpacity
199 anchors.verticalCenter: parent.verticalCenter
200 anchors.horizontalCenter: parent.horizontalCenter
201 margin: 0 0 0 105
202 width: 220
203 minimum: 1
204 maximum: 100
205
206 Label
207 id: missilesOpacityLabelBG
208 anchors.top: parent.top
209 anchors.right: parent.right
210 width: 35
211 margin: 0 29 0 0
212 font: poppins-14-px
213 color: #77f558
214 @onSetup: |
215 local value = modules.client_options.getOption('missilesOpacity')
216 self:setText(tr('%s%%', value))
217
218 UIWidget
219 id: effectsOpacityBG
220 margin: 27 0 0 0
221 height: 15
222 font: poppins-14-px
223 text: Effects opacity
224 text-align: left
225 text-offset: 2 -8
226
227 OptionScrollbar
228 id: effectsOpacity
229 anchors.verticalCenter: parent.verticalCenter
230 anchors.horizontalCenter: parent.horizontalCenter
231 margin: 0 0 0 105
232 width: 220
233 minimum: 1
234 maximum: 100
235
236 Label
237 id: effectsOpacityLabelBG
238 anchors.top: parent.top
239 anchors.right: parent.right
240 width: 35
241 margin: 0 29 0 0
242 font: poppins-14-px
243 color: #77f558
244 @onSetup: |
245 local value = modules.client_options.getOption('effectsOpacity')
246 self:setText(tr('%s%%', value))
247
248 Label
249 id: tips
250 margin-top: 20
251 text-auto-resize: true
252 text-align: left
253 text-wrap: true
254 !text: tr("If you have FPS issues:\n- Use OpenGL version (_gl)\n- Disable vertical synchronization\n- Set higher optimization level\n- Lower screen resolution\nOr report it on forum: http://otclient.net")
255 font: poppins-14-px
256 $mobile:
257 visible: false
258
259