From 0d58c4f8ab1d174c808c77bf94342c91f6e0c443 Mon Sep 17 00:00:00 2001 From: Stijn Buys Date: Sat, 13 Oct 2012 10:51:48 +0000 Subject: Draw zone colors and background texture on the galactic map. --- src/client/galaxymapwidget.cc | 13 +++++++------ 1 file changed, 7 insertions(+), 6 deletions(-) (limited to 'src/client/galaxymapwidget.cc') diff --git a/src/client/galaxymapwidget.cc b/src/client/galaxymapwidget.cc index be9a6e0..0cc04af 100644 --- a/src/client/galaxymapwidget.cc +++ b/src/client/galaxymapwidget.cc @@ -66,15 +66,15 @@ void GalaxyMapWidget::draw() map_location[1] += (height() - map_size) * 0.5f; } - // draw background - math::Vector2f background_size(map_size, map_size); - ui::Paint::draw_material(map_location, background_size, "ui/background"); + // draw widget background + math::Vector2f background_size(map_size, map_size); + ui::Paint::draw_bitmap(map_location, background_size, math::Color(), "bitmaps/ui/map_background"); // number of squares in one grid segment const float grid_size = 16.0f; // draw the grid itself - gl::color(0, 0, 0.8f); + gl::color(0, 0, 0.25f); gl::begin(gl::Lines); for (float i = 0; i <= grid_size; i += 1.0f) { @@ -135,10 +135,11 @@ void GalaxyMapWidget::draw() draw_icon = false; } } + // TODO draw a ship icon for current location if (draw_icon) { - gl::begin(gl::Quads); - + color.assign(zone->color()); + gl::color(color); glTexCoord2f(0.0f, 0.0f); gl::vertex(icon_location.x() - r, icon_location.y() - r); -- cgit v1.2.3