| 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_GRADIENT_HPP |
| 18 | #define |
| 19 | |
| 20 | #ifndef SCRIPTING_API |
| 21 | #include <string> |
| 22 | |
| 23 | #include "scripting/game_object.hpp" |
| 24 | |
| 25 | class Gradient; |
| 26 | #endif |
| 27 | |
| 28 | namespace scripting { |
| 29 | |
| 30 | class Gradient final |
| 31 | #ifndef SCRIPTING_API |
| 32 | : public GameObject<::Gradient> |
| 33 | #endif |
| 34 | { |
| 35 | #ifndef SCRIPTING_API |
| 36 | private: |
| 37 | using GameObject::GameObject; |
| 38 | |
| 39 | private: |
| 40 | Gradient(const Gradient&) = delete; |
| 41 | Gradient& operator=(const Gradient&) = delete; |
| 42 | #endif |
| 43 | |
| 44 | public: |
| 45 | void set_direction(const std::string& direction); |
| 46 | std::string get_direction() const; |
| 47 | |
| 48 | void set_color1(float red, float green, float blue); |
| 49 | void set_color2(float red, float green, float blue); |
| 50 | |
| 51 | void swap_colors(); |
| 52 | }; |
| 53 | |
| 54 | } // namespace scripting |
| 55 | |
| 56 | #endif |
| 57 | |
| 58 | /* EOF */ |
| 59 | |