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_SCRIPTING_DISPLAY_EFFECT_HPP
18#define HEADER_SUPERTUX_SCRIPTING_DISPLAY_EFFECT_HPP
19
20#ifndef SCRIPTING_API
21#include "scripting/game_object.hpp"
22
23class DisplayEffect;
24#endif
25
26namespace scripting {
27
28class DisplayEffect final
29#ifndef SCRIPTING_API
30 : public GameObject<::DisplayEffect>
31#endif
32{
33#ifndef SCRIPTING_API
34public:
35 using GameObject::GameObject;
36
37private:
38 DisplayEffect(const DisplayEffect&) = delete;
39 DisplayEffect& operator=(const DisplayEffect&) = delete;
40#endif
41
42public:
43 /// fade display to black
44 void fade_out(float fadetime);
45 /// fade display from black to normal
46 void fade_in(float fadetime);
47 /// set display black (or back to normal)
48 void set_black(bool enabled);
49 /// check if display is set to black
50 bool is_black() const;
51 /// set black borders for cutscenes
52 void sixteen_to_nine(float fadetime);
53 /// deactivate borders
54 void four_to_three(float fadetime);
55
56 // fade display until just a small visible circle is left
57 // (like what happens in some cartoons at the end)
58 // void shrink_fade(const Vector& goal, float radius, float fadetime);
59};
60
61} // namespace scripting
62
63#endif
64
65/* EOF */
66