Change text over nodes to just be hit points
This commit is contained in:
16
game.cpp
16
game.cpp
@ -83,12 +83,6 @@ void Game::render()
|
||||
Vertex* v = *cursor;
|
||||
DrawUtils::draw_circle_filled(display, v->x, v->y, v->r,
|
||||
v->colour);
|
||||
DrawUtils::draw_text(display,
|
||||
"str " + itos(data.calculate_strength(v)),
|
||||
v->x, v->y, font);
|
||||
DrawUtils::draw_text(display, "hp " + itos(v->score),
|
||||
v->x, v->y + 13, font);
|
||||
|
||||
|
||||
for (list<Vertex*>::iterator subcursor = v->neighbors.begin();
|
||||
subcursor != v->neighbors.end(); subcursor++)
|
||||
@ -99,6 +93,16 @@ void Game::render()
|
||||
}
|
||||
}
|
||||
|
||||
// Add hit points on top of the nodes
|
||||
for (list<Vertex*>::iterator cursor = vertices.begin();
|
||||
cursor != vertices.end(); cursor++)
|
||||
{
|
||||
Vertex* v = *cursor;
|
||||
|
||||
DrawUtils::draw_text(display, itos(v->score), v->x, v->y, font,
|
||||
0x00ff00, true, true);
|
||||
}
|
||||
|
||||
// Finally, ring the selected vertex and write info about it
|
||||
if (data.get_current_vertex() != NULL)
|
||||
{
|
||||
|
Reference in New Issue
Block a user