#include <panel.h>
Inheritance diagram for Panel:

Public Methods | |
| Panel () | |
| Basic constructor. More... | |
| Panel (const unsigned int x, const unsigned int y, const unsigned int w, const unsigned int h) | |
| Constructor. More... | |
| virtual | ~Panel () |
| Destructor. More... | |
| Panel & | operator= (Panel const &other) |
| Assignment operator. | |
| virtual bool | draw (SDL_Surface *screen) |
| Draw the panel. More... | |
| SDL_Rect * | getDim () |
| Get the dimensions. More... | |
| virtual void | setFont (TTF_Font *font) |
Protected Attributes | |
| SDL_Rect | dim |
| Dimensions. More... | |
| SDL_Surface * | surface |
| Drawing Surface. More... | |
| TTF_Font * | font |
| Font of the info box. More... | |
This is the super class for StatusPanel and InventoryPanel. It provides basic funcionality and data like the surface, font, and dimensions of the panel.
|
|
Basic constructor. This constructor does not do anything useful. Probably you shouldn't never use this one |
|
||||||||||||||||||||
|
Constructor. This constructor creates a surface for this panel with the given dimensions and the format of the screen surface. Important: you can not call this constructor before initializing the video because it need to access the screen surface with SDL_GetVideoSurface();
|
|
|
Destructor. Frees the surface. It does not frees the font. |
|
|
Draw the panel. This is probably the only method that subclasses need to implement.
|
|
|
Get the dimensions.
|
|
|
Dimensions. x, y, width, and height values of the surface. Very useful when you are drawing. |
|
|
Font of the info box. It is defined with the constants FONT_SIZE and FONT_FILE in the class Graphics. |
|
|
Drawing Surface. SDL Surface where we draw all the stuff in the panel |
1.2.15