- Timestamp:
- Nov 28, 2012, 11:02:55 PM (12 years ago)
- File:
-
- 1 edited
Legend:
- Unmodified
- Added
- Removed
-
code/branches/spaceNavigation/src/modules/overlays/hud/HUDNavigation.cc
r9468 r9471 59 59 { 60 60 61 SetConsoleCommand(" selectClosest", &HUDNavigation::selectClosestTarget);62 SetConsoleCommand(" selectNext", &HUDNavigation::selectNextTarget);61 SetConsoleCommand("HUDNavigation","selectClosest", &HUDNavigation::selectClosestTarget).addShortcut().keybindMode(KeybindMode::OnPress); 62 SetConsoleCommand("HUDNavigation","selectNext", &HUDNavigation::selectNextTarget).addShortcut().keybindMode(KeybindMode::OnPress); 63 63 64 64 static bool compareDistance(std::pair<RadarViewable*, unsigned int> a, … … 68 68 } 69 69 CreateFactory ( HUDNavigation ); 70 71 HUDNavigation* HUDNavigation::localHUD_s = 0; 70 72 71 73 HUDNavigation::HUDNavigation(BaseObject* creator) : … … 86 88 this->closestTarget_ = true; 87 89 this->nextTarget_ = false; 90 HUDNavigation::localHUD_s = this; 88 91 } 89 92 … … 544 547 void HUDNavigation::selectClosestTarget() 545 548 { 546 this->closestTarget_ = true; 547 orxout() << "selectClosestTarget" << std::endl; 549 if(HUDNavigation::localHUD_s) 550 { 551 HUDNavigation::localHUD_s->closestTarget_ = true; 552 orxout() << "selectClosestTarget" << std::endl; 553 } 548 554 } 549 555 550 556 void HUDNavigation::selectNextTarget() 551 557 { 552 this->nextTarget_ = true; 553 orxout() << "selectNextTarget" << std::endl; 558 if(HUDNavigation::localHUD_s) 559 { 560 HUDNavigation::localHUD_s->nextTarget_ = true; 561 orxout() << "selectNextTarget" << std::endl; 562 } 554 563 } 555 564 }
Note: See TracChangeset
for help on using the changeset viewer.