mirror of
https://github.com/whoahq/whoa.git
synced 2026-02-01 00:02:45 +03:00
feat(ui): implement CLayoutFrame::SetProtectFlag
This commit is contained in:
parent
fd01435140
commit
6c6e60e8f8
@ -591,7 +591,7 @@ void CLayoutFrame::OnProtectedAttach(CLayoutFrame* frame) {
|
|||||||
frame->SetProtectFlag(0x400);
|
frame->SetProtectFlag(0x400);
|
||||||
}
|
}
|
||||||
|
|
||||||
if (this->m_flags & 0x300) {
|
if (this->m_flags & (0x100 | 0x200)) {
|
||||||
frame->SetProtectFlag(0x200);
|
frame->SetProtectFlag(0x200);
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
@ -821,7 +821,17 @@ void CLayoutFrame::SetPoint(FRAMEPOINT point, CLayoutFrame* relative, FRAMEPOINT
|
|||||||
}
|
}
|
||||||
|
|
||||||
void CLayoutFrame::SetProtectFlag(uint32_t flag) {
|
void CLayoutFrame::SetProtectFlag(uint32_t flag) {
|
||||||
// TODO
|
if (this->m_flags & (0x100 | 0x800)) {
|
||||||
|
return;
|
||||||
|
}
|
||||||
|
|
||||||
|
this->m_flags &= ~0x200;
|
||||||
|
this->m_flags |= (flag & 0xF7FF | 0x800);
|
||||||
|
|
||||||
|
// TODO this->PropagateProtectFlagToParent(flag);
|
||||||
|
this->Sub489190(flag);
|
||||||
|
|
||||||
|
this->m_flags &= ~0x800;
|
||||||
}
|
}
|
||||||
|
|
||||||
void CLayoutFrame::SetWidth(float width) {
|
void CLayoutFrame::SetWidth(float width) {
|
||||||
@ -876,6 +886,16 @@ int32_t CLayoutFrame::Sub488E40(const FRAMEPOINT* const pointarray, int32_t elem
|
|||||||
return 1;
|
return 1;
|
||||||
}
|
}
|
||||||
|
|
||||||
|
void CLayoutFrame::Sub489190(uint32_t flag) {
|
||||||
|
for (int32_t i = 0; i < FRAMEPOINT_NUMPOINTS; i++) {
|
||||||
|
auto point = this->m_points[i];
|
||||||
|
|
||||||
|
if (point && !(point->m_flags & 0x8)) {
|
||||||
|
point->m_relative->SetProtectFlag(flag);
|
||||||
|
}
|
||||||
|
}
|
||||||
|
}
|
||||||
|
|
||||||
float CLayoutFrame::Top() {
|
float CLayoutFrame::Top() {
|
||||||
if (this->m_guard.top) {
|
if (this->m_guard.top) {
|
||||||
return CFramePoint::UNDEFINED;
|
return CFramePoint::UNDEFINED;
|
||||||
|
|||||||
@ -86,6 +86,7 @@ class CLayoutFrame {
|
|||||||
void SetProtectFlag(uint32_t flag);
|
void SetProtectFlag(uint32_t flag);
|
||||||
int32_t Sub488DB0(const FRAMEPOINT* const pointarray, int32_t elements, float& x);
|
int32_t Sub488DB0(const FRAMEPOINT* const pointarray, int32_t elements, float& x);
|
||||||
int32_t Sub488E40(const FRAMEPOINT* const pointarray, int32_t elements, float& y);
|
int32_t Sub488E40(const FRAMEPOINT* const pointarray, int32_t elements, float& y);
|
||||||
|
void Sub489190(uint32_t flag);
|
||||||
float Top();
|
float Top();
|
||||||
void UnflattenFrame(CLayoutFrame* frame);
|
void UnflattenFrame(CLayoutFrame* frame);
|
||||||
void UnregisterResize(CLayoutFrame* frame, uint32_t dep);
|
void UnregisterResize(CLayoutFrame* frame, uint32_t dep);
|
||||||
|
|||||||
Loading…
Reference in New Issue
Block a user