feat(ui): properly name and place CLayoutFrame::HasPoints

This commit is contained in:
fallenoak 2025-12-04 16:00:10 -06:00
parent 1c8e6262ca
commit 3a4ed7aafb
No known key found for this signature in database
GPG Key ID: 7628F8E61AEA070D
5 changed files with 14 additions and 15 deletions

View File

@ -359,6 +359,18 @@ float CLayoutFrame::GetWidth() {
return this->m_width;
}
int32_t CLayoutFrame::HasPoints() {
for (int32_t i = 0; i < FRAMEPOINT_NUMPOINTS; i++) {
auto point = this->m_points[i];
if (point && !(point->m_flags & 0x8)) {
return 1;
}
}
return 0;
}
int32_t CLayoutFrame::IsAttachmentOrigin() {
return 0;
}

View File

@ -71,6 +71,7 @@ class CLayoutFrame {
void GetFirstPointX(const FRAMEPOINT* const pointarray, int32_t elements, float& x);
void GetFirstPointY(const FRAMEPOINT* const pointarray, int32_t elements, float& y);
int32_t GetRect(CRect* rect);
int32_t HasPoints();
int32_t IsResizeDependency(CLayoutFrame* dependentFrame);
uint32_t IsResizePending();
float Left();

View File

@ -492,7 +492,7 @@ void CSimpleButton::SetFontString(CSimpleFontString* text) {
if (text) {
text->SetFrame(this, DRAWLAYER_ARTWORK, 1);
if (!text->Sub482AC0()) {
if (!text->HasPoints()) {
auto font = this->m_normalFont;
uint32_t styleFlags = font ? font->m_attributes.m_styleFlags : 0x0;

View File

@ -823,19 +823,6 @@ void CSimpleFontString::SetText(const char* text, int32_t a3) {
this->ClearString();
}
// Probably belongs on CLayoutFrame
int32_t CSimpleFontString::Sub482AC0() {
for (int32_t i = 0; i < FRAMEPOINT_NUMPOINTS; i++) {
auto point = this->m_points[i];
if (point && !(point->m_flags & 0x8)) {
return 1;
}
}
return 0;
}
void CSimpleFontString::SetTextLength(uint32_t a2) {
// TODO
}

View File

@ -84,7 +84,6 @@ class CSimpleFontString : public CSimpleRegion, public CSimpleFontable {
void SetStyleFlags(uint32_t styleFlags);
void SetText(const char* text, int32_t a3);
void SetTextLength(uint32_t a2);
int32_t Sub482AC0();
void UpdateString();
};