home *** CD-ROM | disk | FTP | other *** search
/ PC Format (South-Africa) 2001 June / PCFJune.iso / Xenon / XenonSource.exe / xenon / includes / label.h < prev    next >
Encoding:
C/C++ Source or Header  |  2000-07-15  |  1.1 KB  |  57 lines

  1. //-------------------------------------------------------------
  2. //
  3. // Class:    CLabel
  4. //
  5. // Author:    John M Phillips
  6. //
  7. // Started:    06/05/00
  8. //
  9. // Base:    CActor
  10. //
  11. // Derived:    None
  12. //
  13. //-------------------------------------------------------------
  14.  
  15. #ifndef _INCLUDE_LABEL_H
  16. #define _INCLUDE_LABEL_H
  17.  
  18. #include "actor.h"
  19.  
  20. //-------------------------------------------------------------
  21.  
  22. const int LABEL_MAX_SIZE = 40;
  23.  
  24. //-------------------------------------------------------------
  25.  
  26. class CLabel : public CActor
  27. {
  28.     private:
  29.  
  30.         char m_text[LABEL_MAX_SIZE];
  31.         float m_time;
  32.         gsCPoint m_offset;
  33.  
  34.         static gsCFont *m_font;
  35.  
  36.     public:
  37.         CLabel();
  38.         virtual ~CLabel();
  39.         const ActorInfo& getActorInfo() { return ActorInfoList[INFO_LABEL]; };
  40.  
  41.         void onLeavingScreen();
  42.  
  43.         bool activate();
  44.  
  45.         bool update(Controls *controls);
  46.         bool draw();
  47.  
  48.         void __cdecl setText(const char *format,...);
  49.         void setTime(float seconds);
  50.  
  51.         static void setFont(gsCFont *font);
  52. };
  53.  
  54. //-------------------------------------------------------------
  55.  
  56. #endif
  57.