Toast Engine
Toggle main menu visibility
Loading...
Searching...
No Matches
ui_system_interface.hpp
Go to the documentation of this file.
1
8
9
#pragma once
10
#include <RmlUi/Core/SystemInterface.h>
11
#include <string>
12
#include <
toast/export.hpp
>
13
#include <unordered_map>
14
15
struct
SDL_Cursor;
16
struct
SDL_Window;
17
18
namespace
ui {
19
20
class
TOAST_API UISystemInterface final :
public
Rml::SystemInterface {
21
public
:
22
UISystemInterface() =
default
;
23
~UISystemInterface()
override
;
24
25
auto
GetElapsedTime() ->
double
override
;
26
auto
TranslateString(Rml::String& translated,
const
Rml::String& input) ->
int
override
;
27
void
JoinPath(Rml::String& translated_path,
const
Rml::String& document_path,
const
Rml::String& path)
override
;
28
auto
LogMessage(Rml::Log::Type type,
const
Rml::String& message) ->
bool
override
;
29
30
void
SetMouseCursor(
const
Rml::String& cursor_name)
override
;
31
void
SetClipboardText(
const
Rml::String& text)
override
;
32
void
GetClipboardText(Rml::String& text)
override
;
33
void
ActivateKeyboard(Rml::Vector2f caret_position,
float
line_height)
override
;
34
void
DeactivateKeyboard()
override
;
35
36
void
setWindow(SDL_Window* window) { m_window = window; }
37
38
private
:
39
std::unordered_map<std::string, SDL_Cursor*> m_cursors;
40
SDL_Window* m_window =
nullptr
;
41
};
42
43
}
export.hpp
engine
src
toast
ui
ui_system_interface.hpp
Generated by
1.17.0