global restruct finish 2 of 3
This commit is contained in:
28
towers.cpp
28
towers.cpp
@@ -2,10 +2,36 @@
|
||||
|
||||
towers::towers(games *parent)
|
||||
{
|
||||
|
||||
game = parent;
|
||||
}
|
||||
|
||||
|
||||
void towers::drawcell(QPoint pnt)
|
||||
{
|
||||
QPainter painter(game->background);
|
||||
QPen pen(QColor(0,0,0));
|
||||
QBrush brush(QColor(0,0,0),Qt::SolidPattern);
|
||||
painter.setPen(pen);
|
||||
painter.setBrush(brush);
|
||||
painter.drawRect(pnt.x()*game->cellsize+1,pnt.y()*game->cellsize+1,game->cellsize - 2, game->cellsize - 2);
|
||||
painter.end();
|
||||
}
|
||||
|
||||
|
||||
void towers::clearcell(QPoint pnt)
|
||||
{
|
||||
QPainter painter(game->background);
|
||||
QPen pen(QColor::fromRgb(qRgb(150,150,150)));
|
||||
QBrush brush(QColor(150,150,150),Qt::SolidPattern);
|
||||
painter.setPen(pen);
|
||||
painter.setBrush(brush);
|
||||
painter.drawRect(pnt.x()*game->cellsize+1,pnt.y()*game->cellsize+1,game->cellsize - 2, game->cellsize - 2);
|
||||
painter.end();
|
||||
}
|
||||
|
||||
/*
|
||||
void towers::AddTower(QPoint point, int type)
|
||||
{
|
||||
|
||||
}
|
||||
*/
|
||||
|
||||
Reference in New Issue
Block a user