1 | // SuperTux |
2 | // Copyright (C) 2006 Matthias Braun <matze@braunis.de> |
3 | // |
4 | // This program is free software: you can redistribute it and/or modify |
5 | // it under the terms of the GNU General Public License as published by |
6 | // the Free Software Foundation, either version 3 of the License, or |
7 | // (at your option) any later version. |
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 | #ifndef HEADER_SUPERTUX_SUPERTUX_TEXTSCROLLER_SCREEN_HPP |
18 | #define |
19 | |
20 | #include <memory> |
21 | |
22 | #include "supertux/screen.hpp" |
23 | #include "video/color.hpp" |
24 | #include "video/surface_ptr.hpp" |
25 | |
26 | class DrawingContext; |
27 | class InfoBoxLine; |
28 | class TextScroller; |
29 | |
30 | /** |
31 | * Screen that displays intro text, extro text, etc. |
32 | */ |
33 | class TextScrollerScreen final : public Screen |
34 | { |
35 | public: |
36 | TextScrollerScreen(const std::string& file); |
37 | virtual ~TextScrollerScreen(); |
38 | |
39 | virtual void setup() override; |
40 | virtual void draw(Compositor& compositor) override; |
41 | virtual void update(float dt_sec, const Controller& controller) override; |
42 | |
43 | private: |
44 | float m_defaultspeed; |
45 | std::string m_music; |
46 | SurfacePtr m_background; |
47 | std::unique_ptr<TextScroller> m_text_scroller; |
48 | bool m_fading; |
49 | |
50 | private: |
51 | TextScrollerScreen(const TextScrollerScreen&) = delete; |
52 | TextScrollerScreen& operator=(const TextScrollerScreen&) = delete; |
53 | }; |
54 | |
55 | #endif |
56 | |
57 | /* EOF */ |
58 | |