2016-03-10 03:47:37 +00:00
|
|
|
#ifndef __URDE_CGUITEXTSUPPORT_HPP__
|
|
|
|
#define __URDE_CGUITEXTSUPPORT_HPP__
|
|
|
|
|
2016-03-18 03:35:16 +00:00
|
|
|
#include "zeus/CColor.hpp"
|
|
|
|
#include "RetroTypes.hpp"
|
2016-03-19 00:07:31 +00:00
|
|
|
#include "CToken.hpp"
|
2016-03-18 03:35:16 +00:00
|
|
|
#include <string>
|
|
|
|
|
2016-03-10 03:47:37 +00:00
|
|
|
namespace urde
|
|
|
|
{
|
2016-03-18 03:35:16 +00:00
|
|
|
class CSimplePool;
|
2016-03-19 00:07:31 +00:00
|
|
|
class CRasterFont;
|
2016-03-18 03:35:16 +00:00
|
|
|
|
|
|
|
enum class EJustification
|
|
|
|
{
|
2016-03-20 06:37:08 +00:00
|
|
|
Zero = 0,
|
|
|
|
One,
|
|
|
|
Two,
|
|
|
|
Three,
|
|
|
|
Four,
|
|
|
|
Five,
|
|
|
|
Six,
|
|
|
|
Seven,
|
|
|
|
Eight,
|
|
|
|
Nine
|
2016-03-18 03:35:16 +00:00
|
|
|
};
|
|
|
|
|
|
|
|
enum class EVerticalJustification
|
|
|
|
{
|
2016-03-20 00:32:30 +00:00
|
|
|
Zero = 0,
|
2016-03-20 06:37:08 +00:00
|
|
|
One,
|
|
|
|
Two,
|
|
|
|
Three,
|
|
|
|
Four,
|
|
|
|
Five,
|
|
|
|
Six,
|
|
|
|
Seven,
|
|
|
|
Eight,
|
|
|
|
Nine
|
2016-03-18 03:35:16 +00:00
|
|
|
};
|
|
|
|
|
2016-03-19 00:07:31 +00:00
|
|
|
enum class EColorType
|
|
|
|
{
|
|
|
|
Zero,
|
|
|
|
One,
|
|
|
|
Two,
|
|
|
|
Three,
|
|
|
|
Four
|
|
|
|
};
|
|
|
|
|
|
|
|
enum class ETextDirection
|
|
|
|
{
|
2016-03-20 00:32:30 +00:00
|
|
|
Horizontal,
|
|
|
|
Vertical
|
2016-03-19 00:07:31 +00:00
|
|
|
};
|
|
|
|
|
2016-03-19 03:58:01 +00:00
|
|
|
using CTextColor = zeus::CColor;
|
2016-03-19 00:07:31 +00:00
|
|
|
|
2016-03-18 03:35:16 +00:00
|
|
|
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) {}
|
|
|
|
};
|
2016-03-10 03:47:37 +00:00
|
|
|
|
2016-03-18 03:35:16 +00:00
|
|
|
class CGuiTextSupport
|
|
|
|
{
|
2016-03-19 00:07:31 +00:00
|
|
|
TResId x50_fontId;
|
|
|
|
TLockedToken<CRasterFont> x2c0_font;
|
2016-03-18 03:35:16 +00:00
|
|
|
public:
|
2016-03-19 00:07:31 +00:00
|
|
|
CGuiTextSupport(TResId fontId, const CGuiTextProperties& props,
|
2016-03-18 03:35:16 +00:00
|
|
|
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;
|
|
|
|
};
|
2016-03-10 03:47:37 +00:00
|
|
|
|
|
|
|
}
|
|
|
|
|
|
|
|
#endif // __URDE_CGUITEXTSUPPORT_HPP__
|