Remove blur and shadow from counter, consolidate options

This commit is contained in:
Irastris
2026-05-07 03:28:30 -04:00
parent 78ed5cc716
commit 92f888a152
2 changed files with 31 additions and 17 deletions
+2 -2
View File
@@ -24,8 +24,6 @@ fps,
toast {
position: absolute;
border: 1dp #92875B;
backdrop-filter: blur(5dp);
box-shadow: 0 0 15dp 3dp;
background-color: rgba(21, 22, 16, 80%);
}
@@ -36,6 +34,8 @@ toast {
flex-flow: column;
border-radius: 14dp;
overflow: hidden;
backdrop-filter: blur(5dp);
box-shadow: 0 0 15dp 3dp;
filter: opacity(0);
transform: scale(0.9);
transform-origin: center;
+29 -15
View File
@@ -479,39 +479,53 @@ SettingsWindow::SettingsWindow(bool prelaunch) : mPrelaunch(prelaunch) {
.key = "Pause on Focus Lost",
.isDisabled = [] { return IsMobile; },
});
config_bool_select(leftPane, rightPane, getSettings().video.enableFpsOverlay,
{
.key = "Enable FPS Counter",
.helpText = "Display the current framerate in a corner of the screen while playing.",
});
leftPane.register_control(leftPane.add_select_button({
.key = "FPS Counter Display Corner",
.key = "Show FPS Counter",
.getValue =
[] {
const int corner = getSettings().video.fpsOverlayCorner.getValue();
return Rml::String{kFpsOverlayCornerNames[corner]};
if (!getSettings().video.enableFpsOverlay.getValue()) {
return Rml::String{"Off"};
}
const int idx = getSettings().video.fpsOverlayCorner.getValue();
return Rml::String{kFpsOverlayCornerNames[idx]};
},
.isModified =
[] {
const auto& enable = getSettings().video.enableFpsOverlay;
const auto& corner = getSettings().video.fpsOverlayCorner;
return enable.getValue() != enable.getDefaultValue() ||
(enable.getValue() && corner.getValue() != corner.getDefaultValue());
},
.isDisabled = [] { return !getSettings().video.enableFpsOverlay.getValue(); },
}),
rightPane, [](Pane& pane) {
pane.add_button({
.text = "Off",
.isSelected =
[] { return !getSettings().video.enableFpsOverlay.getValue(); },
})
.on_pressed([] {
mDoAud_seStartMenu(kSoundItemChange);
getSettings().video.enableFpsOverlay.setValue(false);
config::Save();
});
for (int i = 0; i < static_cast<int>(kFpsOverlayCornerNames.size()); ++i) {
pane
.add_button({
pane.add_button({
.text = kFpsOverlayCornerNames[i],
.isSelected =
[i] {
return std::clamp(
getSettings().video.fpsOverlayCorner.getValue(), 0,
3) == i;
return getSettings().video.enableFpsOverlay.getValue() &&
getSettings().video.fpsOverlayCorner.getValue() == i;
},
})
.on_pressed([i] {
mDoAud_seStartMenu(kSoundItemChange);
getSettings().video.enableFpsOverlay.setValue(true);
getSettings().video.fpsOverlayCorner.setValue(i);
config::Save();
});
}
pane.add_rml("<br/>Choose which corner the framerate counter displays in.");
pane.add_rml(
"<br/>Display the current framerate in a corner of the screen while playing.");
});
leftPane.add_section("Resolution");