mirror of
https://github.com/SpartanJ/eepp.git
synced 2026-08-18 06:55:48 +03:00
Fixed modal UIWindow.
--HG-- branch : dev
This commit is contained in:
@@ -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();
|
||||
|
||||
@@ -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();
|
||||
|
||||
@@ -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();
|
||||
|
||||
Reference in New Issue
Block a user