From ad577754c4ae5976d14b56f139024c0706207f63 Mon Sep 17 00:00:00 2001 From: Jack Andersen Date: Thu, 17 Mar 2016 17:35:16 -1000 Subject: [PATCH] CGuiTextSupport declarations --- Runtime/GuiSys/CGuiTextPane.cpp | 2 +- Runtime/GuiSys/CGuiTextPane.hpp | 23 +------------- Runtime/GuiSys/CGuiTextSupport.hpp | 49 ++++++++++++++++++++++++++++++ 3 files changed, 51 insertions(+), 23 deletions(-) diff --git a/Runtime/GuiSys/CGuiTextPane.cpp b/Runtime/GuiSys/CGuiTextPane.cpp index 1c01f2e0f..f168c3b82 100644 --- a/Runtime/GuiSys/CGuiTextPane.cpp +++ b/Runtime/GuiSys/CGuiTextPane.cpp @@ -25,7 +25,7 @@ CGuiTextPane* CGuiTextPane::Create(CGuiFrame* frame, CInputStream& in, bool flag bool e = in.readBool(); EJustification justification = EJustification(in.readUint32Big()); EVerticalJustification vJustification = EVerticalJustification(in.readUint32Big()); - CGuiTextProperties props(d, e, 0, justification, vJustification); + CGuiTextProperties props(d, e, false, justification, vJustification); zeus::CColor col1; col1.readRGBABig(in); zeus::CColor col2; diff --git a/Runtime/GuiSys/CGuiTextPane.hpp b/Runtime/GuiSys/CGuiTextPane.hpp index bfdd60e4a..42d14fe07 100644 --- a/Runtime/GuiSys/CGuiTextPane.hpp +++ b/Runtime/GuiSys/CGuiTextPane.hpp @@ -2,32 +2,11 @@ #define __URDE_CGUITEXTPANE_HPP__ #include "CGuiPane.hpp" +#include "CGuiTextSupport.hpp" namespace urde { -enum class EJustification -{ -}; - -enum class EVerticalJustification -{ -}; - -class CGuiTextProperties -{ - bool x0_a; - bool x1_b; - bool x2_c; - EJustification x4_justification; - EVerticalJustification x8_vertJustification; -public: - CGuiTextProperties(bool a, bool b, bool c, EJustification justification, - EVerticalJustification vertJustification) - : x0_a(a), x1_b(b), x2_c(c), x4_justification(justification), - x8_vertJustification(vertJustification) {} -}; - class CGuiTextPane : public CGuiPane { public: diff --git a/Runtime/GuiSys/CGuiTextSupport.hpp b/Runtime/GuiSys/CGuiTextSupport.hpp index b9842ec68..c5ba8321a 100644 --- a/Runtime/GuiSys/CGuiTextSupport.hpp +++ b/Runtime/GuiSys/CGuiTextSupport.hpp @@ -1,9 +1,58 @@ #ifndef __URDE_CGUITEXTSUPPORT_HPP__ #define __URDE_CGUITEXTSUPPORT_HPP__ +#include "zeus/CColor.hpp" +#include "RetroTypes.hpp" +#include + namespace urde { +class CSimplePool; +enum class EJustification +{ +}; + +enum class EVerticalJustification +{ +}; + +class CGuiTextProperties +{ + bool x0_a; + bool x1_b; + bool x2_c; + EJustification x4_justification; + EVerticalJustification x8_vertJustification; +public: + CGuiTextProperties(bool a, bool b, bool c, EJustification justification, + EVerticalJustification vertJustification) + : x0_a(a), x1_b(b), x2_c(c), x4_justification(justification), + x8_vertJustification(vertJustification) {} +}; + +class CGuiTextSupport +{ +public: + CGuiTextSupport(u32, const CGuiTextProperties& props, + const zeus::CColor& col1, const zeus::CColor& col2, + const zeus::CColor& col3, int, int, CSimplePool*); + void GetCurrentAnimationOverAge() const; + int GetNumCharsPrinted() const; + int GetTotalAnimationTime() const; + void SetTypeWriteEffectOptions(bool, float, float); + void Update(float dt); + void ClearBuffer(); + void CheckAndRebuildTextRenderBuffer(); + void Render() const; + void SetGeometryColor(const zeus::CColor& col); + void SetOutlineColor(const zeus::CColor& col); + void SetFontColor(const zeus::CColor& col); + void AddText(const std::wstring& str); + void SetText(const std::wstring& str); + void SetText(const std::string& str); + bool GetIsTextSupportFinishedLoading() const; +}; }