From 0e727cd0e2c755263177f9741aebce327a23e503 Mon Sep 17 00:00:00 2001 From: fallenoak Date: Fri, 5 Dec 2025 20:51:23 -0600 Subject: [PATCH] feat(ui): propagate alpha in CSimpleFrame::SetParent --- src/ui/CSimpleFrame.cpp | 21 +++++++++------------ 1 file changed, 9 insertions(+), 12 deletions(-) diff --git a/src/ui/CSimpleFrame.cpp b/src/ui/CSimpleFrame.cpp index fcd8313..c7801a5 100644 --- a/src/ui/CSimpleFrame.cpp +++ b/src/ui/CSimpleFrame.cpp @@ -1456,13 +1456,11 @@ void CSimpleFrame::SetParent(CSimpleFrame* parent) { this->SetFrameLevel(this->m_parent->m_level + 1, 1); this->UpdateScale(false); - // TODO - // alpha stuff? - // v7 = LOBYTE(this->m_parent->simpleframe_unk3) * BYTE1(this->m_parent->simpleframe_unk3) / 255; - // if ((_BYTE)v7 != BYTE1(this->simpleframe_unk3)) { - // BYTE1(this->simpleframe_unk3) = v7; - // (this->vfptr + 53)(this); - // } + uint8_t alpha = (this->m_parent->m_alpha * this->m_parent->alphaBD) / 255; + if (this->alphaBD != alpha) { + this->alphaBD = alpha; + this->UpdateAlpha(); + } this->SetBeingScrolled((this->m_parent->m_flags >> 13) & 1, -1); } else { @@ -1470,11 +1468,10 @@ void CSimpleFrame::SetParent(CSimpleFrame* parent) { this->SetFrameLevel(0, 1); this->UpdateScale(false); - // TODO - // if (BYTE1(this->simpleframe_unk3) != -1) { - // BYTE1(this->simpleframe_unk3) = -1; - // (this->vfptr + 53)(v3); - // } + if (this->alphaBD != 255) { + this->alphaBD = 255; + this->UpdateAlpha(); + } this->SetBeingScrolled(0, -1); }