-
-
Notifications
You must be signed in to change notification settings - Fork 388
Commit
This commit does not belong to any branch on this repository, and may belong to a fork outside of the repository.
Add return to main menu and play map buttons to the editor (#9512)
- Loading branch information
Showing
6 changed files
with
104 additions
and
66 deletions.
There are no files selected for viewing
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -1,6 +1,6 @@ | ||
/*************************************************************************** | ||
* fheroes2: https://github.com/ihhub/fheroes2 * | ||
* Copyright (C) 2019 - 2024 * | ||
* Copyright (C) 2019 - 2025 * | ||
* * | ||
* Free Heroes2 Engine: http://sourceforge.net/projects/fheroes2 * | ||
* Copyright (C) 2009 by Andrey Afletdinov <[email protected]> * | ||
|
@@ -29,13 +29,11 @@ | |
#include "game_interface.h" | ||
#include "game_mode.h" | ||
#include "icn.h" | ||
#include "image.h" | ||
#include "localevent.h" | ||
#include "screen.h" | ||
#include "settings.h" | ||
#include "translations.h" | ||
#include "ui_button.h" | ||
#include "ui_constants.h" | ||
#include "ui_dialog.h" | ||
#include "ui_window.h" | ||
|
||
|
@@ -48,13 +46,6 @@ namespace | |
|
||
fheroes2::Display & display = fheroes2::Display::instance(); | ||
|
||
const int32_t totalDialogWidth = 337; | ||
const int32_t totalDialogHeight = 252; | ||
|
||
// Prepare restorer of the adventure map when save feedback dialog is shown. | ||
fheroes2::ImageRestorer back( display, ( display.width() - totalDialogWidth - fheroes2::borderWidthPx ) / 2, | ||
( display.height() - totalDialogHeight + fheroes2::borderWidthPx ) / 2, totalDialogWidth, totalDialogHeight ); | ||
|
||
fheroes2::StandardWindow background( 289, 204, true, display ); | ||
|
||
fheroes2::Button buttonNew; | ||
|
@@ -107,7 +98,7 @@ namespace | |
} | ||
else if ( le.MouseClickLeft( buttonSave.area() ) || Game::HotKeyPressEvent( Game::HotKeyEvent::WORLD_SAVE_GAME ) ) { | ||
// Special case: since we show a window about file saving we don't want to display the current dialog anymore. | ||
back.restore(); | ||
background.hideWindow(); | ||
|
||
return Interface::AdventureMap::Get().EventSaveGame(); | ||
} | ||
|
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters