SettingsMainWindow.h 1.4 KB

12345678910111213141516171819202122232425262728293031323334353637383940414243444546
  1. /*
  2. * SettingsMainContainer.h, part of VCMI engine
  3. *
  4. * Authors: listed in file AUTHORS in main folder
  5. *
  6. * License: GNU General Public License v2.0 or later
  7. * Full text of license available in license.txt file, in main folder
  8. *
  9. */
  10. #pragma once
  11. #include "gui/InterfaceObjectConfigurable.h"
  12. class BattleInterface;
  13. class CTabbedInt;
  14. enum class EUserEvent;
  15. /// <summary>
  16. ///Original H3 settings were replaced with this window in Github PR #1540. New options added are intended to be clientside settings.
  17. ///By design, most new options that alter gameplay UI from now on should be added to "gameTweaks" config key.
  18. /// </summary>
  19. class SettingsMainWindow : public InterfaceObjectConfigurable
  20. {
  21. private:
  22. BattleInterface * parentBattleInterface;
  23. std::shared_ptr<CTabbedInt> tabContentArea;
  24. std::shared_ptr<CIntObject> createTab(size_t index);
  25. void openTab(size_t index);
  26. void loadGameButtonCallback();
  27. void saveGameButtonCallback();
  28. void quitGameButtonCallback();
  29. void backButtonCallback();
  30. void restartGameButtonCallback();
  31. void mainMenuButtonCallback();
  32. public:
  33. SettingsMainWindow(BattleInterface * parentBattleInterface = nullptr);
  34. void close(); //TODO: copypaste of WindowBase::close(), consider changing Windowbase to IWindowbase with default close() implementation and changing WindowBase inheritance to CIntObject + IWindowBase
  35. void showAll(Canvas & to) override;
  36. void onScreenResize() override;
  37. };