CBattleControlPanel.h 1.6 KB

12345678910111213141516171819202122232425262728293031323334353637383940414243444546474849505152535455565758596061626364
  1. /*
  2. * CBattleControlPanel.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/CIntObject.h"
  12. class CStack;
  13. class CButton;
  14. class CBattleInterface;
  15. class CBattleConsole;
  16. class CBattleControlPanel : public CIntObject
  17. {
  18. CBattleInterface * owner;
  19. std::shared_ptr<CPicture> menu;
  20. std::shared_ptr<CButton> bOptions;
  21. std::shared_ptr<CButton> bSurrender;
  22. std::shared_ptr<CButton> bFlee;
  23. std::shared_ptr<CButton> bAutofight;
  24. std::shared_ptr<CButton> bSpell;
  25. std::shared_ptr<CButton> bWait;
  26. std::shared_ptr<CButton> bDefence;
  27. std::shared_ptr<CButton> bConsoleUp;
  28. std::shared_ptr<CButton> bConsoleDown;
  29. std::shared_ptr<CButton> btactNext;
  30. std::shared_ptr<CButton> btactEnd;
  31. //button handle funcs:
  32. void bOptionsf();
  33. void bSurrenderf();
  34. void bFleef();
  35. void bAutofightf();
  36. void bSpellf();
  37. void bWaitf();
  38. void bDefencef();
  39. void bConsoleUpf();
  40. void bConsoleDownf();
  41. void bTacticNextStack();
  42. void bTacticPhaseEnd();
  43. void reallyFlee(); //performs fleeing without asking player
  44. void reallySurrender(); //performs surrendering without asking player
  45. public:
  46. std::shared_ptr<CBattleConsole> console;
  47. // block all UI elements, e.g. during enemy turn
  48. // unlike activate/deactivate this method will correctly grey-out all elements
  49. void blockUI(bool on);
  50. void tacticPhaseStarted();
  51. void tacticPhaseEnded();
  52. CBattleControlPanel(CBattleInterface * owner);
  53. };