4 #include "floating_image.hpp"
6 #include "object/floating_image.hpp"
11 FloatingImage::FloatingImage(const std::string& spritefile)
13 assert(Sector::current() != NULL);
14 floating_image = new _FloatingImage(spritefile);
15 Sector::current()->add_object(floating_image);
18 FloatingImage::~FloatingImage()
20 floating_image->remove_me();
21 // no delete here, Sector will do that
25 FloatingImage::set_layer(int layer)
27 floating_image->set_layer(layer);
31 FloatingImage::get_layer()
33 return floating_image->get_layer();
37 FloatingImage::set_pos(float x, float y)
39 floating_image->set_pos(Vector(x, y));
43 FloatingImage::get_pos_x()
45 return floating_image->get_pos().x;
49 FloatingImage::get_pos_y()
51 return floating_image->get_pos().y;
55 FloatingImage::set_anchor_point(int anchor)
57 floating_image->set_anchor_point((AnchorPoint) anchor);
61 FloatingImage::get_anchor_point()
63 return (int) floating_image->get_anchor_point();
67 FloatingImage::get_visible()
69 return floating_image->get_visible();
73 FloatingImage::set_visible(bool visible)
75 floating_image->set_visible(visible);