diff --git a/src/gaming/mapeditor/cmapeditor.cpp b/src/gaming/mapeditor/cmapeditor.cpp index 297135f3c..21460d978 100644 --- a/src/gaming/mapeditor/cmapeditor.cpp +++ b/src/gaming/mapeditor/cmapeditor.cpp @@ -740,7 +740,13 @@ void cMapEditor::MapOpen( const cUIEvent * Event ) { void cMapEditor::MapSave( const cUIEvent * Event ) { cUICommonDialog * CDL = reinterpret_cast ( Event->Ctrl() ); - mUIMap->Map()->Save( CDL->GetFullPath() ); + std::string path( CDL->GetFullPath() ); + + if ( path.substr( path.size() - 4 ) != ".eem" ) { + path += ".eem"; + } + + mUIMap->Map()->Save( path ); } void cMapEditor::FileMenuClick( const cUIEvent * Event ) { diff --git a/src/ui/cuicontrolanim.cpp b/src/ui/cuicontrolanim.cpp index de4004f58..8cc48ff5a 100644 --- a/src/ui/cuicontrolanim.cpp +++ b/src/ui/cuicontrolanim.cpp @@ -79,6 +79,22 @@ void cUIControlAnim::Alpha( const eeFloat& alpha ) { OnAlphaChange(); } +void cUIControlAnim::AlphaChilds( const eeFloat &alpha ) { + cUIControlAnim * AnimChild; + cUIControl * CurChild = mChild; + + while ( NULL != CurChild ) { + if ( CurChild->IsAnimated() ) { + AnimChild = reinterpret_cast ( CurChild ); + + AnimChild->Alpha( alpha ); + AnimChild->AlphaChilds( alpha ); + } + + CurChild = CurChild->NextGet(); + } +} + void cUIControlAnim::MatrixSet() { if ( mScale != 1.f || mAngle != 0.f ) { cGlobalBatchRenderer::instance()->Draw(); diff --git a/src/ui/cuicontrolanim.hpp b/src/ui/cuicontrolanim.hpp index dac233067..dca6f843b 100644 --- a/src/ui/cuicontrolanim.hpp +++ b/src/ui/cuicontrolanim.hpp @@ -31,6 +31,8 @@ class EE_API cUIControlAnim : public cUIDragable { virtual void Alpha( const eeFloat& alpha ); + virtual void AlphaChilds( const eeFloat& alpha ); + bool Animating(); void StartAlphaAnim( const eeFloat& From, const eeFloat& To, const eeFloat& TotalTime, const bool& AlphaChilds = true, const EE_INTERPOLATION& Type = LINEAR, cInterpolation::OnPathEndCallback PathEndCallback = cInterpolation::OnPathEndCallback() ); diff --git a/src/ui/cuilistbox.cpp b/src/ui/cuilistbox.cpp index 27d18d2de..014c28111 100644 --- a/src/ui/cuilistbox.cpp +++ b/src/ui/cuilistbox.cpp @@ -884,7 +884,14 @@ Uint32 cUIListBox::OnMessage( const cUIMessage * Msg ) { } void cUIListBox::OnAlphaChange() { - cUIControlAnim::OnAlphaChange(); + cUIComplexControl::OnAlphaChange(); + + if ( mItems.size() ) { + for ( Uint32 i = mVisibleFirst; i <= mVisibleLast; i++ ) { + if ( NULL != mItems[i] ) + mItems[i]->Alpha( mAlpha ); + } + } mVScrollBar->Alpha( mAlpha ); mHScrollBar->Alpha( mAlpha ); diff --git a/src/ui/cuilistboxitem.cpp b/src/ui/cuilistboxitem.cpp index 458625501..59e577865 100644 --- a/src/ui/cuilistboxitem.cpp +++ b/src/ui/cuilistboxitem.cpp @@ -80,9 +80,6 @@ void cUIListBoxItem::Update() { cUIListBox * LBParent = reinterpret_cast ( Parent()->Parent() ); Uint32 Flags = cUIManager::instance()->GetInput()->ClickTrigger(); - if ( NULL != LBParent && LBParent->Alpha() != mAlpha ) - Alpha( LBParent->Alpha() ); - if ( IsMouseOver() ) { if ( Flags & EE_BUTTONS_WUWD && LBParent->VerticalScrollBar()->Visible() ) { LBParent->VerticalScrollBar()->Slider()->ManageClick( Flags ); diff --git a/src/ui/cuimanager.cpp b/src/ui/cuimanager.cpp index 08b32d3a7..150be768c 100644 --- a/src/ui/cuimanager.cpp +++ b/src/ui/cuimanager.cpp @@ -397,7 +397,7 @@ void cUIManager::AddToCloseQueue( cUIControl * Ctrl ) { } void cUIManager::CheckClose() { - if ( mCloseList.size() ) { + if ( !mCloseList.empty() ) { for ( std::list::iterator it = mCloseList.begin(); it != mCloseList.end(); it++ ) { eeDelete( *it ); }