Breaking change: Event::MsgBoxConfirmClick renamed Event::OnConfirm and Event::MsgBoxCancelClick to Event::OnCancel. To be more generic for new components.
ecode:
Refactor, moved all the menues creation into a new class. Added more global commands (for a future command pallete).
This commit is contained in:
Martín Lucas Golini
2023-01-19 21:15:59 -03:00
parent 27d1b97acb
commit 4edfa15e52
17 changed files with 1887 additions and 1714 deletions

View File

@@ -1155,8 +1155,7 @@ void MapEditor::fileMenuClick( const Event* Event ) {
UIMessageBox* 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( this, &MapEditor::onMapClose ) );
MsgBox->addEventListener( Event::OnConfirm, cb::Make1( this, &MapEditor::onMapClose ) );
MsgBox->setTitle( "Close Map?" );
MsgBox->center();
MsgBox->show();
@@ -1268,7 +1267,7 @@ void MapEditor::mapMenuClick( const Event* Event ) {
UIWindow* tWin = UIWindow::New();
tWin->setSizeWithDecoration( 1024, 768 );
tWin->setWindowFlags( UI_WIN_DEFAULT_FLAGS | UI_WIN_MAXIMIZE_BUTTON |
UI_WIN_DRAGABLE_CONTAINER );
UI_WIN_DRAGABLE_CONTAINER );
tWin->setMinWindowSize( 1024, 768 );
eeNew( Tools::TextureAtlasEditor, ( tWin ) );