Пример #1
0
VOID CUIWindowItem::Show(BOOL bShow)
{
	if(bShow == m_bShow || !m_pWindow) return;
			
	//显示
	if(bShow)
	{
		g_pSoundSystem->PlayUISoundDirect( m_nIDOpenWindow );
		m_pWindow->show();
		//如果看不见,那么自动归位
		if( !m_pWindow->isCanVisible() )
		{
			OnSizeChange();
		}
		m_pWindow->activate();
	}
	else
	{
		g_pSoundSystem->PlayUISoundDirect( m_nIDCloseWindow );
		m_pWindow->hide();

		//响应窗口关闭时一些附加处理
		onWindowHidden();
	}

	//防止屏幕闪烁
	CUIWindowMng::GetClientScreen()->requestRedraw();
	
	m_bShow = bShow;
	// 禅让窗口,无论显示还是关闭窗口,都需要进行禅让窗口更新
}
Пример #2
0
void LogPosCtrl::OnReject()
{
	push = false;
	Ctrl::LogPos _pos = lc.Get();
	if(pos != _pos) {
		pos = _pos;
		OnSizeChange(); //restore
		UpdateAction();
	}
}
Пример #3
0
void cUIMenuSubMenu::OnStateChange() {
	cUIMenuItem::OnStateChange();

	if ( NULL != mSkinArrow ) {
		if ( mSkinState->GetState() == cUISkinState::StateSelected )
			mArrow->SubTexture( mSkinArrow->GetSubTexture( cUISkinState::StateMouseEnter ) );
		else
			mArrow->SubTexture( mSkinArrow->GetSubTexture( cUISkinState::StateNormal ) );

		OnSizeChange();
	}
}
Пример #4
0
void cUIControl::Size( const eeSize& Size ) {
	if ( Size != mSize ) {
		eeVector2i sizeChange( Size.x - mSize.x, Size.y - mSize.y );

		mSize = Size;

		OnSizeChange();

		if ( mFlags & UI_REPORT_SIZE_CHANGE_TO_CHILDS ) {
			SendParentSizeChange( sizeChange );
		}
	}
}
Пример #5
0
cUIMenu::cUIMenu( cUIMenu::CreateParams& Params ) :
	cUIComplexControl( Params ),
	mPadding( Params.PaddingContainer ),
	mFont( Params.Font ),
	mFontColor( Params.FontColor ),
	mFontShadowColor( Params.FontShadowColor ),
	mFontOverColor( Params.FontOverColor ),
	mFontSelectedColor( Params.FontSelectedColor ),
	mMinWidth( Params.MinWidth ),
	mMinSpaceForIcons( Params.MinSpaceForIcons ),
	mMinRightMargin( Params.MinRightMargin ),
	mMaxWidth( 0 ),
	mRowHeight( Params.RowHeight ),
	mNextPosY( 0 ),
	mBiggestIcon( mMinSpaceForIcons ),
	mItemSelected( NULL ),
	mItemSelectedIndex( eeINDEX_NOT_FOUND ),
	mClickHide( false ),
	mLastTickMove( 0 )
{
	OnSizeChange();

	ApplyDefaultTheme();
}
Пример #6
0
void cUIMenu::DoAfterSetTheme() {
	AutoPadding();

	OnSizeChange();
}