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>2015-01-06 21:38:33 +0000
committerStijn Buys <ingar@osirion.org>2015-01-06 21:38:33 +0000
commit9626a5ce823fe94970b04dc504993583996e6074 (patch)
tree6c751347b75ce952169da889abd74853f5544857 /src/client/galaxymapwidget.cc
parent22785c4e7eb0be49a795f4b2bcdf5cbda1626a5a (diff)
Fixed target selection in the map window.
Diffstat (limited to 'src/client/galaxymapwidget.cc')
-rw-r--r--src/client/galaxymapwidget.cc11
1 files changed, 6 insertions, 5 deletions
diff --git a/src/client/galaxymapwidget.cc b/src/client/galaxymapwidget.cc
index a49e004..47d1f79 100644
--- a/src/client/galaxymapwidget.cc
+++ b/src/client/galaxymapwidget.cc
@@ -36,10 +36,10 @@ void GalaxyMapWidget::set_zone(core::Zone *zone)
galaxymapwidget_zone = zone;
}
-bool GalaxyMapWidget::on_keypress(const int key, const unsigned int modifier)
+bool GalaxyMapWidget::on_mousepress(const unsigned int button)
{
- if (key == 512 + SDL_BUTTON_LEFT) {
- if (has_mouse_focus() && hover()) {
+ if (button == SDL_BUTTON_LEFT) {
+ if (hover()) {
if (zone() && (zone()->id() == hover())) {
emit(ui::Widget::EventDoubleClicked);
} else {
@@ -48,9 +48,10 @@ bool GalaxyMapWidget::on_keypress(const int key, const unsigned int modifier)
}
}
return true;
-
}
+
return false;
+
}
void GalaxyMapWidget::draw()
@@ -105,7 +106,7 @@ void GalaxyMapWidget::draw()
// draw map icons
/*
* Note: the galactic coordinate system differs from the zone coordinate system:
- * positive X-axis runs left-to-right on the screen and the positive U-axis runs bottom-to-top on the screen.
+ * positive X-axis runs left-to-right on the screen and the positive Y-axis runs bottom-to-top on the screen.
*
* This is because I'm lazy and I just copy the coordinates from the SVG starsystem roadmap as shown in Inkscape.
*/