1
0
mirror of https://github.com/vcmi/vcmi.git synced 2025-11-23 22:37:55 +02:00

code review

This commit is contained in:
Laserlicht
2025-07-17 20:42:27 +02:00
parent 3504d1ce38
commit 187d79bc7c
7 changed files with 43 additions and 35 deletions

View File

@@ -152,9 +152,9 @@ GeneralOptionsTab::GeneralOptionsTab()
{
selectLongTouchDuration();
});
addCallback("infoboxChanged", [](bool value)
addCallback("performanceOverlayChanged", [](bool value)
{
Settings gameRes = settings.write["video"]["infobox"];
Settings gameRes = settings.write["video"]["performanceOverlay"];
gameRes["show"].Bool() = value;
});
addCallback("hapticFeedbackChanged", [](bool value)
@@ -226,8 +226,8 @@ GeneralOptionsTab::GeneralOptionsTab()
if (fullscreenExclusiveCheckbox)
fullscreenExclusiveCheckbox->setSelected(settings["video"]["fullscreen"].Bool() && settings["video"]["realFullscreen"].Bool());
std::shared_ptr<CToggleButton> infoboxCheckbox = widget<CToggleButton>("infoboxCheckbox");
infoboxCheckbox->setSelected(settings["video"]["infobox"]["show"].Bool());
std::shared_ptr<CToggleButton> infoboxCheckbox = widget<CToggleButton>("performanceOverlayCheckbox");
infoboxCheckbox->setSelected(settings["video"]["performanceOverlay"]["show"].Bool());
std::shared_ptr<CToggleButton> hapticFeedbackCheckbox = widget<CToggleButton>("hapticFeedbackCheckbox");
if (hapticFeedbackCheckbox)