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
TextPlane Class Reference

#include <hud.h>

Public Member Functions

 TextPlane (const struct GFXColor &col=GFXColor(1, 1, 1, 1), const struct GFXColor &bgcol=GFXColor(0, 0, 0, 0))
 
 ~TextPlane ()
 
void SetPos (float x, float y)
 
void SetCharSize (float x, float y)
 
void GetCharSize (float &x, float &y)
 
void GetPos (float &y, float &x)
 
void SetSize (float x, float y)
 
void GetSize (float &x, float &y)
 
int Draw (int offset=0)
 
int Draw (const std::string &text, int offset=0, bool start_one_line_lower=false, bool force_highquality=false, bool automatte=false)
 
void SetText (const std::string &newText)
 
std::string GetText () const
 

Public Attributes

GFXColor col
 
GFXColor bgcol
 

Detailed Description

Definition at line 30 of file hud.h.

Constructor & Destructor Documentation

TextPlane::TextPlane ( const struct GFXColor col = GFXColor( 1, 1, 1, 1 ),
const struct GFXColor bgcol = GFXColor( 0, 0, 0, 0 ) 
)

Definition at line 119 of file hud.cpp.

References bgcol, c, col, and SetPos().

120 {
121  col = c;
122  this->bgcol = bgcol;
123  myDims.i = 2;
124  myDims.j = -2;
125  myFontMetrics.Set( .06, .08, 0 );
126  SetPos( 0, 0 );
127 }
TextPlane::~TextPlane ( )

Definition at line 129 of file hud.cpp.

129 {}

Member Function Documentation

int TextPlane::Draw ( const std::string &  text,
int  offset = 0,
bool  start_one_line_lower = false,
bool  force_highquality = false,
bool  automatte = false 
)
void TextPlane::GetCharSize ( float x,
float y 
)
inline

Definition at line 57 of file hud.h.

Referenced by BaseInterface::BaseInterface(), BaseInterface::Room::BaseText::BaseText(), VDU::Draw(), GameCockpit::Draw(), and BaseInterface::Room::Draw().

58  {
59  x = myFontMetrics.i;
60  y = myFontMetrics.j;
61  }
void TextPlane::GetPos ( float y,
float x 
)
inline

Definition at line 62 of file hud.h.

63  {
64  y = myFontMetrics.k;
65  x = myDims.k;
66  }
void TextPlane::GetSize ( float x,
float y 
)
inline

Definition at line 72 of file hud.h.

73  {
74  x = myDims.i;
75  y = myDims.j;
76  }
std::string TextPlane::GetText ( ) const
inline

Definition at line 87 of file hud.h.

Referenced by BaseInterface::Room::Draw(), and BaseInterface::Draw().

88  {
89  return myText;
90  }
void TextPlane::SetCharSize ( float  x,
float  y 
)
inline

Definition at line 52 of file hud.h.

References x, and y.

Referenced by BaseInterface::BaseInterface(), BaseInterface::Room::BaseText::BaseText(), bootstrap_draw(), GameCockpit::Draw(), RText::draw_text(), drawdescription(), NavigationSystem::DrawMission(), and DrawNodeDescription().

53  {
54  myFontMetrics.i = x;
55  myFontMetrics.j = y;
56  }
void TextPlane::SetSize ( float  x,
float  y 
)
inline

Member Data Documentation


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