Changeset 6412 for code/branches/pickup2/src/modules/overlays/GUIOverlay.cc
- Timestamp:
- Dec 25, 2009, 1:18:03 PM (15 years ago)
- Location:
- code/branches/pickup2
- Files:
-
- 2 edited
Legend:
- Unmodified
- Added
- Removed
-
code/branches/pickup2
- Property svn:mergeinfo changed
-
code/branches/pickup2/src/modules/overlays/GUIOverlay.cc
r5781 r6412 64 64 65 65 //Setting player now. 66 GUIManager::getInstance().setPlayer(this->guiName_, (orxonox_cast<ControllableEntity*>(this->getOwner()))->getPlayer()); 66 if( this->getOwner() ) 67 GUIManager::getInstance().setPlayer(this->guiName_, (orxonox_cast<ControllableEntity*>(this->getOwner()))->getPlayer()); 67 68 68 69 if (this->isVisible()) 69 70 { 70 std::string str; 71 std::stringstream out; 71 std::ostringstream out; 72 72 out << reinterpret_cast<long>(this); 73 str = out.str(); 74 GUIManager::getInstance().executeCode("showCursor()"); 75 InputManager::getInstance().enterState("guiMouseOnly"); 76 GUIManager::getInstance().executeCode("showGUI(\"" + this->guiName_ + "\", " + str + ")"); 73 const std::string& str = out.str(); 74 COUT(1) << "GUIManager ptr: " << str << std::endl; 75 GUIManager::getInstance().showGUIExtra(this->guiName_, str); 76 77 COUT(3) << "Showing GUI " << this->guiName_ << std::endl; 77 78 } 78 79 else 79 80 { 80 GUIManager::getInstance().executeCode("hideGUI(\"" + this->guiName_ + "\")"); 81 GUIManager::getInstance().executeCode("hideCursor()"); 82 InputManager::getInstance().leaveState("guiMouseOnly"); 81 GUIManager::hideGUI(this->guiName_); 82 COUT(3) << "Hiding GUI " << this->guiName_ << std::endl; 83 83 } 84 84 }
Note: See TracChangeset
for help on using the changeset viewer.