2022-11-07 17:06:11 +00:00
|
|
|
#ifndef _CGUITEXTSUPPORT
|
|
|
|
#define _CGUITEXTSUPPORT
|
|
|
|
|
2023-01-30 21:21:55 +00:00
|
|
|
#include "Kyoto/SObjectTag.hpp"
|
|
|
|
|
|
|
|
#include "Kyoto/Text/TextCommon.hpp"
|
|
|
|
|
2022-11-07 17:06:11 +00:00
|
|
|
#include "rstl/string.hpp"
|
2023-01-19 09:05:39 +00:00
|
|
|
#include "rstl/vector.hpp"
|
2023-01-30 21:21:55 +00:00
|
|
|
#include "rstl/pair.hpp"
|
2022-11-07 17:06:11 +00:00
|
|
|
|
|
|
|
class CColor;
|
2022-12-31 19:59:30 +00:00
|
|
|
class CGuiFrame;
|
|
|
|
class CTextExecuteBuffer;
|
|
|
|
class CTextParser;
|
2023-01-30 21:21:55 +00:00
|
|
|
class CSimplePool;
|
2023-01-19 09:05:39 +00:00
|
|
|
|
|
|
|
class CGuiTextProperties {
|
|
|
|
friend class CGuiTextSupport;
|
|
|
|
|
|
|
|
public:
|
|
|
|
CGuiTextProperties(bool wordWrap, bool horizontal, EJustification justification,
|
|
|
|
EVerticalJustification vertJustification,
|
|
|
|
const rstl::vector< rstl::pair< CAssetId, CAssetId > >* txtrMap = nullptr)
|
|
|
|
: x0_wordWrap(wordWrap)
|
|
|
|
, x1_horizontal(horizontal)
|
|
|
|
, x4_justification(justification)
|
|
|
|
, x8_vertJustification(vertJustification)
|
|
|
|
, xc_txtrMap(txtrMap) {}
|
|
|
|
|
|
|
|
private:
|
|
|
|
bool x0_wordWrap;
|
|
|
|
bool x1_horizontal;
|
|
|
|
EJustification x4_justification;
|
|
|
|
EVerticalJustification x8_vertJustification;
|
|
|
|
const rstl::vector< rstl::pair< CAssetId, CAssetId > >* xc_txtrMap;
|
|
|
|
};
|
|
|
|
|
2022-11-07 17:06:11 +00:00
|
|
|
class CGuiTextSupport {
|
2022-12-31 19:59:30 +00:00
|
|
|
static CTextExecuteBuffer* gpExecBuf;
|
|
|
|
static CTextParser* gpTextParser;
|
|
|
|
|
2022-11-07 17:06:11 +00:00
|
|
|
public:
|
2023-01-19 09:05:39 +00:00
|
|
|
CGuiTextSupport(CAssetId fontId, const CGuiTextProperties& props, const CColor& fontCol,
|
|
|
|
const CColor& outlineCol, const CColor& geomCol, int extX, int extY,
|
|
|
|
CSimplePool* store, int /*CGuiWidget::EGuiModelDrawFlags*/ drawFlags);
|
|
|
|
|
2022-11-07 17:06:11 +00:00
|
|
|
void SetText(const rstl::string&, bool multipage = false);
|
|
|
|
void SetOutlineColor(const CColor& col);
|
|
|
|
void SetFontColor(const CColor& col);
|
2023-01-19 09:05:39 +00:00
|
|
|
void Render() const;
|
2022-12-31 19:59:30 +00:00
|
|
|
|
|
|
|
static void Initialize(CTextExecuteBuffer* buf, CTextParser* parser) {
|
|
|
|
gpExecBuf = buf;
|
|
|
|
gpTextParser = parser;
|
|
|
|
}
|
2023-01-19 09:05:39 +00:00
|
|
|
|
|
|
|
private:
|
|
|
|
char x0_pad[0x30c];
|
2022-11-07 17:06:11 +00:00
|
|
|
};
|
|
|
|
|
|
|
|
#endif // _CGUITEXTSUPPORT
|