Changeset 9471
- Timestamp:
- Nov 28, 2012, 11:02:55 PM (12 years ago)
- Location:
- code/branches/spaceNavigation/src/modules/overlays/hud
- Files:
-
- 2 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 } -
code/branches/spaceNavigation/src/modules/overlays/hud/HUDNavigation.h
r9468 r9471 71 71 { return this->markerLimit_; } 72 72 73 void selectClosestTarget();74 void selectNextTarget();73 static void selectClosestTarget(); 74 static void selectNextTarget(); 75 75 76 76 private: … … 132 132 static const float LIGHTNING_GUN_SPEED_ = 700.0f; 133 133 static const float HSW01_SPEED_ = 2500.0f; 134 static HUDNavigation* localHUD_s; //!< This is used as a filter to only influence the local HUD. 135 134 136 135 137 float currentMunitionSpeed_;
Note: See TracChangeset
for help on using the changeset viewer.