| Line | Branch | Exec | Source |
|---|---|---|---|
| 1 | /* | ||
| 2 | ** EPITECH PROJECT, 2024 | ||
| 3 | ** zappy | ||
| 4 | ** File description: | ||
| 5 | ** WinScene | ||
| 6 | */ | ||
| 7 | |||
| 8 | #ifndef WINSCENE_HPP_ | ||
| 9 | #define WINSCENE_HPP_ | ||
| 10 | |||
| 11 | #include <memory> | ||
| 12 | |||
| 13 | #include "IScene.hpp" | ||
| 14 | #include "../ui/Button.hpp" | ||
| 15 | #include "../ui/Input.hpp" | ||
| 16 | #include "../sprites/Sprite.hpp" | ||
| 17 | |||
| 18 | class Core; | ||
| 19 | |||
| 20 | class WinScene : public IScene { | ||
| 21 | public: | ||
| 22 | WinScene(Core *core); | ||
| 23 | ✗ | ~WinScene() { | |
| 24 | |||
| 25 | ✗ | } | |
| 26 | |||
| 27 | ✗ | bool update(sf::Event event, sf::RenderWindow &window) override | |
| 28 | { | ||
| 29 | ✗ | if (_quitButton->update(event, window)) | |
| 30 | ✗ | window.close(); | |
| 31 | ✗ | _homeButton->update(event, window); | |
| 32 | ✗ | return false; | |
| 33 | } | ||
| 34 | |||
| 35 | ✗ | void update(float /*fElapsedTime*/) override | |
| 36 | { | ||
| 37 | |||
| 38 | ✗ | } | |
| 39 | |||
| 40 | void draw(sf::RenderWindow &window) override; | ||
| 41 | |||
| 42 | ✗ | void init() override | |
| 43 | { | ||
| 44 | |||
| 45 | ✗ | } | |
| 46 | |||
| 47 | void getBackHome(); | ||
| 48 | protected: | ||
| 49 | private: | ||
| 50 | Core *_core; | ||
| 51 | std::shared_ptr<Button> _homeButton; | ||
| 52 | std::shared_ptr<Button> _quitButton; | ||
| 53 | sf::Text _text; | ||
| 54 | std::shared_ptr<Sprite> _win; | ||
| 55 | |||
| 56 | }; | ||
| 57 | |||
| 58 | #endif /* !WINSCENE_HPP_ */ | ||
| 59 |