Fixed modal UIWindow.

--HG--
branch : dev
This commit is contained in:
Martín Lucas Golini
2019-12-17 02:18:58 -03:00
parent 8d902cbb46
commit 7caa7e8b55
6 changed files with 14 additions and 13 deletions

View File

@@ -7,8 +7,8 @@ MapEditor * Editor = NULL;
bool onCloseRequestCallback( EE::Window::Window * w ) {
if ( NULL != Editor ) {
MsgBox = UIMessageBox::New( UIMessageBox::OK_CANCEL, "Do you really want to close the current map?\nAll changes will be lost." );
MsgBox->addEventListener( Event::MsgBoxConfirmClick, cb::Make1<void, const Event*>( []( const Event * event ) { win->close(); } ) );
MsgBox->addEventListener( Event::OnClose, cb::Make1<void, const Event*>( []( const Event * event ) { MsgBox = NULL; } ) );
MsgBox->addEventListener( Event::MsgBoxConfirmClick, []( const Event * event ) { win->close(); } );
MsgBox->addEventListener( Event::OnClose, []( const Event * event ) { MsgBox = NULL; } );
MsgBox->setTitle( "Close Map?" );
MsgBox->center();
MsgBox->show();

View File

@@ -7,8 +7,8 @@ TextureAtlasEditor * Editor = NULL;
bool onCloseRequestCallback( EE::Window::Window * w ) {
if ( NULL != Editor && Editor->isEdited() ) {
MsgBox = UIMessageBox::New( UIMessageBox::OK_CANCEL, "Do you really want to close the texture atlas editor?\nAll changes will be lost." );
MsgBox->addEventListener( Event::MsgBoxConfirmClick, cb::Make1<void, const Event*>( []( const Event * event ) { win->close(); } ) );
MsgBox->addEventListener( Event::OnClose, cb::Make1<void, const Event*>( []( const Event * event ) { MsgBox = NULL; } ) );
MsgBox->addEventListener( Event::MsgBoxConfirmClick, []( const Event * event ) { win->close(); } );
MsgBox->addEventListener( Event::OnClose, []( const Event * event ) { MsgBox = NULL; } );
MsgBox->setTitle( "Close Texture Atlas Editor?" );
MsgBox->center();
MsgBox->show();

View File

@@ -695,8 +695,8 @@ bool onCloseRequestCallback( EE::Window::Window * ) {
MsgBox = UIMessageBox::New( UIMessageBox::OK_CANCEL, "Do you really want to close the current file?\nAll changes will be lost." );
MsgBox->setTheme( theme );
MsgBox->addEventListener( Event::MsgBoxConfirmClick, cb::Make1<void, const Event*>( []( const Event * ) { window->close(); } ) );
MsgBox->addEventListener( Event::OnClose, cb::Make1<void, const Event*>( []( const Event * ) { MsgBox = NULL; } ) );
MsgBox->addEventListener( Event::MsgBoxConfirmClick, []( const Event * ) { window->close(); } );
MsgBox->addEventListener( Event::OnClose, []( const Event * ) { MsgBox = NULL; } );
MsgBox->setTitle( "Close Editor?" );
MsgBox->center();
MsgBox->show();