mirror of
https://github.com/SpartanJ/eepp.git
synced 2026-08-11 01:01:25 +03:00
Fixed fadein for listbox.
Added AlphaChilds method to animated controls. Auto add map extension to maps.
This commit is contained in:
@@ -740,7 +740,13 @@ void cMapEditor::MapOpen( const cUIEvent * Event ) {
|
||||
void cMapEditor::MapSave( const cUIEvent * Event ) {
|
||||
cUICommonDialog * CDL = reinterpret_cast<cUICommonDialog*> ( 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 ) {
|
||||
|
||||
@@ -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<cUIControlAnim*> ( CurChild );
|
||||
|
||||
AnimChild->Alpha( alpha );
|
||||
AnimChild->AlphaChilds( alpha );
|
||||
}
|
||||
|
||||
CurChild = CurChild->NextGet();
|
||||
}
|
||||
}
|
||||
|
||||
void cUIControlAnim::MatrixSet() {
|
||||
if ( mScale != 1.f || mAngle != 0.f ) {
|
||||
cGlobalBatchRenderer::instance()->Draw();
|
||||
|
||||
@@ -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() );
|
||||
|
||||
@@ -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 );
|
||||
|
||||
@@ -80,9 +80,6 @@ void cUIListBoxItem::Update() {
|
||||
cUIListBox * LBParent = reinterpret_cast<cUIListBox*> ( 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 );
|
||||
|
||||
@@ -397,7 +397,7 @@ void cUIManager::AddToCloseQueue( cUIControl * Ctrl ) {
|
||||
}
|
||||
|
||||
void cUIManager::CheckClose() {
|
||||
if ( mCloseList.size() ) {
|
||||
if ( !mCloseList.empty() ) {
|
||||
for ( std::list<cUIControl*>::iterator it = mCloseList.begin(); it != mCloseList.end(); it++ ) {
|
||||
eeDelete( *it );
|
||||
}
|
||||
|
||||
Reference in New Issue
Block a user