mirror of
https://github.com/whoahq/whoa.git
synced 2026-11-05 06:09:55 +03:00
feat(gx): add CGxString::HandleScreenSizeChange
This commit is contained in:
2 files changed
+11
No files matched your search
@@ -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) {
|
||||
uint32_t textLen = SStrLen(text) + 1;
|
||||
if (textLen > this->m_textLen) {
|
||||
|
||||
@@ -70,6 +70,7 @@ class CGxString : public TSLinkedNode<CGxString> {
|
||||
bool CheckGeometry(void);
|
||||
void ClearInstanceData(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);
|
||||
void InitializeTextLine(const char*, uint32_t, CImVector&, const C3Vector&, uint32_t*, EMBEDDEDPARSEINFO&);
|
||||
void InitializeViewTranslation(void);
|
||||
|
||||
Reference in new issue
Block a user