We read every piece of feedback, and take your input very seriously.
To see all available qualifiers, see our documentation.
Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.
By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.
Already on GitHub? Sign in to your account
void CControlUI::SetPos(RECT rc, bool bNeedInvalidate) { if( rc.right < rc.left ) rc.right = rc.left; if( rc.bottom < rc.top ) rc.bottom = rc.top;
CDuiRect invalidateRc = m_rcItem; if( ::IsRectEmpty(&invalidateRc) ) invalidateRc = rc; if( m_bFloat ) { CControlUI* pParent = GetParent(); /*if( pParent != NULL ) { RECT rcParentPos = pParent->GetPos(); RECT rcCtrl = {rcParentPos.left + rc.left, rcParentPos.top + rc.top, rcParentPos.left + rc.right, rcParentPos.top + rc.bottom}; m_rcItem = rcCtrl; LONG width = rcParentPos.right - rcParentPos.left; LONG height = rcParentPos.bottom - rcParentPos.top; RECT rcPercent = {(LONG)(width*m_piFloatPercent.left), (LONG)(height*m_piFloatPercent.top), (LONG)(width*m_piFloatPercent.right), (LONG)(height*m_piFloatPercent.bottom)}; m_cXY.cx = rc.left - rcPercent.left; m_cXY.cy = rc.top - rcPercent.top; m_cxyFixed.cx = rc.right - rcPercent.right - m_cXY.cx; m_cxyFixed.cy = rc.bottom - rcPercent.bottom - m_cXY.cy; }*/ } else { m_rcItem = rc; } m_rcItem = rc; if( m_pManager == NULL ) return; if( !m_bSetPos ) { m_bSetPos = true; if( OnSize ) OnSize(this); m_bSetPos = false; } m_bUpdateNeeded = false; if( bNeedInvalidate && IsVisible() ) { invalidateRc.Join(m_rcItem); CControlUI* pParent = this; RECT rcTemp; RECT rcParent; while( pParent = pParent->GetParent() ) { if( !pParent->IsVisible() ) return; rcTemp = invalidateRc; rcParent = pParent->GetPos(); if( !::IntersectRect(&invalidateRc, &rcTemp, &rcParent) ) return; } m_pManager->Invalidate(invalidateRc); } }
The text was updated successfully, but these errors were encountered:
Float 在 CContainerUI::SetFloatPos 里面处理过了。
Sorry, something went wrong.
No branches or pull requests
void CControlUI::SetPos(RECT rc, bool bNeedInvalidate)
{
if( rc.right < rc.left ) rc.right = rc.left;
if( rc.bottom < rc.top ) rc.bottom = rc.top;
The text was updated successfully, but these errors were encountered: