very early prototype of a spaceshooter in SFML
You can not select more than 25 topics Topics must start with a letter or number, can include dashes ('-') and can be up to 35 characters long.

mainmenu.hpp 603B

1234567891011121314151617181920212223242526
  1. #pragma once
  2. #include <SFML/Graphics.hpp>
  3. #include <SFML/System.hpp>
  4. #include <SFML/Window.hpp>
  5. #include "main.hpp"
  6. namespace Proto4 {
  7. class MainMenu : public sf::Drawable, public sf::Transformable {
  8. public:
  9. bool init(sf::Font &font);
  10. AppState handleKey(const sf::Event &keyEvent);
  11. virtual void draw(sf::RenderTarget &window, sf::RenderStates states) const;
  12. void resize(sf::Event& resizeEvent);
  13. private:
  14. sf::View view{};
  15. sf::Font *font = nullptr;
  16. sf::Text mainLine;
  17. sf::Text entry1;
  18. sf::Text entry2;
  19. };
  20. }