scripting::FloatingImage Class Reference

#include <floating_image.hpp>

List of all members.

Public Member Functions

 FloatingImage (const std::string &spritefile)
 ~FloatingImage ()
void set_layer (int layer)
int get_layer ()
void set_pos (float x, float y)
float get_pos_x ()
float get_pos_y ()
void set_anchor_point (int anchor)
int get_anchor_point ()
void set_visible (bool visible)
bool get_visible ()
void set_action (const std::string &action)
std::string get_action ()
void fade_in (float fadetime)
void fade_out (float fadetime)

Private Attributes

Ref< _FloatingImagefloating_image


Detailed Description

Definition at line 31 of file floating_image.hpp.


Constructor & Destructor Documentation

FloatingImage::FloatingImage ( const std::string &  spritefile  ) 

Definition at line 26 of file floating_image.cpp.

References Sector::add_object(), Sector::current(), and floating_image.

00026                                                         :
00027   floating_image()
00028 {
00029   using namespace worldmap;
00030 
00031   floating_image = new _FloatingImage(spritefile);
00032   if(Sector::current() != NULL) {
00033     Sector::current()->add_object(floating_image.get());
00034   } else if(WorldMap::current() != NULL) {
00035     WorldMap::current()->add_object(floating_image.get());
00036   } else {
00037     throw new std::runtime_error("Neither sector nor worldmap active");
00038   }
00039 }

FloatingImage::~FloatingImage (  ) 

Definition at line 41 of file floating_image.cpp.

00042 {
00043   floating_image->remove_me();
00044 }


Member Function Documentation

void FloatingImage::set_layer ( int  layer  ) 

Definition at line 47 of file floating_image.cpp.

Referenced by scripting::wrapper::FloatingImage_set_layer_wrapper().

00048 {
00049   floating_image->set_layer(layer);
00050 }

int FloatingImage::get_layer (  ) 

Definition at line 53 of file floating_image.cpp.

Referenced by scripting::wrapper::FloatingImage_get_layer_wrapper().

00054 {
00055   return floating_image->get_layer();
00056 }

void FloatingImage::set_pos ( float  x,
float  y 
)

Definition at line 59 of file floating_image.cpp.

Referenced by scripting::wrapper::FloatingImage_set_pos_wrapper().

00060 {
00061   floating_image->set_pos(Vector(x, y));
00062 }

float FloatingImage::get_pos_x (  ) 

Definition at line 65 of file floating_image.cpp.

Referenced by scripting::wrapper::FloatingImage_get_pos_x_wrapper().

00066 {
00067   return floating_image->get_pos().x;
00068 }

float FloatingImage::get_pos_y (  ) 

Definition at line 71 of file floating_image.cpp.

Referenced by scripting::wrapper::FloatingImage_get_pos_y_wrapper().

00072 {
00073   return floating_image->get_pos().y;
00074 }

void FloatingImage::set_anchor_point ( int  anchor  ) 

Definition at line 77 of file floating_image.cpp.

Referenced by scripting::wrapper::FloatingImage_set_anchor_point_wrapper().

00078 {
00079   floating_image->set_anchor_point((AnchorPoint) anchor);
00080 }

int FloatingImage::get_anchor_point (  ) 

Definition at line 83 of file floating_image.cpp.

Referenced by scripting::wrapper::FloatingImage_get_anchor_point_wrapper().

00084 {
00085   return (int) floating_image->get_anchor_point();
00086 }

void FloatingImage::set_visible ( bool  visible  ) 

Definition at line 95 of file floating_image.cpp.

Referenced by scripting::wrapper::FloatingImage_set_visible_wrapper().

00096 {
00097   floating_image->set_visible(visible);
00098 }

bool FloatingImage::get_visible (  ) 

Definition at line 89 of file floating_image.cpp.

Referenced by scripting::wrapper::FloatingImage_get_visible_wrapper().

00090 {
00091   return floating_image->get_visible();
00092 }

void FloatingImage::set_action ( const std::string &  action  ) 

Definition at line 101 of file floating_image.cpp.

Referenced by scripting::wrapper::FloatingImage_set_action_wrapper().

00102 {
00103   floating_image->set_action(action);
00104 }

std::string FloatingImage::get_action (  ) 

Definition at line 107 of file floating_image.cpp.

Referenced by scripting::wrapper::FloatingImage_get_action_wrapper().

00108 {
00109   return floating_image->get_action();
00110 }

void FloatingImage::fade_in ( float  fadetime  ) 

Definition at line 113 of file floating_image.cpp.

Referenced by scripting::wrapper::FloatingImage_fade_in_wrapper().

00114 {
00115   floating_image->fade_in(fadetime);
00116 }

void FloatingImage::fade_out ( float  fadetime  ) 

Definition at line 119 of file floating_image.cpp.

Referenced by scripting::wrapper::FloatingImage_fade_out_wrapper().

00120 {
00121   floating_image->fade_out(fadetime);
00122 }


Member Data Documentation

Ref<_FloatingImage> scripting::FloatingImage::floating_image [private]

Definition at line 53 of file floating_image.hpp.

Referenced by FloatingImage().


The documentation for this class was generated from the following files:
Generated on Mon Jun 9 03:38:40 2014 for SuperTux by  doxygen 1.5.1