From 4ef33d4df6198e613b0f27406d49978c8ea2fb97 Mon Sep 17 00:00:00 2001 From: zaaarf Date: Sun, 10 Dec 2023 23:15:41 +0100 Subject: feat: improved identifier registry macro --- src/openvic-simulation/interface/UI.hpp | 15 ++++----------- 1 file changed, 4 insertions(+), 11 deletions(-) (limited to 'src/openvic-simulation/interface/UI.hpp') diff --git a/src/openvic-simulation/interface/UI.hpp b/src/openvic-simulation/interface/UI.hpp index 045766b..12eadb5 100644 --- a/src/openvic-simulation/interface/UI.hpp +++ b/src/openvic-simulation/interface/UI.hpp @@ -4,21 +4,14 @@ namespace OpenVic { - class UIManager { - - NamedInstanceRegistry sprites; - NamedInstanceRegistry scenes; - IdentifierRegistry fonts; + class UIManager { + NamedInstanceRegistry IDENTIFIER_REGISTRY(sprite); + NamedInstanceRegistry IDENTIFIER_REGISTRY(scene); + IdentifierRegistry IDENTIFIER_REGISTRY(font); 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); -- cgit v1.2.3-56-ga3b1