~robot3d-team/robot3d/trunk

« back to all changes in this revision

Viewing changes to inc/srCore/simulationRobotSelectionComponent.h

  • Committer: Anne van Rossum
  • Date: 2010-08-10 15:58:55 UTC
  • Revision ID: anne@gamix-20100810155855-kve7x2vwouagdij9
Initial import

Show diffs side-by-side

added added

removed removed

Lines of Context:
 
1
/*
 
2
 * Component for robot selection
 
3
 *
 
4
 * @author Adrian Friebel
 
5
 */
 
6
 
 
7
#ifndef SIMULATIONROBOTSELECTIONCOMPONENT_H_
 
8
#define SIMULATIONROBOTSELECTIONCOMPONENT_H_
 
9
 
 
10
// Delta3D files
 
11
#include <dtGame/gmcomponent.h>
 
12
#include <dtDAL/gameeventmanager.h>
 
13
 
 
14
// Robot3D files
 
15
#include <srCore/export.h>
 
16
 
 
17
/**
 
18
 * Makes it possible to select a robot in the GUI.
 
19
 */
 
20
class ROBOT_EXPORT SimulationRobotSelectionComponent : public dtGame::GMComponent
 
21
{
 
22
   public:
 
23
          SimulationRobotSelectionComponent(const std::string &name, int robFoc);
 
24
      void ProcessMessage(const dtGame::Message &message);
 
25
      void init();
 
26
      
 
27
      int getRobFocIndex() {return robotFocusIndex; };
 
28
      
 
29
 
 
30
   protected:
 
31
      virtual ~SimulationRobotSelectionComponent() { }
 
32
 
 
33
   private:
 
34
      void sendMessageToAll(dtDAL::GameEvent &event);
 
35
 
 
36
      dtCore::RefPtr<dtDAL::GameEvent> mFocusChanged;
 
37
 
 
38
      int robotFocus;
 
39
 
 
40
      int robotFocusIndex;
 
41
};
 
42
 
 
43
#endif /*SIMULATIONROBOTSELECTIONCOMPONENT_H_*/