Planet
navi homePPSaboutscreenshotsdownloaddevelopmentforum

Changeset 4856 in orxonox.OLD for orxonox/trunk/src/lib/graphics/text_engine.h


Ignore:
Timestamp:
Jul 14, 2005, 12:15:38 AM (19 years ago)
Author:
bensch
Message:

orxonox/trunk: text renders as good as before, but now as Element2D

File:
1 edited

Legend:

Unmodified
Added
Removed
  • orxonox/trunk/src/lib/graphics/text_engine.h

    r4850 r4856  
    3636template<class T> class tList;
    3737
    38 //! An enumerator for the text alignment.
    39  enum TEXT_ALIGNMENT
    40 {
    41   TEXT_ALIGN_LEFT,
    42   TEXT_ALIGN_RIGHT,
    43   TEXT_ALIGN_CENTER,
    44   TEXT_ALIGN_SCREEN_CENTER
    45 };
     38#define  TEXT_ALIGN_LEFT             E2D_ALIGN_LEFT
     39#define  TEXT_ALIGN_RIGHT            E2D_ALIGN_RIGHT
     40#define  TEXT_ALIGN_CENTER           E2D_ALIGN_CENTER
     41#define  TEXT_ALIGN_SCREEN_CENTER    E2D_ALIGN_SCREEN_CENTER
    4642
    4743/* some default values */
     
    114110  void setType(int type);
    115111  void setText(const char* text);
    116   void setPosition(int x, int y);
    117   void setAlignment(TEXT_ALIGNMENT alignment);
    118112  /** @param blending the blending intensity to set (between 0.0 and 1.0) */
    119   inline void setBlending(float blending) {this->blending = blending;}
     113  inline void setBlending(float blending) { this->blending = blending; };
    120114
    121115  // Static Text
     
    140134  char*             text;           //!< The text to display
    141135  SDL_Color         color;          //!< The color of the font.
    142   TEXT_ALIGNMENT    alignment;      //!< The aignment of the text.
    143136  float             blending;       //!< The blending intensity.
    144137
     
    228221  void flush();
    229222
    230   void draw() const;
    231 
    232223  void debug() const;
    233224
     
    243234 private:
    244235  //  tList<Font>* fontList;
    245   tList<Text>*       textList;      //!< a list of all texts of the textEngine
     236  tList<Text>*       textList;      //!< a list of all texts registered to the textEngine @todo this is overhead, do we need this??
    246237
    247238};
Note: See TracChangeset for help on using the changeset viewer.