Change text over nodes to just be hit points

This commit is contained in:
2011-07-01 22:23:16 -04:00
parent a2f36a447b
commit 2bdc7e0e59
3 changed files with 19 additions and 13 deletions

View File

@ -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)
{