mirror of
https://github.com/whoahq/whoa.git
synced 2026-02-01 00:02:45 +03:00
feat(ui): properly name and place CLayoutFrame::HasPoints
This commit is contained in:
parent
1c8e6262ca
commit
3a4ed7aafb
@ -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;
|
||||
}
|
||||
|
||||
@ -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();
|
||||
|
||||
@ -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;
|
||||
|
||||
|
||||
@ -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
|
||||
}
|
||||
|
||||
@ -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();
|
||||
};
|
||||
|
||||
|
||||
Loading…
Reference in New Issue
Block a user