1
0
mirror of https://github.com/vcmi/vcmi.git synced 2025-09-16 09:26:28 +02:00

Missing merge conflict stuff

This commit is contained in:
Dydzio
2023-02-12 12:05:12 +01:00
parent 11df79dc2a
commit 319d05b94f
2 changed files with 7 additions and 6 deletions

View File

@@ -106,7 +106,7 @@ void SettingsMainContainer::close()
void SettingsMainContainer::quitGameButtonCallback()
{
LOCPLINT->showYesNoDialog(CGI->generaltexth->allTexts[578], [this](){ closeAndPushEvent(SDL_USEREVENT, EUserEvent::FORCE_QUIT); }, 0);
LOCPLINT->showYesNoDialog(CGI->generaltexth->allTexts[578], [this](){ closeAndPushEvent(EUserEvent::FORCE_QUIT); }, 0);
}
void SettingsMainContainer::backButtonCallback()
@@ -116,7 +116,7 @@ void SettingsMainContainer::backButtonCallback()
void SettingsMainContainer::mainMenuButtonCallback()
{
LOCPLINT->showYesNoDialog(CGI->generaltexth->allTexts[578], [this](){ closeAndPushEvent(SDL_USEREVENT, EUserEvent::RETURN_TO_MAIN_MENU); }, 0);
LOCPLINT->showYesNoDialog(CGI->generaltexth->allTexts[578], [this](){ closeAndPushEvent(EUserEvent::RETURN_TO_MAIN_MENU); }, 0);
}
void SettingsMainContainer::loadGameButtonCallback()
@@ -133,11 +133,11 @@ void SettingsMainContainer::saveGameButtonCallback()
void SettingsMainContainer::restartGameButtonCallback()
{
LOCPLINT->showYesNoDialog(CGI->generaltexth->allTexts[67], [this](){ closeAndPushEvent(SDL_USEREVENT, EUserEvent::RESTART_GAME); }, 0);
LOCPLINT->showYesNoDialog(CGI->generaltexth->allTexts[67], [this](){ closeAndPushEvent(EUserEvent::RESTART_GAME); }, 0);
}
void SettingsMainContainer::closeAndPushEvent(int eventType, int code)
void SettingsMainContainer::closeAndPushEvent(EUserEvent code)
{
close();
GH.pushSDLEvent(eventType, code);
GH.pushUserEvent(code);
}

View File

@@ -13,6 +13,7 @@
#include "../widgets/ObjectLists.h"
#include "../widgets/Buttons.h"
#include "gui/InterfaceObjectConfigurable.h"
#include "gui/CGuiHandler.h"
class SettingsMainContainer : public InterfaceObjectConfigurable
{
@@ -23,7 +24,7 @@ private:
void openTab(size_t index);
void close(); //TODO: copypaste of WindowBase::close(), consider changing Windowbase to IWindowbase with default close() implementation and changing WindowBase inheritance to CIntObject + IWindowBase
void closeAndPushEvent(int eventType, int code = 0);
void closeAndPushEvent(EUserEvent code);
void loadGameButtonCallback();
void saveGameButtonCallback();