@@ -148,16 +148,22 @@ dskOptions::dskOptions() : Desktop(LOADER.GetImageN("setup013", 0))
148148 // Allgemein
149149 // {
150150
151- // "Name"
152- groupAllgemein->AddText (ID_txtName, DrawPoint (80 , 80 ), _ (" Name in Game:" ), COLOR_YELLOW , FontStyle{}, NormalFont);
151+ DrawPoint curPos = DrawPoint (80 , 80 );
152+ using Offset = DrawPoint;
153+ constexpr Offset ctrlOffset (200 , -5 ); // Offset of control to its description text
154+ constexpr Offset ctrlOffset2 = ctrlOffset + Offset (200 , 0 ); // Offset of 2nd control to its description text
155+ constexpr Extent ctrlSize (190 , 22 );
156+ constexpr Extent ctrlSizeLarge = ctrlSize + Extent (ctrlOffset2 - ctrlOffset);
157+
158+ groupAllgemein->AddText (ID_txtName, curPos, _ (" Name in Game:" ), COLOR_YELLOW , FontStyle{}, NormalFont);
153159 ctrlEdit* name =
154- groupAllgemein->AddEdit (ID_edtName, DrawPoint ( 280 , 75 ), Extent ( 190 , 22 ) , TextureColor::Grey, NormalFont, 15 );
160+ groupAllgemein->AddEdit (ID_edtName, curPos + ctrlOffset, ctrlSize , TextureColor::Grey, NormalFont, 15 );
155161 name->SetText (SETTINGS .lobby .name );
162+ curPos.y += 30 ;
156163
157- // "Sprache"
158- groupAllgemein->AddText (ID_txtLanguage, DrawPoint (80 , 110 ), _ (" Language:" ), COLOR_YELLOW , FontStyle{}, NormalFont);
159- combo = groupAllgemein->AddComboBox (ID_cbLanguage, DrawPoint (280 , 105 ), Extent (190 , 20 ), TextureColor::Grey,
160- NormalFont, 100 );
164+ groupAllgemein->AddText (ID_txtLanguage, curPos, _ (" Language:" ), COLOR_YELLOW , FontStyle{}, NormalFont);
165+ combo =
166+ groupAllgemein->AddComboBox (ID_cbLanguage, curPos + ctrlOffset, ctrlSize, TextureColor::Grey, NormalFont, 100 );
161167
162168 bool selected = false ;
163169 for (unsigned i = 0 ; i < LANGUAGES .size (); ++i)
@@ -173,46 +179,54 @@ dskOptions::dskOptions() : Desktop(LOADER.GetImageN("setup013", 0))
173179 }
174180 if (!selected)
175181 combo->SetSelection (0 );
182+ curPos.y += 30 ;
176183
177- groupAllgemein->AddText (ID_txtKeyboardLayout, DrawPoint (80 , 150 ), _ (" Keyboard layout:" ), COLOR_YELLOW , FontStyle{},
178- NormalFont);
179- groupAllgemein->AddTextButton (ID_btKeyboardLayout, DrawPoint (280 , 145 ), Extent (120 , 22 ), TextureColor::Grey,
180- _ (" Readme" ), NormalFont);
184+ groupAllgemein->AddTextButton (ID_btKeyboardLayout, curPos + ctrlOffset, ctrlSizeLarge, TextureColor::Grey,
185+ _ (" Keyboard layout" ), NormalFont);
186+ curPos.y += 40 ;
181187
182- groupAllgemein->AddText (ID_txtPort, DrawPoint ( 80 , 190 ) , _ (" Local Port:" ), COLOR_YELLOW , FontStyle{}, NormalFont);
188+ groupAllgemein->AddText (ID_txtPort, curPos , _ (" Local Port:" ), COLOR_YELLOW , FontStyle{}, NormalFont);
183189 ctrlEdit* edtPort =
184- groupAllgemein->AddEdit (ID_edtPort, DrawPoint ( 280 , 185 ), Extent ( 190 , 22 ) , TextureColor::Grey, NormalFont, 15 );
190+ groupAllgemein->AddEdit (ID_edtPort, curPos + ctrlOffset, ctrlSize , TextureColor::Grey, NormalFont, 15 );
185191 edtPort->SetNumberOnly (true );
186192 edtPort->SetText (SETTINGS .server .localPort );
193+ curPos.y += 30 ;
187194
188195 // IPv4/6
189- groupAllgemein->AddText (ID_txtIpv6, DrawPoint ( 80 , 230 ) , _ (" Use IPv6:" ), COLOR_YELLOW , FontStyle{}, NormalFont);
196+ groupAllgemein->AddText (ID_txtIpv6, curPos , _ (" Use IPv6:" ), COLOR_YELLOW , FontStyle{}, NormalFont);
190197
191198 ctrlOptionGroup* ipv6 = groupAllgemein->AddOptionGroup (ID_grpIpv6, GroupSelectType::Check);
192- ipv6->AddTextButton (ID_btOn, DrawPoint ( 480 , 225 ), Extent ( 190 , 22 ) , TextureColor::Grey, _ (" IPv6" ), NormalFont);
193- ipv6->AddTextButton (ID_btOff, DrawPoint ( 280 , 225 ), Extent ( 190 , 22 ) , TextureColor::Grey, _ (" IPv4" ), NormalFont);
199+ ipv6->AddTextButton (ID_btOn, curPos + ctrlOffset2, ctrlSize , TextureColor::Grey, _ (" IPv6" ), NormalFont);
200+ ipv6->AddTextButton (ID_btOff, curPos + ctrlOffset, ctrlSize , TextureColor::Grey, _ (" IPv4" ), NormalFont);
194201 ipv6->SetSelection (SETTINGS .server .ipv6 );
195-
196202 // ipv6-feld ggf (de-)aktivieren
197203 ipv6->GetCtrl <ctrlButton>(1 )->SetEnabled (SETTINGS .proxy .type != ProxyType::Socks5); // -V807
204+ curPos.y += 40 ;
198205
199206 // Proxyserver
200- groupAllgemein->AddText (ID_txtProxy, DrawPoint ( 80 , 280 ) , _ (" Proxyserver:" ), COLOR_YELLOW , FontStyle{}, NormalFont);
207+ groupAllgemein->AddText (ID_txtProxy, curPos , _ (" Proxyserver:" ), COLOR_YELLOW , FontStyle{}, NormalFont);
201208 ctrlEdit* proxy =
202- groupAllgemein->AddEdit (ID_edtProxy, DrawPoint ( 280 , 275 ), Extent ( 190 , 22 ) , TextureColor::Grey, NormalFont);
209+ groupAllgemein->AddEdit (ID_edtProxy, curPos + ctrlOffset, ctrlSize , TextureColor::Grey, NormalFont);
203210 proxy->SetText (SETTINGS .proxy .hostname );
204211 proxy =
205- groupAllgemein->AddEdit (ID_edtProxyPort, DrawPoint ( 480 , 275 ) , Extent (50 , 22 ), TextureColor::Grey, NormalFont, 5 );
212+ groupAllgemein->AddEdit (ID_edtProxyPort, curPos + ctrlOffset2 , Extent (50 , 22 ), TextureColor::Grey, NormalFont, 5 );
206213 proxy->SetNumberOnly (true );
207214 proxy->SetText (SETTINGS .proxy .port );
215+ curPos.y += 30 ;
216+
217+ groupAllgemein->AddText (ID_txtUPNP, curPos, _ (" Use UPnP" ), COLOR_YELLOW , FontStyle{}, NormalFont);
218+ ctrlOptionGroup* upnp = groupAllgemein->AddOptionGroup (ID_grpUPNP, GroupSelectType::Check);
219+ upnp->AddTextButton (ID_btOff, curPos + ctrlOffset, ctrlSize, TextureColor::Grey, _ (" Off" ), NormalFont);
220+ upnp->AddTextButton (ID_btOn, curPos + ctrlOffset2, ctrlSize, TextureColor::Grey, _ (" On" ), NormalFont);
221+ upnp->SetSelection (SETTINGS .global .use_upnp );
222+ curPos.y += 30 ;
208223
209224 // Proxytyp
210- groupAllgemein->AddText (ID_txtProxyType, DrawPoint ( 80 , 310 ) , _ (" Proxytyp:" ), COLOR_YELLOW , FontStyle{}, NormalFont);
211- combo = groupAllgemein->AddComboBox (ID_cbProxyType, DrawPoint ( 280 , 305 ), Extent ( 390 , 20 ) , TextureColor::Grey,
225+ groupAllgemein->AddText (ID_txtProxyType, curPos , _ (" Proxytyp:" ), COLOR_YELLOW , FontStyle{}, NormalFont);
226+ combo = groupAllgemein->AddComboBox (ID_cbProxyType, curPos + ctrlOffset, ctrlSizeLarge , TextureColor::Grey,
212227 NormalFont, 100 );
213228 combo->AddString (_ (" No Proxy" ));
214229 combo->AddString (_ (" Socks v4" ));
215-
216230 // TODO: not implemented
217231 // combo->AddString(_("Socks v5"));
218232
@@ -222,76 +236,65 @@ dskOptions::dskOptions() : Desktop(LOADER.GetImageN("setup013", 0))
222236 case ProxyType::Socks4: combo->SetSelection (1 ); break ;
223237 case ProxyType::Socks5: combo->SetSelection (2 ); break ;
224238 }
239+ curPos.y += 50 ;
225240
226- // }
241+ groupAllgemein->AddText (ID_txtSmartCursor, curPos, _ (" Smart Cursor" ), COLOR_YELLOW , FontStyle{}, NormalFont);
242+ ctrlOptionGroup* smartCursor = groupAllgemein->AddOptionGroup (ID_grpSmartCursor, GroupSelectType::Check);
243+ smartCursor->AddTextButton (
244+ ID_btOff, curPos + ctrlOffset, ctrlSize, TextureColor::Grey, _ (" Off" ), NormalFont,
245+ _ (" Don't move cursor automatically\n Useful e.g. for split-screen / dual-mice multiplayer (see wiki)" ));
246+ smartCursor->AddTextButton (ID_btOn, curPos + ctrlOffset2, ctrlSize, TextureColor::Grey, _ (" On" ), NormalFont,
247+ _ (" Place cursor on default button for new dialogs / action windows (default)" ));
248+ smartCursor->SetSelection (SETTINGS .global .smartCursor );
249+ curPos.y += 50 ;
227250
228- groupAllgemein->AddText (ID_txtDebugData, DrawPoint (80 , 360 ), _ (" Submit debug data:" ), COLOR_YELLOW , FontStyle{},
229- NormalFont);
251+ groupAllgemein->AddText (ID_txtDebugData, curPos, _ (" Submit debug data:" ), COLOR_YELLOW , FontStyle{}, NormalFont);
230252 optiongroup = groupAllgemein->AddOptionGroup (ID_grpDebugData, GroupSelectType::Check);
231- optiongroup->AddTextButton (ID_btSubmitDebugOn, DrawPoint (480 , 355 ), Extent (190 , 22 ), TextureColor::Grey, _ (" On" ),
253+ optiongroup->AddTextButton (ID_btSubmitDebugOn, curPos + ctrlOffset2, ctrlSize, TextureColor::Grey, _ (" On" ),
254+ NormalFont);
255+ optiongroup->AddTextButton (ID_btSubmitDebugAsk, curPos + ctrlOffset, ctrlSize, TextureColor::Grey, _ (" Ask always" ),
232256 NormalFont);
233- optiongroup->AddTextButton (ID_btSubmitDebugAsk, DrawPoint (280 , 355 ), Extent (190 , 22 ), TextureColor::Grey,
234- _ (" Ask always" ), NormalFont);
235257
236258 optiongroup->SetSelection ((SETTINGS .global .submit_debug_data == 1 ) ? ID_btSubmitDebugOn :
237259 ID_btSubmitDebugAsk); // -V807
260+ curPos.y += 30 ;
238261
239- // qx:upnp switch
240- groupAllgemein->AddText (ID_txtUPNP, DrawPoint (80 , 390 ), _ (" Use UPnP" ), COLOR_YELLOW , FontStyle{}, NormalFont);
241- ctrlOptionGroup* upnp = groupAllgemein->AddOptionGroup (ID_grpUPNP, GroupSelectType::Check);
242- upnp->AddTextButton (ID_btOff, DrawPoint (280 , 385 ), Extent (190 , 22 ), TextureColor::Grey, _ (" Off" ), NormalFont);
243- upnp->AddTextButton (ID_btOn, DrawPoint (480 , 385 ), Extent (190 , 22 ), TextureColor::Grey, _ (" On" ), NormalFont);
244- upnp->SetSelection (SETTINGS .global .use_upnp );
245-
246- groupAllgemein->AddText (ID_txtSmartCursor, DrawPoint (80 , 420 ), _ (" Smart Cursor" ), COLOR_YELLOW , FontStyle{},
247- NormalFont);
248- ctrlOptionGroup* smartCursor = groupAllgemein->AddOptionGroup (ID_grpSmartCursor, GroupSelectType::Check);
249- smartCursor->AddTextButton (
250- ID_btOff, DrawPoint (280 , 415 ), Extent (190 , 22 ), TextureColor::Grey, _ (" Off" ), NormalFont,
251- _ (" Don't move cursor automatically\n Useful e.g. for split-screen / dual-mice multiplayer (see wiki)" ));
252- smartCursor->AddTextButton (ID_btOn, DrawPoint (480 , 415 ), Extent (190 , 22 ), TextureColor::Grey, _ (" On" ), NormalFont,
253- _ (" Place cursor on default button for new dialogs / action windows (default)" ));
254- smartCursor->SetSelection (SETTINGS .global .smartCursor );
255-
256- groupAllgemein->AddText (ID_txtGFInfo, DrawPoint (80 , 450 ), _ (" Show GameFrame Info:" ), COLOR_YELLOW , FontStyle{},
257- NormalFont);
262+ groupAllgemein->AddText (ID_txtGFInfo, curPos, _ (" Show GameFrame Info:" ), COLOR_YELLOW , FontStyle{}, NormalFont);
258263 optiongroup = groupAllgemein->AddOptionGroup (ID_grpGFInfo, GroupSelectType::Check);
259- optiongroup->AddTextButton (ID_btOn, DrawPoint (480 , 445 ), Extent (190 , 22 ), TextureColor::Grey, _ (" On" ), NormalFont);
260- optiongroup->AddTextButton (ID_btOff, DrawPoint (280 , 445 ), Extent (190 , 22 ), TextureColor::Grey, _ (" Off" ),
261- NormalFont);
264+ optiongroup->AddTextButton (ID_btOn, curPos + ctrlOffset2, ctrlSize, TextureColor::Grey, _ (" On" ), NormalFont);
265+ optiongroup->AddTextButton (ID_btOff, curPos + ctrlOffset, ctrlSize, TextureColor::Grey, _ (" Off" ), NormalFont);
262266
263267 optiongroup->SetSelection (SETTINGS .global .showGFInfo );
264268
265269 // "Auflösung"
266- groupGrafik->AddText (ID_txtResolution, DrawPoint (80 , 80 ), _ (" Fullscreen resolution:" ), COLOR_YELLOW , FontStyle{},
267- NormalFont);
268- groupGrafik->AddComboBox (ID_cbResolution, DrawPoint (280 , 75 ), Extent (190 , 22 ), TextureColor::Grey, NormalFont, 150 );
270+ curPos.y = 80 ;
271+ groupGrafik->AddText (ID_txtResolution, curPos, _ (" Fullscreen resolution:" ), COLOR_YELLOW , FontStyle{}, NormalFont);
272+ groupGrafik->AddComboBox (ID_cbResolution, curPos + ctrlOffset, ctrlSize, TextureColor::Grey, NormalFont, 150 );
273+ curPos.y += 50 ;
269274
270275 // "Vollbild"
271- groupGrafik->AddText (ID_txtFullscreen, DrawPoint ( 80 , 130 ) , _ (" Mode:" ), COLOR_YELLOW , FontStyle{}, NormalFont);
276+ groupGrafik->AddText (ID_txtFullscreen, curPos , _ (" Mode:" ), COLOR_YELLOW , FontStyle{}, NormalFont);
272277 optiongroup = groupGrafik->AddOptionGroup (ID_grpFullscreen, GroupSelectType::Check);
273- optiongroup->AddTextButton (ID_btOn, DrawPoint (480 , 125 ), Extent (190 , 22 ), TextureColor::Grey, _ (" Fullscreen" ),
274- NormalFont);
275- optiongroup->AddTextButton (ID_btOff, DrawPoint (280 , 125 ), Extent (190 , 22 ), TextureColor::Grey, _ (" Windowed" ),
278+ optiongroup->AddTextButton (ID_btOn, curPos + ctrlOffset2, ctrlSize, TextureColor::Grey, _ (" Fullscreen" ),
276279 NormalFont);
280+ optiongroup->AddTextButton (ID_btOff, curPos + ctrlOffset, ctrlSize, TextureColor::Grey, _ (" Windowed" ), NormalFont);
281+ curPos.y += 50 ;
277282
278- groupGrafik->AddText (ID_txtFramerate, DrawPoint (80 , 180 ), _ (" Limit Framerate:" ), COLOR_YELLOW , FontStyle{},
279- NormalFont);
280- groupGrafik->AddComboBox (ID_cbFramerate, DrawPoint (280 , 175 ), Extent (390 , 22 ), TextureColor::Grey, NormalFont, 150 );
283+ // "VSync"
284+ groupGrafik->AddText (ID_txtFramerate, curPos, _ (" Limit Framerate:" ), COLOR_YELLOW , FontStyle{}, NormalFont);
285+ groupGrafik->AddComboBox (ID_cbFramerate, curPos + ctrlOffset, ctrlSizeLarge, TextureColor::Grey, NormalFont, 150 );
286+ curPos.y += 50 ;
281287
282288 // "VBO"
283- groupGrafik->AddText (ID_txtVBO, DrawPoint (80 , 230 ), _ (" Vertex Buffer Objects:" ), COLOR_YELLOW , FontStyle{},
284- NormalFont);
289+ groupGrafik->AddText (ID_txtVBO, curPos, _ (" Vertex Buffer Objects:" ), COLOR_YELLOW , FontStyle{}, NormalFont);
285290 optiongroup = groupGrafik->AddOptionGroup (ID_grpVBO, GroupSelectType::Check);
286-
287- optiongroup->AddTextButton (ID_btOn, DrawPoint (280 , 225 ), Extent (190 , 22 ), TextureColor::Grey, _ (" On" ), NormalFont);
288- optiongroup->AddTextButton (ID_btOff, DrawPoint (480 , 225 ), Extent (190 , 22 ), TextureColor::Grey, _ (" Off" ),
289- NormalFont);
291+ optiongroup->AddTextButton (ID_btOn, curPos + ctrlOffset, ctrlSize, TextureColor::Grey, _ (" On" ), NormalFont);
292+ optiongroup->AddTextButton (ID_btOff, curPos + ctrlOffset2, ctrlSize, TextureColor::Grey, _ (" Off" ), NormalFont);
293+ curPos.y += 50 ;
290294
291295 // "Grafiktreiber"
292- groupGrafik->AddText (ID_txtVideoDriver, DrawPoint (80 , 275 ), _ (" Graphics Driver" ), COLOR_YELLOW , FontStyle{},
293- NormalFont);
294- combo = groupGrafik->AddComboBox (ID_cbVideoDriver, DrawPoint (280 , 275 ), Extent (390 , 20 ), TextureColor::Grey,
296+ groupGrafik->AddText (ID_txtVideoDriver, curPos, _ (" Graphics Driver" ), COLOR_YELLOW , FontStyle{}, NormalFont);
297+ combo = groupGrafik->AddComboBox (ID_cbVideoDriver, curPos + ctrlOffset, ctrlSizeLarge, TextureColor::Grey,
295298 NormalFont, 100 );
296299
297300 const auto video_drivers = drivers::DriverWrapper::LoadDriverList (drivers::DriverType::Video);
@@ -302,52 +305,57 @@ dskOptions::dskOptions() : Desktop(LOADER.GetImageN("setup013", 0))
302305 if (video_driver.GetName () == SETTINGS .driver .video )
303306 combo->SetSelection (combo->GetNumItems () - 1 );
304307 }
308+ curPos.y += 40 ;
305309
306- groupGrafik->AddText (ID_txtOptTextures, DrawPoint (80 , 320 ), _ (" Optimized Textures:" ), COLOR_YELLOW , FontStyle{},
307- NormalFont);
310+ groupGrafik->AddText (ID_txtOptTextures, curPos, _ (" Optimized Textures:" ), COLOR_YELLOW , FontStyle{}, NormalFont);
308311 optiongroup = groupGrafik->AddOptionGroup (ID_grpOptTextures, GroupSelectType::Check);
309312
310- optiongroup->AddTextButton (ID_btOn, DrawPoint (280 , 315 ), Extent (190 , 22 ), TextureColor::Grey, _ (" On" ), NormalFont);
311- optiongroup->AddTextButton (ID_btOff, DrawPoint (480 , 315 ), Extent (190 , 22 ), TextureColor::Grey, _ (" Off" ),
312- NormalFont);
313-
314- // "Audiotreiber"
315- groupSound->AddText (ID_txtAudioDriver, DrawPoint (80 , 230 ), _ (" Sounddriver" ), COLOR_YELLOW , FontStyle{}, NormalFont);
316- combo = groupSound->AddComboBox (ID_cbAudioDriver, DrawPoint (280 , 225 ), Extent (390 , 20 ), TextureColor::Grey,
317- NormalFont, 100 );
318-
319- const auto audio_drivers = drivers::DriverWrapper::LoadDriverList (drivers::DriverType::Audio);
313+ optiongroup->AddTextButton (ID_btOn, curPos + ctrlOffset, ctrlSize, TextureColor::Grey, _ (" On" ), NormalFont);
314+ optiongroup->AddTextButton (ID_btOff, curPos + ctrlOffset2, ctrlSize, TextureColor::Grey, _ (" Off" ), NormalFont);
320315
321- for (const auto & audio_driver : audio_drivers)
322- {
323- combo->AddString (audio_driver.GetName ());
324- if (audio_driver.GetName () == SETTINGS .driver .audio )
325- combo->SetSelection (combo->GetNumItems () - 1 );
326- }
316+ curPos.y = 80 ;
317+ constexpr Offset bt1Offset (200 , -5 );
318+ constexpr Offset bt2Offset (300 , -5 );
319+ constexpr Offset volOffset (400 , -5 );
320+ constexpr Extent ctrlSizeSmall (90 , ctrlSize.y );
327321
328- // Musik
329- groupSound->AddText (ID_txtMusic, DrawPoint (80 , 80 ), _ (" Music" ), COLOR_YELLOW , FontStyle{}, NormalFont);
322+ groupSound->AddText (ID_txtMusic, curPos, _ (" Music" ), COLOR_YELLOW , FontStyle{}, NormalFont);
330323 optiongroup = groupSound->AddOptionGroup (ID_grpMusic, GroupSelectType::Check);
331- optiongroup->AddTextButton (ID_btOn, DrawPoint ( 280 , 75 ), Extent ( 90 , 22 ) , TextureColor::Grey, _ (" On" ), NormalFont);
332- optiongroup->AddTextButton (ID_btOff, DrawPoint ( 380 , 75 ), Extent ( 90 , 22 ) , TextureColor::Grey, _ (" Off" ), NormalFont);
324+ optiongroup->AddTextButton (ID_btOn, curPos + bt1Offset, ctrlSizeSmall , TextureColor::Grey, _ (" On" ), NormalFont);
325+ optiongroup->AddTextButton (ID_btOff, curPos + bt2Offset, ctrlSizeSmall , TextureColor::Grey, _ (" Off" ), NormalFont);
333326
334327 ctrlProgress* Mvolume =
335- groupSound->AddProgress (ID_pgMusicVol, DrawPoint ( 480 , 75 ), Extent ( 190 , 22 ) , TextureColor::Grey, 139 , 138 , 100 );
328+ groupSound->AddProgress (ID_pgMusicVol, curPos + volOffset, ctrlSize , TextureColor::Grey, 139 , 138 , 100 );
336329 Mvolume->SetPosition ((SETTINGS .sound .musicVolume * 100 ) / 255 ); // -V807
330+ curPos.y += 50 ;
337331
338332 // Effekte
339- groupSound->AddText (ID_txtEffects, DrawPoint ( 80 , 130 ) , _ (" Effects" ), COLOR_YELLOW , FontStyle{}, NormalFont);
333+ groupSound->AddText (ID_txtEffects, curPos , _ (" Effects" ), COLOR_YELLOW , FontStyle{}, NormalFont);
340334 optiongroup = groupSound->AddOptionGroup (ID_grpEffects, GroupSelectType::Check);
341- optiongroup->AddTextButton (ID_btOn, DrawPoint ( 280 , 125 ), Extent ( 90 , 22 ) , TextureColor::Grey, _ (" On" ), NormalFont);
342- optiongroup->AddTextButton (ID_btOff, DrawPoint ( 380 , 125 ), Extent ( 90 , 22 ) , TextureColor::Grey, _ (" Off" ), NormalFont);
335+ optiongroup->AddTextButton (ID_btOn, curPos + bt1Offset, ctrlSizeSmall , TextureColor::Grey, _ (" On" ), NormalFont);
336+ optiongroup->AddTextButton (ID_btOff, curPos + bt2Offset, ctrlSizeSmall , TextureColor::Grey, _ (" Off" ), NormalFont);
343337
344338 ctrlProgress* FXvolume =
345- groupSound->AddProgress (ID_pgEffectsVol, DrawPoint ( 480 , 125 ), Extent ( 190 , 22 ) , TextureColor::Grey, 139 , 138 , 100 );
339+ groupSound->AddProgress (ID_pgEffectsVol, curPos + volOffset, ctrlSize , TextureColor::Grey, 139 , 138 , 100 );
346340 FXvolume->SetPosition ((SETTINGS .sound .effectsVolume * 100 ) / 255 );
341+ curPos.y += 50 ;
342+
343+ groupSound->AddTextButton (ID_btMusicPlayer, curPos + ctrlOffset, ctrlSize, TextureColor::Grey, _ (" Music player" ),
344+ NormalFont);
345+ curPos.y += 50 ;
346+
347+ groupSound->AddText (ID_txtAudioDriver, curPos, _ (" Sounddriver" ), COLOR_YELLOW , FontStyle{}, NormalFont);
348+ combo = groupSound->AddComboBox (ID_cbAudioDriver, curPos + ctrlOffset, ctrlSizeLarge, TextureColor::Grey,
349+ NormalFont, 100 );
350+
351+ const auto audio_drivers = drivers::DriverWrapper::LoadDriverList (drivers::DriverType::Audio);
347352
348- // Musicplayer-Button
349- groupSound->AddTextButton (ID_btMusicPlayer, DrawPoint (280 , 175 ), Extent (190 , 22 ), TextureColor::Grey,
350- _ (" Music player" ), NormalFont);
353+ for (const auto & audio_driver : audio_drivers)
354+ {
355+ combo->AddString (audio_driver.GetName ());
356+ if (audio_driver.GetName () == SETTINGS .driver .audio )
357+ combo->SetSelection (combo->GetNumItems () - 1 );
358+ }
351359
352360 // "Allgemein" auswählen
353361 optiongroup = GetCtrl<ctrlOptionGroup>(ID_grpOptions);
0 commit comments