mirror of
https://github.com/whoahq/whoa.git
synced 2026-02-02 00:32: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;
|
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() {
|
int32_t CLayoutFrame::IsAttachmentOrigin() {
|
||||||
return 0;
|
return 0;
|
||||||
}
|
}
|
||||||
|
|||||||
@ -71,6 +71,7 @@ class CLayoutFrame {
|
|||||||
void GetFirstPointX(const FRAMEPOINT* const pointarray, int32_t elements, float& x);
|
void GetFirstPointX(const FRAMEPOINT* const pointarray, int32_t elements, float& x);
|
||||||
void GetFirstPointY(const FRAMEPOINT* const pointarray, int32_t elements, float& y);
|
void GetFirstPointY(const FRAMEPOINT* const pointarray, int32_t elements, float& y);
|
||||||
int32_t GetRect(CRect* rect);
|
int32_t GetRect(CRect* rect);
|
||||||
|
int32_t HasPoints();
|
||||||
int32_t IsResizeDependency(CLayoutFrame* dependentFrame);
|
int32_t IsResizeDependency(CLayoutFrame* dependentFrame);
|
||||||
uint32_t IsResizePending();
|
uint32_t IsResizePending();
|
||||||
float Left();
|
float Left();
|
||||||
|
|||||||
@ -492,7 +492,7 @@ void CSimpleButton::SetFontString(CSimpleFontString* text) {
|
|||||||
if (text) {
|
if (text) {
|
||||||
text->SetFrame(this, DRAWLAYER_ARTWORK, 1);
|
text->SetFrame(this, DRAWLAYER_ARTWORK, 1);
|
||||||
|
|
||||||
if (!text->Sub482AC0()) {
|
if (!text->HasPoints()) {
|
||||||
auto font = this->m_normalFont;
|
auto font = this->m_normalFont;
|
||||||
uint32_t styleFlags = font ? font->m_attributes.m_styleFlags : 0x0;
|
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();
|
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) {
|
void CSimpleFontString::SetTextLength(uint32_t a2) {
|
||||||
// TODO
|
// TODO
|
||||||
}
|
}
|
||||||
|
|||||||
@ -84,7 +84,6 @@ class CSimpleFontString : public CSimpleRegion, public CSimpleFontable {
|
|||||||
void SetStyleFlags(uint32_t styleFlags);
|
void SetStyleFlags(uint32_t styleFlags);
|
||||||
void SetText(const char* text, int32_t a3);
|
void SetText(const char* text, int32_t a3);
|
||||||
void SetTextLength(uint32_t a2);
|
void SetTextLength(uint32_t a2);
|
||||||
int32_t Sub482AC0();
|
|
||||||
void UpdateString();
|
void UpdateString();
|
||||||
};
|
};
|
||||||
|
|
||||||
|
|||||||
Loading…
Reference in New Issue
Block a user