Skip to content

Commit

Permalink
Change order of options in "general" tab
Browse files Browse the repository at this point in the history
  • Loading branch information
Flamefire committed Jul 16, 2023
1 parent 1f49bad commit 160885f
Showing 1 changed file with 22 additions and 24 deletions.
46 changes: 22 additions & 24 deletions libs/s25main/desktops/dskOptions.cpp
Original file line number Diff line number Diff line change
Expand Up @@ -164,7 +164,6 @@ dskOptions::dskOptions() : Desktop(LOADER.GetImageN("setup013", 0))
groupAllgemein->AddText(ID_txtLanguage, curPos, _("Language:"), COLOR_YELLOW, FontStyle{}, NormalFont);

Check warning on line 164 in libs/s25main/desktops/dskOptions.cpp

View check run for this annotation

Codecov / codecov/patch

libs/s25main/desktops/dskOptions.cpp#L164

Added line #L164 was not covered by tests
combo =
groupAllgemein->AddComboBox(ID_cbLanguage, curPos + ctrlOffset, ctrlSize, TextureColor::Grey, NormalFont, 100);

Check warning on line 166 in libs/s25main/desktops/dskOptions.cpp

View check run for this annotation

Codecov / codecov/patch

libs/s25main/desktops/dskOptions.cpp#L166

Added line #L166 was not covered by tests
curPos.y += 40;

bool selected = false;
for(unsigned i = 0; i < LANGUAGES.size(); ++i)
Expand All @@ -180,18 +179,18 @@ dskOptions::dskOptions() : Desktop(LOADER.GetImageN("setup013", 0))
}
if(!selected)
combo->SetSelection(0);
curPos.y += 30;

Check warning on line 182 in libs/s25main/desktops/dskOptions.cpp

View check run for this annotation

Codecov / codecov/patch

libs/s25main/desktops/dskOptions.cpp#L182

Added line #L182 was not covered by tests

groupAllgemein->AddText(ID_txtKeyboardLayout, curPos, _("Keyboard layout:"), COLOR_YELLOW, FontStyle{}, NormalFont);
groupAllgemein->AddTextButton(ID_btKeyboardLayout, curPos + ctrlOffset, ctrlSize, TextureColor::Grey, _("Readme"),
NormalFont);
groupAllgemein->AddTextButton(ID_btKeyboardLayout, curPos + ctrlOffset, ctrlSizeLarge, TextureColor::Grey,
_("Keyboard layout"), NormalFont);
curPos.y += 40;

Check warning on line 186 in libs/s25main/desktops/dskOptions.cpp

View check run for this annotation

Codecov / codecov/patch

libs/s25main/desktops/dskOptions.cpp#L184-L186

Added lines #L184 - L186 were not covered by tests

groupAllgemein->AddText(ID_txtPort, curPos, _("Local Port:"), COLOR_YELLOW, FontStyle{}, NormalFont);

Check warning on line 188 in libs/s25main/desktops/dskOptions.cpp

View check run for this annotation

Codecov / codecov/patch

libs/s25main/desktops/dskOptions.cpp#L188

Added line #L188 was not covered by tests
ctrlEdit* edtPort =
groupAllgemein->AddEdit(ID_edtPort, curPos + ctrlOffset, ctrlSize, TextureColor::Grey, NormalFont, 15);

Check warning on line 190 in libs/s25main/desktops/dskOptions.cpp

View check run for this annotation

Codecov / codecov/patch

libs/s25main/desktops/dskOptions.cpp#L190

Added line #L190 was not covered by tests
edtPort->SetNumberOnly(true);
edtPort->SetText(SETTINGS.server.localPort);
curPos.y += 40;
curPos.y += 30;

Check warning on line 193 in libs/s25main/desktops/dskOptions.cpp

View check run for this annotation

Codecov / codecov/patch

libs/s25main/desktops/dskOptions.cpp#L193

Added line #L193 was not covered by tests

// IPv4/6
groupAllgemein->AddText(ID_txtIpv6, curPos, _("Use IPv6:"), COLOR_YELLOW, FontStyle{}, NormalFont);

Check warning on line 196 in libs/s25main/desktops/dskOptions.cpp

View check run for this annotation

Codecov / codecov/patch

libs/s25main/desktops/dskOptions.cpp#L196

Added line #L196 was not covered by tests
Expand All @@ -202,7 +201,7 @@ dskOptions::dskOptions() : Desktop(LOADER.GetImageN("setup013", 0))
ipv6->SetSelection(SETTINGS.server.ipv6);
// ipv6-feld ggf (de-)aktivieren
ipv6->GetCtrl<ctrlButton>(1)->SetEnabled(SETTINGS.proxy.type != ProxyType::Socks5); //-V807
curPos.y += 50;
curPos.y += 40;

Check warning on line 204 in libs/s25main/desktops/dskOptions.cpp

View check run for this annotation

Codecov / codecov/patch

libs/s25main/desktops/dskOptions.cpp#L204

Added line #L204 was not covered by tests

// Proxyserver
groupAllgemein->AddText(ID_txtProxy, curPos, _("Proxyserver:"), COLOR_YELLOW, FontStyle{}, NormalFont);

Check warning on line 207 in libs/s25main/desktops/dskOptions.cpp

View check run for this annotation

Codecov / codecov/patch

libs/s25main/desktops/dskOptions.cpp#L207

Added line #L207 was not covered by tests
Expand All @@ -215,6 +214,13 @@ dskOptions::dskOptions() : Desktop(LOADER.GetImageN("setup013", 0))
proxy->SetText(SETTINGS.proxy.port);
curPos.y += 30;

Check warning on line 215 in libs/s25main/desktops/dskOptions.cpp

View check run for this annotation

Codecov / codecov/patch

libs/s25main/desktops/dskOptions.cpp#L215

Added line #L215 was not covered by tests

groupAllgemein->AddText(ID_txtUPNP, curPos, _("Use UPnP"), COLOR_YELLOW, FontStyle{}, NormalFont);
ctrlOptionGroup* upnp = groupAllgemein->AddOptionGroup(ID_grpUPNP, GroupSelectType::Check);
upnp->AddTextButton(ID_btOff, curPos + ctrlOffset, ctrlSize, TextureColor::Grey, _("Off"), NormalFont);
upnp->AddTextButton(ID_btOn, curPos + ctrlOffset2, ctrlSize, TextureColor::Grey, _("On"), NormalFont);
upnp->SetSelection(SETTINGS.global.use_upnp);
curPos.y += 30;

Check warning on line 222 in libs/s25main/desktops/dskOptions.cpp

View check run for this annotation

Codecov / codecov/patch

libs/s25main/desktops/dskOptions.cpp#L217-L222

Added lines #L217 - L222 were not covered by tests

// Proxytyp
groupAllgemein->AddText(ID_txtProxyType, curPos, _("Proxytyp:"), COLOR_YELLOW, FontStyle{}, NormalFont);
combo = groupAllgemein->AddComboBox(ID_cbProxyType, curPos + ctrlOffset, ctrlSizeLarge, TextureColor::Grey,

Check warning on line 226 in libs/s25main/desktops/dskOptions.cpp

View check run for this annotation

Codecov / codecov/patch

libs/s25main/desktops/dskOptions.cpp#L225-L226

Added lines #L225 - L226 were not covered by tests
Expand All @@ -232,6 +238,16 @@ dskOptions::dskOptions() : Desktop(LOADER.GetImageN("setup013", 0))
}
curPos.y += 50;

Check warning on line 239 in libs/s25main/desktops/dskOptions.cpp

View check run for this annotation

Codecov / codecov/patch

libs/s25main/desktops/dskOptions.cpp#L239

Added line #L239 was not covered by tests

groupAllgemein->AddText(ID_txtSmartCursor, curPos, _("Smart Cursor"), COLOR_YELLOW, FontStyle{}, NormalFont);
ctrlOptionGroup* smartCursor = groupAllgemein->AddOptionGroup(ID_grpSmartCursor, GroupSelectType::Check);
smartCursor->AddTextButton(
ID_btOff, curPos + ctrlOffset, ctrlSize, TextureColor::Grey, _("Off"), NormalFont,

Check warning on line 244 in libs/s25main/desktops/dskOptions.cpp

View check run for this annotation

Codecov / codecov/patch

libs/s25main/desktops/dskOptions.cpp#L241-L244

Added lines #L241 - L244 were not covered by tests
_("Don't move cursor automatically\nUseful e.g. for split-screen / dual-mice multiplayer (see wiki)"));
smartCursor->AddTextButton(ID_btOn, curPos + ctrlOffset2, ctrlSize, TextureColor::Grey, _("On"), NormalFont,

Check warning on line 246 in libs/s25main/desktops/dskOptions.cpp

View check run for this annotation

Codecov / codecov/patch

libs/s25main/desktops/dskOptions.cpp#L246

Added line #L246 was not covered by tests
_("Place cursor on default button for new dialogs / action windows (default)"));
smartCursor->SetSelection(SETTINGS.global.smartCursor);
curPos.y += 50;

Check warning on line 249 in libs/s25main/desktops/dskOptions.cpp

View check run for this annotation

Codecov / codecov/patch

libs/s25main/desktops/dskOptions.cpp#L248-L249

Added lines #L248 - L249 were not covered by tests

groupAllgemein->AddText(ID_txtDebugData, curPos, _("Submit debug data:"), COLOR_YELLOW, FontStyle{}, NormalFont);

Check warning on line 251 in libs/s25main/desktops/dskOptions.cpp

View check run for this annotation

Codecov / codecov/patch

libs/s25main/desktops/dskOptions.cpp#L251

Added line #L251 was not covered by tests
optiongroup = groupAllgemein->AddOptionGroup(ID_grpDebugData, GroupSelectType::Check);
optiongroup->AddTextButton(ID_btSubmitDebugOn, curPos + ctrlOffset2, ctrlSize, TextureColor::Grey, _("On"),
Expand All @@ -241,24 +257,6 @@ dskOptions::dskOptions() : Desktop(LOADER.GetImageN("setup013", 0))

optiongroup->SetSelection((SETTINGS.global.submit_debug_data == 1) ? ID_btSubmitDebugOn :
ID_btSubmitDebugAsk); //-V807
curPos.y += 50;

// qx:upnp switch
groupAllgemein->AddText(ID_txtUPNP, curPos, _("Use UPnP"), COLOR_YELLOW, FontStyle{}, NormalFont);
ctrlOptionGroup* upnp = groupAllgemein->AddOptionGroup(ID_grpUPNP, GroupSelectType::Check);
upnp->AddTextButton(ID_btOff, curPos + ctrlOffset, ctrlSize, TextureColor::Grey, _("Off"), NormalFont);
upnp->AddTextButton(ID_btOn, curPos + ctrlOffset2, ctrlSize, TextureColor::Grey, _("On"), NormalFont);
upnp->SetSelection(SETTINGS.global.use_upnp);
curPos.y += 30;

groupAllgemein->AddText(ID_txtSmartCursor, curPos, _("Smart Cursor"), COLOR_YELLOW, FontStyle{}, NormalFont);
ctrlOptionGroup* smartCursor = groupAllgemein->AddOptionGroup(ID_grpSmartCursor, GroupSelectType::Check);
smartCursor->AddTextButton(
ID_btOff, curPos + ctrlOffset, ctrlSize, TextureColor::Grey, _("Off"), NormalFont,
_("Don't move cursor automatically\nUseful e.g. for split-screen / dual-mice multiplayer (see wiki)"));
smartCursor->AddTextButton(ID_btOn, curPos + ctrlOffset2, ctrlSize, TextureColor::Grey, _("On"), NormalFont,
_("Place cursor on default button for new dialogs / action windows (default)"));
smartCursor->SetSelection(SETTINGS.global.smartCursor);
curPos.y += 30;

Check warning on line 260 in libs/s25main/desktops/dskOptions.cpp

View check run for this annotation

Codecov / codecov/patch

libs/s25main/desktops/dskOptions.cpp#L260

Added line #L260 was not covered by tests

groupAllgemein->AddText(ID_txtGFInfo, curPos, _("Show GameFrame Info:"), COLOR_YELLOW, FontStyle{}, NormalFont);

Check warning on line 262 in libs/s25main/desktops/dskOptions.cpp

View check run for this annotation

Codecov / codecov/patch

libs/s25main/desktops/dskOptions.cpp#L262

Added line #L262 was not covered by tests
Expand Down

0 comments on commit 160885f

Please sign in to comment.