diff options
author | Nemrav <> | 2024-09-17 18:43:41 +0200 |
---|---|---|
committer | Nemrav <> | 2024-09-17 18:43:41 +0200 |
commit | f090f8f33a41d8707795c8963fa67073ba90f554 (patch) | |
tree | 6ed282a207d733e45bf8d779256009eeca7945c1 /src/openvic-simulation/interface/GFXObject.hpp | |
parent | fa4295e1f2cbb0b7df2a5ded82c5c8762cb9d960 (diff) |
extract text_format_t
Diffstat (limited to 'src/openvic-simulation/interface/GFXObject.hpp')
-rw-r--r-- | src/openvic-simulation/interface/GFXObject.hpp | 12 |
1 files changed, 3 insertions, 9 deletions
diff --git a/src/openvic-simulation/interface/GFXObject.hpp b/src/openvic-simulation/interface/GFXObject.hpp index 233a1fd..e25339f 100644 --- a/src/openvic-simulation/interface/GFXObject.hpp +++ b/src/openvic-simulation/interface/GFXObject.hpp @@ -2,6 +2,7 @@ #include "openvic-simulation/interface/LoadBase.hpp" #include <openvic-simulation/types/unlabelledVec.hpp> +#include <openvic-simulation/types/TextFormat.hpp> namespace OpenVic::GFX { @@ -266,18 +267,12 @@ namespace OpenVic::GFX { class AnimatedMapText final : public Object { friend std::unique_ptr<AnimatedMapText> std::make_unique<AnimatedMapText>(); - //TODO: This format_t enum is the same as in GFXSprite, should this all be extracted - //to another datatype file? - enum class format_t { - left, centre, right, justified - }; + using enum text_format_t; public: struct TextBlock { friend class AnimatedMapText; - //format_t taken from GUI's AlignedElement, this is overall very similar - private: std::string PROPERTY(text); colour_t PROPERTY(colour); @@ -285,9 +280,8 @@ namespace OpenVic::GFX { fvec2_t PROPERTY(text_position); fvec2_t PROPERTY(size); - //expect_fvec2(assign_variable_callback(position)), - format_t PROPERTY(format); + text_format_t PROPERTY(format); TextBlock(); |