Interface Class Reference

This class represents the userinterface. More...

#include <Interface.h>

Inherits Texture.

Inheritance diagram for Interface:

Inheritance graph
[legend]
Collaboration diagram for Interface:

Collaboration graph
[legend]
List of all members.

Public Member Functions

 Interface (Level *p_level)
 Standard constructor.
virtual ~Interface ()
 Standard destructor.
int render ()
 Renders the Interface.
int load (std::string p_style, std::string p_playerName)
 Loads all Interface data from given ressource file.

Public Attributes

std::string playerName
 Holds the name of the player to display.
Levellevel
 Holds a pointert to the instance of the Level.
std::vector< Button * > buttons
 Holds all buttons.
ObjectenergyCounter
 Holds the energy counter.
Vector3d energyCounterPos
 Holds the energy counter's position.
Vector3d energyCounterFontPos
 Holds the energy counter's font position.
ObjectunitWindow
 Holds the unit window.
Vector3d unitWindowPos
 Holds the unit window's position.

Detailed Description

This class represents the userinterface.

Definition at line 35 of file Interface.h.


Constructor & Destructor Documentation

Interface::Interface ( Level p_level  ) 

Standard constructor.

Definition at line 34 of file Interface.cpp.

References level.

Interface::~Interface (  )  [virtual]

Standard destructor.

Definition at line 40 of file Interface.cpp.


Member Function Documentation

int Interface::render (  )  [virtual]

Renders the Interface.

Reimplemented from Texture.

Definition at line 44 of file Interface.cpp.

References buttons, energyCounter, energyCounterFontPos, energyCounterPos, Texture::get(), Texture::getField(), GLInterface::glPrint2d(), level, playerName, Level::players, Object::render(), Field::render(), Texture::render(), Field::renderChild(), Field::s_selectedFieldID, Unit::s_selectedID, Object::size, unitWindow, unitWindowPos, Vector3d::x, Vector3d::y, and Vector3d::z.

Referenced by Level::renderInterface().

Here is the call graph for this function:

int Interface::load ( std::string  p_style,
std::string  p_playerName 
)

Loads all Interface data from given ressource file.

Parameters:
p_style The style for the Interface.
p_playerName The name of the Player to show.
Returns:
0 for success.

Definition at line 98 of file Interface.cpp.

References buttons, energyCounter, energyCounterFontPos, energyCounterPos, Button::label, Texture::loadAndBind(), playerName, Button::pos, Object::size, splitLine(), unitWindow, unitWindowPos, and Button::val.

Referenced by Level::load().

Here is the call graph for this function:


Member Data Documentation

std::string Interface::playerName

Holds the name of the player to display.

Definition at line 65 of file Interface.h.

Referenced by load(), and render().

Level* Interface::level

Holds a pointert to the instance of the Level.

Definition at line 70 of file Interface.h.

Referenced by Interface(), and render().

std::vector<Button*> Interface::buttons

Holds all buttons.

Definition at line 75 of file Interface.h.

Referenced by load(), and render().

Object* Interface::energyCounter

Holds the energy counter.

Definition at line 80 of file Interface.h.

Referenced by load(), and render().

Vector3d Interface::energyCounterPos

Holds the energy counter's position.

Definition at line 85 of file Interface.h.

Referenced by load(), and render().

Vector3d Interface::energyCounterFontPos

Holds the energy counter's font position.

Definition at line 90 of file Interface.h.

Referenced by load(), and render().

Object* Interface::unitWindow

Holds the unit window.

Definition at line 95 of file Interface.h.

Referenced by load(), and render().

Vector3d Interface::unitWindowPos

Holds the unit window's position.

Definition at line 100 of file Interface.h.

Referenced by load(), and render().


The documentation for this class was generated from the following files:
Generated on Tue Jul 17 22:02:23 2007 for C0re by  doxygen 1.5.2