1 //  SuperTux - Sector scripting
2 //  Copyright (C) 2016 Hume2 <teratux.mail@gmail.com>
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_BACKGROUND_HPP
18 #define HEADER_SUPERTUX_SCRIPTING_BACKGROUND_HPP
19 
20 #ifndef SCRIPTING_API
21 #include <string>
22 
23 #include "scripting/game_object.hpp"
24 
25 class Background;
26 #endif
27 
28 namespace scripting {
29 
30 class Background final
31 #ifndef SCRIPTING_API
32   : public GameObject<::Background>
33 #endif
34 {
35 #ifndef SCRIPTING_API
36 public:
37   using GameObject::GameObject;
38 
39 private:
40   Background(const Background&) = delete;
41   Background& operator=(const Background&) = delete;
42 #endif
43 
44 public:
45   void set_image(const std::string& image);
46   void set_images(const std::string& top_image, const std::string& middle_image,
47                              const std::string& bottom_image);
48   void set_speed(float speed);
49 
50   float get_color_red();
51   float get_color_green();
52   float get_color_blue();
53   float get_color_alpha();
54   void set_color(float red, float green, float blue, float alpha);
55   void fade_color(float red, float green, float blue, float alpha, float time);
56 };
57 
58 } // namespace scripting
59 
60 #endif
61 
62 /* EOF */
63