3 #include "floating_image.hpp"
5 #include "object/floating_image.hpp"
10 FloatingImage::FloatingImage(const std::string& spritefile)
12 assert(Sector::current() != NULL);
13 floating_image = new _FloatingImage(spritefile);
14 Sector::current()->add_object(floating_image);
17 FloatingImage::~FloatingImage()
19 floating_image->remove_me();
20 // no delete here, Sector will do that
24 FloatingImage::set_layer(int layer)
26 floating_image->set_layer(layer);
30 FloatingImage::get_layer()
32 return floating_image->get_layer();
36 FloatingImage::set_pos(float x, float y)
38 floating_image->set_pos(Vector(x, y));
42 FloatingImage::get_pos_x()
44 return floating_image->get_pos().x;
48 FloatingImage::get_pos_y()
50 return floating_image->get_pos().y;
54 FloatingImage::set_anchor_point(int anchor)
56 floating_image->set_anchor_point((AnchorPoint) anchor);
60 FloatingImage::get_anchor_point()
62 return (int) floating_image->get_anchor_point();
66 FloatingImage::get_visible()
68 return floating_image->get_visible();
72 FloatingImage::set_visible(bool visible)
74 floating_image->set_visible(visible);