diff options
author | hop311 <hop3114@gmail.com> | 2024-02-04 15:09:06 +0100 |
---|---|---|
committer | hop311 <hop3114@gmail.com> | 2024-02-04 15:09:06 +0100 |
commit | 87fa1c74281a651b23089079c4c1621d4fb66d73 (patch) | |
tree | 4e343f81b13f166ad4a478962348d4734ea7e11b /src/openvic-simulation/interface/GFX.hpp | |
parent | 3f6d7351816b0e089495b2f15dc1c956f3151f5a (diff) |
Added support for loading all gui filesgui-loading
Diffstat (limited to 'src/openvic-simulation/interface/GFX.hpp')
-rw-r--r-- | src/openvic-simulation/interface/GFX.hpp | 28 |
1 files changed, 26 insertions, 2 deletions
diff --git a/src/openvic-simulation/interface/GFX.hpp b/src/openvic-simulation/interface/GFX.hpp index 21baa85..108ecb6 100644 --- a/src/openvic-simulation/interface/GFX.hpp +++ b/src/openvic-simulation/interface/GFX.hpp @@ -12,11 +12,16 @@ namespace OpenVic::GFX { friend class OpenVic::UIManager; private: - const std::string PROPERTY(fontname); + std::string PROPERTY(fontname); + std::string PROPERTY(charset); + uint32_t PROPERTY(height); // TODO - colorcodes, effect - Font(std::string_view new_identifier, colour_argb_t new_colour, std::string_view new_fontname); + Font( + std::string_view new_identifier, colour_argb_t new_colour, std::string_view new_fontname, + std::string_view new_charset, uint32_t new_height + ); public: Font(Font&&) = default; @@ -79,6 +84,25 @@ namespace OpenVic::GFX { OV_DETAIL_GET_TYPE }; + class CorneredTileTextureSprite final : public Sprite { + friend std::unique_ptr<CorneredTileTextureSprite> std::make_unique<CorneredTileTextureSprite>(); + + std::string PROPERTY(texture_file); + ivec2_t PROPERTY(size); + ivec2_t PROPERTY(border_size); + + protected: + CorneredTileTextureSprite(); + + bool _fill_key_map(NodeTools::case_insensitive_key_map_t& key_map) override; + + public: + CorneredTileTextureSprite(CorneredTileTextureSprite&&) = default; + virtual ~CorneredTileTextureSprite() = default; + + OV_DETAIL_GET_TYPE + }; + class ProgressBar final : public Sprite { friend std::unique_ptr<ProgressBar> std::make_unique<ProgressBar>(); |