Project::OSiRiON - Git repositories
Project::OSiRiON
News . About . Screenshots . Downloads . Forum . Wiki . Tracker . Git
summaryrefslogtreecommitdiff
diff options
context:
space:
mode:
authorStijn Buys <ingar@osirion.org>2012-10-13 10:51:48 +0000
committerStijn Buys <ingar@osirion.org>2012-10-13 10:51:48 +0000
commit0d58c4f8ab1d174c808c77bf94342c91f6e0c443 (patch)
tree9f32d388ca32dba337739494db2687aa5b2a8225 /src/client/galaxymapwidget.cc
parenta41a544a498baf2235348b2edb76781f442651d6 (diff)
Draw zone colors and background texture on the galactic map.
Diffstat (limited to 'src/client/galaxymapwidget.cc')
-rw-r--r--src/client/galaxymapwidget.cc13
1 files changed, 7 insertions, 6 deletions
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);