Toast Engine
Toggle main menu visibility
Loading...
Searching...
No Matches
text_format.hpp
Go to the documentation of this file.
1
8
9
#pragma once
10
#include <functional>
11
#include <optional>
12
#include <string>
13
#include <string_view>
14
#include <
toast/export.hpp
>
15
16
namespace
ui {
17
18
struct
TextFormatContext
{
19
std::function<std::optional<std::string>(std::string_view)> color_resolver;
20
};
21
34
[[nodiscard]]
35
TOAST_API
auto
formatText(std::string_view input,
const
TextFormatContext
& ctx) -> std::string;
36
37
[[nodiscard]]
38
TOAST_API
auto
formatText(std::string_view input) -> std::string;
39
40
}
export.hpp
ui::TextFormatContext
Definition
text_format.hpp:18
engine
src
toast
ui
text_format.hpp
Generated by
1.17.0