This commit is contained in:
jpirnay
2026-04-09 22:51:07 +02:00
parent 6cae4d4b89
commit 6e7e86b9b6
3 changed files with 7 additions and 13 deletions
+3 -9
View File
@@ -98,17 +98,11 @@ Rect UITheme::getContentRect(const GfxRenderer& renderer, bool hasBottomHints, b
return Rect{left, top, w - left - right, h - top - bottom};
}
std::string UITheme::makeSeparatorTitle(const std::string& title) {
return std::string("__") + title;
}
std::string UITheme::makeSeparatorTitle(const std::string& title) { return std::string("__") + title; }
std::string UITheme::makeSeparatorTitle(StrId labelId) {
return std::string("__") + I18N.get(labelId);
}
std::string UITheme::makeSeparatorTitle(StrId labelId) { return std::string("__") + I18N.get(labelId); }
bool UITheme::isSeparatorTitle(const std::string& title) {
return title.rfind("__", 0) == 0;
}
bool UITheme::isSeparatorTitle(const std::string& title) { return title.rfind("__", 0) == 0; }
std::string UITheme::stripSeparatorTitle(const std::string& title) {
return isSeparatorTitle(title) ? title.substr(2) : title;
+2 -2
View File
@@ -1,10 +1,10 @@
#pragma once
#include <I18n.h>
#include <functional>
#include <memory>
#include <I18n.h>
#include "CrossPointSettings.h"
#include "components/themes/BaseTheme.h"
+2 -2
View File
@@ -45,9 +45,9 @@ class ButtonNavigator final {
[[nodiscard]] static int nextIndex(int currentIndex, const std::vector<bool>& selectable);
[[nodiscard]] static int previousIndex(int currentIndex, const std::vector<bool>& selectable);
[[nodiscard]] static int nextIndex(int currentIndex, int totalItems,
const std::function<bool(int index)>& isSelectable);
const std::function<bool(int index)>& isSelectable);
[[nodiscard]] static int previousIndex(int currentIndex, int totalItems,
const std::function<bool(int index)>& isSelectable);
const std::function<bool(int index)>& isSelectable);
[[nodiscard]] int nextIndex(int currentIndex) const;
[[nodiscard]] int previousIndex(int currentIndex) const;