Vegastrike 0.5.1 rc1  1.0
Original sources for Vegastrike Evolved
 All Classes Namespaces Files Functions Variables Typedefs Enumerations Enumerator Friends Macros Groups Pages
BaseInterface::Room::Comp Class Reference

#include <base.h>

Inheritance diagram for BaseInterface::Room::Comp:
BaseInterface::Room::Link

Public Member Functions

virtual void Click (::BaseInterface *base, float x, float y, int button, int state)
 
virtual ~Comp ()
 
 Comp (const std::string &ind, const std::string &pythonfile)
 

Public Attributes

vector< BaseComputer::DisplayModemodes
 

Additional Inherited Members

Detailed Description

Definition at line 86 of file base.h.

Constructor & Destructor Documentation

virtual BaseInterface::Room::Comp::~Comp ( )
inlinevirtual

Definition at line 91 of file base.h.

91 {}
BaseInterface::Room::Comp::Comp ( const std::string &  ind,
const std::string &  pythonfile 
)
inlineexplicit

Definition at line 92 of file base.h.

92 : Link( ind, pythonfile ) {}

Member Function Documentation

void BaseInterface::Room::Comp::Click ( ::BaseInterface base,
float  x,
float  y,
int  button,
int  state 
)
virtual

Reimplemented from BaseInterface::Room::Link.

Definition at line 1166 of file base_interface.cpp.

References BaseInterface::baseun, BaseInterface::CallComp, BaseInterface::caller, BaseInterface::Room::Link::Click(), UnitContainer::GetUnit(), BaseComputer::init(), modes, BaseComputer::run(), and WS_MOUSE_UP.

1167 {
1168  if (state == WS_MOUSE_UP) {
1169  Link::Click( base, x, y, button, state );
1170  Unit *un = base->caller.GetUnit();
1171  Unit *baseun = base->baseun.GetUnit();
1172  if (un && baseun) {
1173  base->CallComp = true;
1174 #ifdef NEW_GUI
1175  BaseComputer *bc = new BaseComputer( un, baseun, modes );
1176  bc->init();
1177  bc->run();
1178 #else
1179  UpgradeCompInterface( un, baseun, modes );
1180 #endif //NEW_GUI
1181  }
1182  }
1183 }

Member Data Documentation

vector< BaseComputer::DisplayMode > BaseInterface::Room::Comp::modes

Definition at line 89 of file base.h.

Referenced by Click(), and BaseUtil::CompPython().


The documentation for this class was generated from the following files: