mirror of
https://github.com/whoahq/whoa.git
synced 2026-02-01 08:12:44 +03:00
feat(gx): add CGxString::HandleScreenSizeChange
This commit is contained in:
parent
4cad4121c1
commit
cf4d5a598d
@ -338,6 +338,16 @@ void CGxString::CreateGeometry() {
|
|||||||
}
|
}
|
||||||
}
|
}
|
||||||
|
|
||||||
|
void CGxString::HandleScreenSizeChange() {
|
||||||
|
if (this->m_flags & 0x4) {
|
||||||
|
this->m_requestedFontHeight = GxuFontGetOneToOneHeight(this->m_currentFace);
|
||||||
|
}
|
||||||
|
|
||||||
|
this->m_currentFontHeight = std::max(2.0f / g_heightPixels, this->m_requestedFontHeight);
|
||||||
|
|
||||||
|
this->ClearInstanceData();
|
||||||
|
}
|
||||||
|
|
||||||
int32_t CGxString::Initialize(float fontHeight, const C3Vector& position, float blockWidth, float blockHeight, CGxFont* face, const char* text, EGxFontVJusts vertJust, EGxFontHJusts horzJust, float spacing, uint32_t flags, const CImVector& color, float scale) {
|
int32_t CGxString::Initialize(float fontHeight, const C3Vector& position, float blockWidth, float blockHeight, CGxFont* face, const char* text, EGxFontVJusts vertJust, EGxFontHJusts horzJust, float spacing, uint32_t flags, const CImVector& color, float scale) {
|
||||||
uint32_t textLen = SStrLen(text) + 1;
|
uint32_t textLen = SStrLen(text) + 1;
|
||||||
if (textLen > this->m_textLen) {
|
if (textLen > this->m_textLen) {
|
||||||
|
|||||||
@ -70,6 +70,7 @@ class CGxString : public TSLinkedNode<CGxString> {
|
|||||||
bool CheckGeometry(void);
|
bool CheckGeometry(void);
|
||||||
void ClearInstanceData(void);
|
void ClearInstanceData(void);
|
||||||
void CreateGeometry(void);
|
void CreateGeometry(void);
|
||||||
|
void HandleScreenSizeChange();
|
||||||
int32_t Initialize(float, const C3Vector&, float, float, CGxFont*, const char*, EGxFontVJusts, EGxFontHJusts, float, uint32_t, const CImVector&, float);
|
int32_t Initialize(float, const C3Vector&, float, float, CGxFont*, const char*, EGxFontVJusts, EGxFontHJusts, float, uint32_t, const CImVector&, float);
|
||||||
void InitializeTextLine(const char*, uint32_t, CImVector&, const C3Vector&, uint32_t*, EMBEDDEDPARSEINFO&);
|
void InitializeTextLine(const char*, uint32_t, CImVector&, const C3Vector&, uint32_t*, EMBEDDEDPARSEINFO&);
|
||||||
void InitializeViewTranslation(void);
|
void InitializeViewTranslation(void);
|
||||||
|
|||||||
Loading…
Reference in New Issue
Block a user