diff options
author | Stijn Buys <ingar@osirion.org> | 2012-02-13 21:49:30 +0000 |
---|---|---|
committer | Stijn Buys <ingar@osirion.org> | 2012-02-13 21:49:30 +0000 |
commit | 3f4bf289327ff920a68ac32b5f383f655d0ea843 (patch) | |
tree | cc50a0f4e627cf8360b8414ee83328d0b98b3310 /src | |
parent | 5f04e8e41f287b8aa1c7298654b9217f98df46d1 (diff) |
Show selected stars and planets in the map window.
Diffstat (limited to 'src')
-rw-r--r-- | src/client/mapwindow.cc | 12 |
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); } |