aboutsummaryrefslogtreecommitdiff
path: root/src/openvic-simulation/interface/GFX.hpp
diff options
context:
space:
mode:
author Hop311 <Hop3114@gmail.com>2024-02-05 20:38:23 +0100
committer GitHub <noreply@github.com>2024-02-05 20:38:23 +0100
commit6489da997cddb20667db0455fa4f38319dc7c883 (patch)
tree4e343f81b13f166ad4a478962348d4734ea7e11b /src/openvic-simulation/interface/GFX.hpp
parent068c13ede817d17df599ca3481261bf17ed95604 (diff)
parent87fa1c74281a651b23089079c4c1621d4fb66d73 (diff)
Merge pull request #145 from OpenVicProject/gui-loading
Added support for loading all gui files
Diffstat (limited to 'src/openvic-simulation/interface/GFX.hpp')
-rw-r--r--src/openvic-simulation/interface/GFX.hpp28
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>();