Project::OSiRiON - Git repositories
Project::OSiRiON
News . About . Screenshots . Downloads . Forum . Wiki . Tracker . Git
summaryrefslogtreecommitdiff
path: root/src
diff options
context:
space:
mode:
authorStijn Buys <ingar@osirion.org>2012-02-13 21:49:30 +0000
committerStijn Buys <ingar@osirion.org>2012-02-13 21:49:30 +0000
commit3f4bf289327ff920a68ac32b5f383f655d0ea843 (patch)
treecc50a0f4e627cf8360b8414ee83328d0b98b3310 /src
parent5f04e8e41f287b8aa1c7298654b9217f98df46d1 (diff)
Show selected stars and planets in the map window.
Diffstat (limited to 'src')
-rw-r--r--src/client/mapwindow.cc12
1 files changed, 12 insertions, 0 deletions
diff --git a/src/client/mapwindow.cc b/src/client/mapwindow.cc
index 244056b..ffc777e 100644
--- a/src/client/mapwindow.cc
+++ b/src/client/mapwindow.cc
@@ -180,9 +180,21 @@ void MapWindow::set_target(const core::Entity *entity) {
}
if (mapwindow_target->model()) {
+ mapwindow_modelview->set_mode(ui::ModelView::Model);
mapwindow_modelview->set_modelname(mapwindow_target->model()->name());
mapwindow_modelview->set_colors(mapwindow_target->color(), mapwindow_target->color_second());
+
+ } else if (mapwindow_target->type() == core::Entity::Globe) {
+ mapwindow_modelview->set_mode(ui::ModelView::Globe);
+ const core::EntityGlobe *globe = static_cast<const core::EntityGlobe *>(mapwindow_target);
+ mapwindow_modelview->set_colors(mapwindow_target->color(), mapwindow_target->color_second());
+ mapwindow_modelview->set_globetexturename(
+ globe->texturename(),
+ globe->flag_is_set(core::Entity::Bright),
+ globe->coronaname()
+ );
} else {
+ mapwindow_modelview->set_mode(ui::ModelView::Model);
mapwindow_modelview->set_modelname(0);
}