CGuiTextSupport declarations

This commit is contained in:
Jack Andersen 2016-03-17 17:35:16 -10:00
parent a5e3440866
commit ad577754c4
3 changed files with 51 additions and 23 deletions

View File

@ -25,7 +25,7 @@ CGuiTextPane* CGuiTextPane::Create(CGuiFrame* frame, CInputStream& in, bool flag
bool e = in.readBool(); bool e = in.readBool();
EJustification justification = EJustification(in.readUint32Big()); EJustification justification = EJustification(in.readUint32Big());
EVerticalJustification vJustification = EVerticalJustification(in.readUint32Big()); EVerticalJustification vJustification = EVerticalJustification(in.readUint32Big());
CGuiTextProperties props(d, e, 0, justification, vJustification); CGuiTextProperties props(d, e, false, justification, vJustification);
zeus::CColor col1; zeus::CColor col1;
col1.readRGBABig(in); col1.readRGBABig(in);
zeus::CColor col2; zeus::CColor col2;

View File

@ -2,32 +2,11 @@
#define __URDE_CGUITEXTPANE_HPP__ #define __URDE_CGUITEXTPANE_HPP__
#include "CGuiPane.hpp" #include "CGuiPane.hpp"
#include "CGuiTextSupport.hpp"
namespace urde 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 class CGuiTextPane : public CGuiPane
{ {
public: public:

View File

@ -1,9 +1,58 @@
#ifndef __URDE_CGUITEXTSUPPORT_HPP__ #ifndef __URDE_CGUITEXTSUPPORT_HPP__
#define __URDE_CGUITEXTSUPPORT_HPP__ #define __URDE_CGUITEXTSUPPORT_HPP__
#include "zeus/CColor.hpp"
#include "RetroTypes.hpp"
#include <string>
namespace urde 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;
};
} }