mirror of
https://github.com/vcmi/vcmi.git
synced 2024-11-24 08:32:34 +02:00
Rename settings files
This commit is contained in:
parent
7137329e80
commit
6bd4eac27a
@ -92,8 +92,8 @@ set(client_SRCS
|
||||
windows/InfoWindows.cpp
|
||||
windows/QuickRecruitmentWindow.cpp
|
||||
windows/settings/GeneralOptionsTab.cpp
|
||||
windows/settings/OtherOptionsWindow.cpp
|
||||
windows/settings/SettingsMainContainer.cpp
|
||||
windows/settings/OtherOptionsTab.cpp
|
||||
windows/settings/SettingsMainWindow.cpp
|
||||
windows/settings/BattleOptionsTab.cpp
|
||||
windows/settings/AdventureOptionsTab.cpp
|
||||
|
||||
@ -209,8 +209,8 @@ set(client_HEADERS
|
||||
windows/InfoWindows.h
|
||||
windows/QuickRecruitmentWindow.h
|
||||
windows/settings/GeneralOptionsTab.h
|
||||
windows/settings/OtherOptionsWindow.h
|
||||
windows/settings/SettingsMainContainer.h
|
||||
windows/settings/OtherOptionsTab.h
|
||||
windows/settings/SettingsMainWindow.h
|
||||
windows/settings/BattleOptionsTab.h
|
||||
windows/settings/AdventureOptionsTab.h
|
||||
|
||||
|
@ -35,7 +35,7 @@
|
||||
#include "../gui/CGuiHandler.h"
|
||||
#include "../widgets/TextControls.h"
|
||||
#include "../widgets/Buttons.h"
|
||||
#include "../windows/settings/SettingsMainContainer.h"
|
||||
#include "../windows/settings/SettingsMainWindow.h"
|
||||
#include "../CMT.h"
|
||||
|
||||
#include "../../CCallback.h"
|
||||
@ -347,7 +347,7 @@ void CAdvMapInt::fadventureOPtions()
|
||||
|
||||
void CAdvMapInt::fsystemOptions()
|
||||
{
|
||||
GH.pushIntT<SettingsMainContainer>();
|
||||
GH.pushIntT<SettingsMainWindow>();
|
||||
}
|
||||
|
||||
void CAdvMapInt::fnextHero()
|
||||
|
@ -35,7 +35,7 @@
|
||||
#include "../../lib/CStack.h"
|
||||
#include "../../lib/CConfigHandler.h"
|
||||
#include "../../lib/filesystem/ResourceID.h"
|
||||
#include "../windows/settings/SettingsMainContainer.h"
|
||||
#include "../windows/settings/SettingsMainWindow.h"
|
||||
|
||||
BattleWindow::BattleWindow(BattleInterface & owner):
|
||||
owner(owner)
|
||||
@ -245,7 +245,7 @@ void BattleWindow::bOptionsf()
|
||||
|
||||
CCS->curh->set(Cursor::Map::POINTER);
|
||||
|
||||
GH.pushIntT<SettingsMainContainer>(&owner);
|
||||
GH.pushIntT<SettingsMainWindow>(&owner);
|
||||
}
|
||||
|
||||
void BattleWindow::bSurrenderf()
|
||||
|
@ -9,7 +9,7 @@
|
||||
*/
|
||||
#include "StdInc.h"
|
||||
|
||||
#include "OtherOptionsWindow.h"
|
||||
#include "OtherOptionsTab.h"
|
||||
|
||||
#include "../../../lib/filesystem/ResourceID.h"
|
||||
#include "../../gui/CGuiHandler.h"
|
||||
@ -22,7 +22,7 @@ static void setBoolSetting(std::string group, std::string field, bool value)
|
||||
fullscreen->Bool() = value;
|
||||
}
|
||||
|
||||
OtherOptionsWindow::OtherOptionsWindow() : InterfaceObjectConfigurable()
|
||||
OtherOptionsTab::OtherOptionsTab() : InterfaceObjectConfigurable()
|
||||
{
|
||||
OBJ_CONSTRUCTION_CAPTURING_ALL_NO_DISPOSE;
|
||||
|
@ -11,10 +11,10 @@
|
||||
|
||||
#include "../../gui/InterfaceObjectConfigurable.h"
|
||||
|
||||
class OtherOptionsWindow : public InterfaceObjectConfigurable
|
||||
class OtherOptionsTab : public InterfaceObjectConfigurable
|
||||
{
|
||||
private:
|
||||
|
||||
public:
|
||||
OtherOptionsWindow();
|
||||
OtherOptionsTab();
|
||||
};
|
@ -11,12 +11,12 @@
|
||||
#include <SDL_events.h>
|
||||
#include "StdInc.h"
|
||||
|
||||
#include "SettingsMainContainer.h"
|
||||
#include "SettingsMainWindow.h"
|
||||
|
||||
#include "GeneralOptionsTab.h"
|
||||
#include "AdventureOptionsTab.h"
|
||||
#include "BattleOptionsTab.h"
|
||||
#include "OtherOptionsWindow.h"
|
||||
#include "OtherOptionsTab.h"
|
||||
|
||||
#include "filesystem/ResourceID.h"
|
||||
#include "CGeneralTextHandler.h"
|
||||
@ -30,7 +30,7 @@
|
||||
#include "CServerHandler.h"
|
||||
|
||||
|
||||
SettingsMainContainer::SettingsMainContainer(BattleInterface * parentBattleUi) : InterfaceObjectConfigurable()
|
||||
SettingsMainWindow::SettingsMainWindow(BattleInterface * parentBattleUi) : InterfaceObjectConfigurable()
|
||||
{
|
||||
OBJ_CONSTRUCTION_CAPTURING_ALL_NO_DISPOSE;
|
||||
|
||||
@ -72,13 +72,13 @@ SettingsMainContainer::SettingsMainContainer(BattleInterface * parentBattleUi) :
|
||||
defaultTabIndex = settings["general"]["lastSettingsTab"].Integer();
|
||||
|
||||
parentBattleInterface = parentBattleUi;
|
||||
tabContentArea = std::make_shared<CTabbedInt>(std::bind(&SettingsMainContainer::createTab, this, _1), Point(0, 40), defaultTabIndex);
|
||||
tabContentArea = std::make_shared<CTabbedInt>(std::bind(&SettingsMainWindow::createTab, this, _1), Point(0, 40), defaultTabIndex);
|
||||
|
||||
std::shared_ptr<CToggleGroup> mainTabs = widget<CToggleGroup>("settingsTabs");
|
||||
mainTabs->setSelected(defaultTabIndex);
|
||||
}
|
||||
|
||||
std::shared_ptr<CIntObject> SettingsMainContainer::createTab(size_t index)
|
||||
std::shared_ptr<CIntObject> SettingsMainWindow::createTab(size_t index)
|
||||
{
|
||||
switch(index)
|
||||
{
|
||||
@ -89,14 +89,14 @@ std::shared_ptr<CIntObject> SettingsMainContainer::createTab(size_t index)
|
||||
case 2:
|
||||
return std::make_shared<BattleOptionsTab>(parentBattleInterface);
|
||||
case 3:
|
||||
return std::make_shared<OtherOptionsWindow>();
|
||||
return std::make_shared<OtherOptionsTab>();
|
||||
default:
|
||||
logGlobal->error("Wrong settings tab ID!");
|
||||
return std::make_shared<GeneralOptionsTab>();
|
||||
}
|
||||
}
|
||||
|
||||
void SettingsMainContainer::openTab(size_t index)
|
||||
void SettingsMainWindow::openTab(size_t index)
|
||||
{
|
||||
tabContentArea->setActive(index);
|
||||
CIntObject::redraw();
|
||||
@ -105,46 +105,46 @@ void SettingsMainContainer::openTab(size_t index)
|
||||
lastUsedTab->Integer() = index;
|
||||
}
|
||||
|
||||
void SettingsMainContainer::close()
|
||||
void SettingsMainWindow::close()
|
||||
{
|
||||
if(GH.topInt().get() != this)
|
||||
logGlobal->error("Only top interface must be closed");
|
||||
GH.popInts(1);
|
||||
}
|
||||
|
||||
void SettingsMainContainer::quitGameButtonCallback()
|
||||
void SettingsMainWindow::quitGameButtonCallback()
|
||||
{
|
||||
LOCPLINT->showYesNoDialog(CGI->generaltexth->allTexts[578], [this](){ closeAndPushEvent(EUserEvent::FORCE_QUIT); }, 0);
|
||||
}
|
||||
|
||||
void SettingsMainContainer::backButtonCallback()
|
||||
void SettingsMainWindow::backButtonCallback()
|
||||
{
|
||||
close();
|
||||
}
|
||||
|
||||
void SettingsMainContainer::mainMenuButtonCallback()
|
||||
void SettingsMainWindow::mainMenuButtonCallback()
|
||||
{
|
||||
LOCPLINT->showYesNoDialog(CGI->generaltexth->allTexts[578], [this](){ closeAndPushEvent(EUserEvent::RETURN_TO_MAIN_MENU); }, 0);
|
||||
}
|
||||
|
||||
void SettingsMainContainer::loadGameButtonCallback()
|
||||
void SettingsMainWindow::loadGameButtonCallback()
|
||||
{
|
||||
close();
|
||||
LOCPLINT->proposeLoadingGame();
|
||||
}
|
||||
|
||||
void SettingsMainContainer::saveGameButtonCallback()
|
||||
void SettingsMainWindow::saveGameButtonCallback()
|
||||
{
|
||||
close();
|
||||
GH.pushIntT<CSavingScreen>();
|
||||
}
|
||||
|
||||
void SettingsMainContainer::restartGameButtonCallback()
|
||||
void SettingsMainWindow::restartGameButtonCallback()
|
||||
{
|
||||
LOCPLINT->showYesNoDialog(CGI->generaltexth->allTexts[67], [this](){ closeAndPushEvent(EUserEvent::RESTART_GAME); }, 0);
|
||||
}
|
||||
|
||||
void SettingsMainContainer::closeAndPushEvent(EUserEvent code)
|
||||
void SettingsMainWindow::closeAndPushEvent(EUserEvent code)
|
||||
{
|
||||
close();
|
||||
GH.pushUserEvent(code);
|
@ -16,7 +16,7 @@ class BattleInterface;
|
||||
class CTabbedInt;
|
||||
enum class EUserEvent;
|
||||
|
||||
class SettingsMainContainer : public InterfaceObjectConfigurable
|
||||
class SettingsMainWindow : public InterfaceObjectConfigurable
|
||||
{
|
||||
private:
|
||||
BattleInterface * parentBattleInterface;
|
||||
@ -35,6 +35,6 @@ private:
|
||||
void restartGameButtonCallback();
|
||||
void mainMenuButtonCallback();
|
||||
public:
|
||||
SettingsMainContainer(BattleInterface * parentBattleInterface = nullptr);
|
||||
SettingsMainWindow(BattleInterface * parentBattleInterface = nullptr);
|
||||
};
|
||||
|
Loading…
Reference in New Issue
Block a user