1
0
mirror of https://github.com/vcmi/vcmi.git synced 2025-11-25 22:42:04 +02:00

optimized fps draw

This commit is contained in:
Laserlicht
2025-07-14 20:38:03 +02:00
parent 2774502526
commit 3504d1ce38
21 changed files with 99 additions and 49 deletions

View File

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