MenuState.hpp 1.5 KB

123456789101112131415161718192021222324252627282930313233343536373839404142434445464748495051525354555657
  1. /**
  2. * Triangles
  3. * Copyright (C) 2016 POSITIVE MENTAL ATTITUDE
  4. *
  5. * This program is free software: you can redistribute it and/or modify
  6. * it under the terms of the GNU General Public License as published by
  7. * the Free Software Foundation, version 3 of the License.
  8. *
  9. * This program is distributed in the hope that it will be useful,
  10. * but WITHOUT ANY WARRANTY; without even the implied warranty of
  11. * MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the
  12. * GNU General Public License for more details.
  13. *
  14. * You should have received a copy of the GNU General Public License
  15. * along with this program. If not, see <http://www.gnu.org/licenses/>.
  16. */
  17. #pragma once
  18. #include <functional>
  19. #include "State.hpp"
  20. #include "Triangle.hpp"
  21. #include "GuiButton.hpp"
  22. class MenuState: public State
  23. {
  24. public:
  25. MenuState();
  26. void init() final;
  27. void refresh() final;
  28. void coreThink(const sf::Event& event) final;
  29. void coreInput() final;
  30. void coreUpdate(sf::Time delta) final;
  31. void coreRender(const bool shaders) final;
  32. private:
  33. enum {
  34. Main = 0, Credits, Settings
  35. };
  36. int _subStatus;
  37. Triangle _crazyTriangles[30];
  38. int _crazyColors[30][4];
  39. GuiTriangle _logo;
  40. GuiTriangle _play;
  41. GuiTriangle _settings;
  42. GuiTriangle _quit;
  43. GuiButton _shaders;
  44. GuiButton _fullscreen;
  45. sf::Text _credits;
  46. sf::RenderTexture _crazy;
  47. sf::RenderTexture _waterMap;
  48. sf::Shader _waterSine;
  49. sf::Shader _waterFrag;
  50. sf::Music _music;
  51. sf::Color _color;
  52. int _padSelection;
  53. };