Rename SystemView::OnClickShipLabel -> SystemView::OnClickShip

Be consistent with SystemView::OnClickBody().
master
Karl F 2014-08-13 15:44:05 +02:00
parent 03ab7f3df6
commit 6498d1b979
2 changed files with 3 additions and 3 deletions

View File

@ -387,13 +387,13 @@ void SystemView::LabelShip(Ship *s, const vector3d &offset) {
vector3d pos;
if (Gui::Screen::Project(offset, pos)) {
m_shipLabels->Add(s->GetLabel(), sigc::bind(sigc::mem_fun(this, &SystemView::OnClickShipLabel), s), pos.x, pos.y);
m_shipLabels->Add(s->GetLabel(), sigc::bind(sigc::mem_fun(this, &SystemView::OnClickShip), s), pos.x, pos.y);
}
Gui::Screen::LeaveOrtho();
}
void SystemView::OnClickShipLabel(Ship *s) {
void SystemView::OnClickShip(Ship *s) {
if(!s) { printf("clicked on ship label but ship wasn't there\n"); return; }
if(Pi::player->GetNavTarget() == s) {
Pi::player->SetNavTarget(0); // remove current

View File

@ -68,7 +68,7 @@ private:
void RefreshShips(void);
void DrawShips(const double t, const vector3d &offset);
void LabelShip(Ship *s, const vector3d &offset);
void OnClickShipLabel(Ship *s);
void OnClickShip(Ship *s);
RefCountedPtr<StarSystem> m_system;
const SystemBody *m_selectedObject;