Planeshift
|
Game tile class. More...
#include <pawsgameboard.h>
Public Member Functions | |
virtual void | Draw () |
Draws the game tile. | |
int8_t | GetColumn () const |
Returns the column number for this game tile. | |
int8_t | GetRow () const |
Returns the row number for this game tile. | |
uint8_t | GetState () const |
Return the game tile state. | |
virtual bool | OnDoubleClick (int button, int modifiers, int x, int y) |
Double-click event. | |
virtual bool | OnMouseDown (int button, int modifiers, int x, int y) |
Mouse event. | |
pawsGameTile () | |
void | RestoreState () |
Restores the previous game tile state. | |
void | SetColumn (int8_t newColumn) |
Sets the column number for this game tile. | |
void | SetGameBoard (pawsGameBoard *gameBoard) |
Sets the game board field. | |
void | SetRow (int8_t newRow) |
Sets the row number for this game tile. | |
void | SetState (uint8_t state) |
Sets the game tile state. | |
~pawsGameTile () | |
Protected Attributes | |
pawsGameBoard * | board |
The game board. | |
int8_t | column |
The column number on the game board. | |
csRef< iPawsImage > | image |
The game piece image. | |
uint8_t | oldState |
The previous game tile state. | |
int8_t | row |
The row number on the game board. | |
uint8_t | state |
The current game tile state. |
Game tile class.
Defines one game tile with or without game pieces on it.
Definition at line 33 of file pawsgameboard.h.
pawsGameTile::pawsGameTile | ( | ) |
pawsGameTile::~pawsGameTile | ( | ) |
virtual void pawsGameTile::Draw | ( | ) | [virtual] |
Draws the game tile.
Reimplemented from pawsWidget.
int8_t pawsGameTile::GetColumn | ( | ) | const [inline] |
Returns the column number for this game tile.
Definition at line 49 of file pawsgameboard.h.
int8_t pawsGameTile::GetRow | ( | ) | const [inline] |
Returns the row number for this game tile.
Definition at line 55 of file pawsgameboard.h.
uint8_t pawsGameTile::GetState | ( | ) | const [inline] |
Return the game tile state.
Definition at line 67 of file pawsgameboard.h.
Double-click event.
Reimplemented from pawsWidget.
Mouse event.
Reimplemented from pawsWidget.
void pawsGameTile::RestoreState | ( | ) |
Restores the previous game tile state.
void pawsGameTile::SetColumn | ( | int8_t | newColumn | ) |
Sets the column number for this game tile.
void pawsGameTile::SetGameBoard | ( | pawsGameBoard * | gameBoard | ) |
Sets the game board field.
void pawsGameTile::SetRow | ( | int8_t | newRow | ) |
Sets the row number for this game tile.
void pawsGameTile::SetState | ( | uint8_t | state | ) |
Sets the game tile state.
pawsGameBoard* pawsGameTile::board [protected] |
The game board.
Definition at line 78 of file pawsgameboard.h.
int8_t pawsGameTile::column [protected] |
The column number on the game board.
Definition at line 81 of file pawsgameboard.h.
csRef<iPawsImage> pawsGameTile::image [protected] |
The game piece image.
Definition at line 93 of file pawsgameboard.h.
uint8_t pawsGameTile::oldState [protected] |
The previous game tile state.
Definition at line 90 of file pawsgameboard.h.
int8_t pawsGameTile::row [protected] |
The row number on the game board.
Definition at line 84 of file pawsgameboard.h.
uint8_t pawsGameTile::state [protected] |
The current game tile state.
Definition at line 87 of file pawsgameboard.h.