Changeset 10255
- Timestamp:
- Feb 4, 2015, 10:21:28 PM (10 years ago)
- Location:
- code/branches/presentationHS14merge
- Files:
-
- 7 edited
- 3 copied
Legend:
- Unmodified
- Added
- Removed
-
code/branches/presentationHS14merge
- Property svn:mergeinfo changed
/code/branches/storymodeHS14 (added) merged: 10085,10157,10174,10249-10251,10253-10254
- Property svn:mergeinfo changed
-
code/branches/presentationHS14merge/cmake/LibraryConfig.cmake
r9765 r10255 161 161 SET(Boost_ADDITIONAL_VERSIONS 1.40 1.40.0 1.41 1.41.0 1.42 1.42.0 1.43 1.43.0 162 162 1.44 1.44.0 1.45 1.45.0 1.46 1.46.0 1.46.1 1.49.0 163 163 1.53.0) 164 164 IF(NOT TARDIS) 165 165 FIND_PACKAGE(Boost 1.40 REQUIRED thread filesystem system date_time) -
code/branches/presentationHS14merge/data/gui/layouts/SingleplayerMenu.layout
r9782 r10255 55 55 <Event Name="Clicked" Function="SingleplayerMenu.SingleplayerBackButton_clicked"/> 56 56 </Window> 57 <Window Type="MenuWidgets/Button" Name="orxonox/CampaignButton" > 58 <Property Name="Text" Value="Campaign" /> 59 <Property Name="UnifiedMaxSize" Value="{{1,0},{1,0}}" /> 60 <Property Name="UnifiedAreaRect" Value="{{0.4,0},{0.8,0},{0.6,0},{0.85,0}}" /> 61 <Event Name="Clicked" Function="SingleplayerMenu.CampaignButton_clicked"/> 62 </Window> 57 63 </Window> 58 64 </GUILayout> -
code/branches/presentationHS14merge/data/gui/scripts/SingleplayerMenu.lua
r9348 r10255 2 2 3 3 local P = createMenuSheet("SingleplayerMenu") 4 P.loadAlong = {"ShipSelectionMenu" }4 P.loadAlong = {"ShipSelectionMenu","CampaignMenu"} 5 5 P.levelList = {} 6 6 P.activeTabIndexes = {} … … 23 23 P.SingleplayerSelectionChanged() 24 24 25 --buttons are arranged in a 1x3 matrix25 --buttons are arranged in a 2x3 matrix 26 26 P:setButton(1, 1, { 27 27 ["button"] = winMgr:getWindow("orxonox/SingleplayerStartButton"), … … 37 37 ["button"] = winMgr:getWindow("orxonox/SingleplayerBackButton"), 38 38 ["callback"] = P.SingleplayerBackButton_clicked 39 }) 40 41 P:setButton(2, 2,{ 42 ["button"] = winMgr:getWindow("orxonox/CampaignButton"), 43 ["callback"] = P.CampaignButton_clicked 39 44 }) 40 45 end … … 166 171 end 167 172 173 function P.CampaignButton_clicked(e) 174 showMenuSheet("CampaignMenu", true) 175 end 176 168 177 return P -
code/branches/presentationHS14merge/src/orxonox/LevelManager.cc
r9667 r10255 89 89 SetConfigValue(defaultLevelName_, "missionOne.oxw") 90 90 .description("Sets the pre selection of the level in the main menu."); 91 SetConfigValue(lastFinishedCampaignMission_, "") 92 .description("The last finished mission of a campaign"); 93 SetConfigValue(campaignMissions_, std::vector<std::string>()) 94 .description("The list of missions in the campaign"); 95 } 96 97 /** 98 * @brief Stores the argument in the corresponding config value. 99 */ 100 void LevelManager::setLastFinishedCampaignMission(const std::string& lastFinishedCampaignMission) 101 { 102 ModifyConfigValue(lastFinishedCampaignMission_, set, lastFinishedCampaignMission); 91 103 } 92 104 -
code/branches/presentationHS14merge/src/orxonox/LevelManager.h
r9667 r10255 91 91 LevelInfoItem* getAvailableLevelListItem(unsigned int index); //!< Get the LevelInfoItem at the given index in the list of available Levels. 92 92 93 void setLastFinishedCampaignMission(const std::string& lastFinishedCampaignMission); 94 inline const std::string& getLastFinishedCampaignMission() const 95 { return this->lastFinishedCampaignMission_; } 96 97 inline unsigned int getNumberOfCampaignMissions() 98 { return this->campaignMissions_.size(); } 99 inline const std::string& getCampaignMission(unsigned int index) 100 { return this->campaignMissions_[index]; } 101 93 102 /** 94 103 @brief Get the instance of the LevelManager. … … 116 125 // config values 117 126 std::string defaultLevelName_; 127 std::string lastFinishedCampaignMission_; 128 std::vector<std::string> campaignMissions_; 118 129 119 130 static LevelManager* singletonPtr_s; -
code/branches/presentationHS14merge/src/orxonox/gametypes/Mission.cc
r9986 r10255 28 28 29 29 #include "Mission.h" 30 30 31 #include "items/Engine.h" 31 32 #include "controllers/ArtificialController.h" … … 36 37 #include "network/Host.h" 37 38 #include "worldentities/pawns/Pawn.h" 38 39 #include "LevelManager.h" 39 40 40 41 namespace orxonox … … 70 71 void Mission::pawnKilled(Pawn* victim, Pawn* killer) 71 72 { 72 if (victim && victim->getPlayer() && victim->getPlayer()->isHumanPlayer() 73 if (victim && victim->getPlayer() && victim->getPlayer()->isHumanPlayer()) 73 74 { 74 75 this->lives_--; … … 87 88 { 88 89 if (this->missionAccomplished_ && !this->gtinfo_->hasEnded()) 90 { 89 91 this->gtinfo_->sendAnnounceMessage("Mission accomplished!"); 92 93 LevelManager::getInstance().setLastFinishedCampaignMission(this->getFilename()); 94 } 90 95 else if (!this->gtinfo_->hasEnded()) 91 96 this->gtinfo_->sendAnnounceMessage("Mission failed!"); 97 92 98 Gametype::end(); 93 99 } 94 100 95 101 void Mission::setTeams() 96 { //Set pawn-colours102 { //Set pawn-colours 97 103 for (ObjectList<Pawn>::iterator it = ObjectList<Pawn>::begin(); it != ObjectList<Pawn>::end(); ++it) 98 104 { 99 105 Pawn* pawn = static_cast<Pawn*>(*it); 100 if(!pawn) continue; 101 this->setDefaultObjectColour(pawn); 106 if (!pawn) 107 continue; 108 this->setDefaultObjectColour(pawn); 102 109 } 103 110 } … … 105 112 { 106 113 for (ObjectList<Mission>::iterator it = ObjectList<Mission>::begin(); it != ObjectList<Mission>::end(); ++it) 107 { //TODO: make sure that only the desired mission is ended !! This is a dirty HACK, that would end ALL missions!114 { //TODO: make sure that only the desired mission is ended !! This is a dirty HACK, that would end ALL missions! 108 115 it->setMissionAccomplished(accomplished); 109 116 it->end(); 110 117 } 111 118 } 112 119 113 120 void Mission::setLivesWrapper(unsigned int amount) 114 121 { 115 122 for (ObjectList<Mission>::iterator it = ObjectList<Mission>::begin(); it != ObjectList<Mission>::end(); ++it) 116 { //TODO: make sure that only the desired mission is ended !! This is a dirty HACK, that would affect ALL missions!123 { //TODO: make sure that only the desired mission is ended !! This is a dirty HACK, that would affect ALL missions! 117 124 it->setLives(amount); 118 125 } 119 126 } 120 121 122 127 }
Note: See TracChangeset
for help on using the changeset viewer.