Deluge Firmware 1.3.0
Build date: 2025.04.16
Loading...
Searching...
No Matches
formatted_title.h
1#pragma once
2#include "gui/l10n/l10n.h"
3#include "util/functions.h"
4
5namespace deluge::gui::menu_item {
6
7// Mixin for a formatted title
8class FormattedTitle {
9public:
10 FormattedTitle(l10n::String format_str) : format_str_(format_str) {}
11
12 void format(int32_t arg) {
13 title_ = l10n::get(format_str_);
14 asterixToInt(title_.data(), arg);
15 }
16
17 [[nodiscard]] std::string_view title() const { return title_; }
18
19private:
20 l10n::String format_str_;
21 std::string title_;
22};
23} // namespace deluge::gui::menu_item