ba6f4a922ff1671f20b210888024e57f566f1213
[supertux.git] / src / scripting / floating_image.hpp
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_FLOATING_IMAGE_HPP
18 #define HEADER_SUPERTUX_SCRIPTING_FLOATING_IMAGE_HPP
19
20 #ifndef SCRIPTING_API
21 #define HEADER_SUPERTUX_SCRIPTING_FLOATING_IMAGE_HPP
22
23 #include "util/ref.hpp"
24
25 class FloatingImage;
26 typedef FloatingImage _FloatingImage;
27 #endif
28
29 namespace Scripting {
30
31 class FloatingImage
32 {
33 public:
34   FloatingImage(const std::string& spritefile);
35   ~FloatingImage();
36
37   void set_layer(int layer);
38   int get_layer();
39   void set_pos(float x, float y);
40   float get_pos_x();
41   float get_pos_y();
42   void set_anchor_point(int anchor);
43   int get_anchor_point();
44   void set_visible(bool visible);
45   bool get_visible();
46   void set_action(const std::string& action);
47   std::string get_action();
48   void fade_in(float fadetime);
49   void fade_out(float fadetime);
50
51 #ifndef SCRIPTING_API
52 private:
53   Ref<_FloatingImage> floating_image;
54 #endif
55 };
56
57 }
58
59 #endif
60
61 /* EOF */