supertux
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 #include <memory>
22 
23 class FloatingImage;
24 
25 #include "scripting/game_object.hpp"
26 #endif
27 
28 namespace scripting {
29 
30 class FloatingImage final
31 #ifndef SCRIPTING_API
32  : public GameObject<::FloatingImage>
33 #endif
34 {
35 public:
36  FloatingImage(const std::string& spritefile);
37 
42  void set_layer(int layer);
46  int get_layer() const;
52  void set_pos(float x, float y);
56  float get_pos_x() const;
60  float get_pos_y() const;
65  void set_anchor_point(int anchor);
69  int get_anchor_point() const;
74  void set_visible(bool visible);
78  bool get_visible() const;
84  void set_action(const std::string& action);
90  std::string get_action() const;
91  void fade_in(float fadetime);
92  void fade_out(float fadetime);
93 
94 #ifndef SCRIPTING_API
95 private:
96  FloatingImage(const FloatingImage&) = delete;
97  FloatingImage& operator=(const FloatingImage&) = delete;
98 #endif
99 };
100 
101 } // namespace scripting
102 
103 #endif
104 
105 /* EOF */
void set_layer(int layer)
Sets the layer of the floating image.
Definition: floating_image.cpp:32
WARNING: This file is automatically generated from: &#39;src/scripting/wrapper.interface.hpp&#39; DO NOT CHANGE.
Definition: ambient_sound.cpp:21
float get_pos_y() const
Returns the image&#39;s Y coordinate relative to the current anchor point.
Definition: floating_image.cpp:60
Definition: game_object.hpp:60
int get_layer() const
Returns the layer the floating image is on.
Definition: floating_image.cpp:39
std::string get_action() const
Returns the action of the image This is only useful when the image is a sprite.
Definition: floating_image.cpp:102
void set_pos(float x, float y)
Sets the location of the image, in relation to the current anchor point.
Definition: floating_image.cpp:46
Definition: floating_image.hpp:24
void set_anchor_point(int anchor)
Sets the image&#39;s anchor point.
Definition: floating_image.cpp:67
int get_anchor_point() const
Returns the current anchor point.
Definition: floating_image.cpp:74
void set_action(const std::string &action)
Sets the action of the image This is only useful when the image is a sprite.
Definition: floating_image.cpp:95
Definition: floating_image.hpp:30
void set_visible(bool visible)
Sets the visibility of the floating image.
Definition: floating_image.cpp:88
float get_pos_x() const
Returns the image&#39;s X coordinate relative to the current anchor point.
Definition: floating_image.cpp:53
bool get_visible() const
Returns the visibility state of the floating image.
Definition: floating_image.cpp:81