blob: 045766bf7441f6f5eb37ca6866d8fc8e6781e9e4 (
plain) (
blame)
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
22
23
24
25
26
27
|
#pragma once
#include "openvic-simulation/interface/GUI.hpp"
namespace OpenVic {
class UIManager {
NamedInstanceRegistry<GFX::Sprite> sprites;
NamedInstanceRegistry<GUI::Scene, UIManager const&> scenes;
IdentifierRegistry<GFX::Font> fonts;
bool _load_font(ast::NodeCPtr node);
public:
UIManager();
IDENTIFIER_REGISTRY_ACCESSORS(sprite)
IDENTIFIER_REGISTRY_ACCESSORS(scene)
IDENTIFIER_REGISTRY_ACCESSORS(font)
bool add_font(std::string_view identifier, colour_t colour, std::string_view fontname);
bool load_gfx_file(ast::NodeCPtr root);
bool load_gui_file(std::string_view scene_name, ast::NodeCPtr root);
};
}
|