Index: /code/branches/bindermFS16/data/defaultConfig/orxonox.ini
===================================================================
--- /code/branches/bindermFS16/data/defaultConfig/orxonox.ini	(revision 11172)
+++ /code/branches/bindermFS16/data/defaultConfig/orxonox.ini	(revision 11173)
Index: /code/branches/bindermFS16/data/gui/layouts/CampaignMenu.layout
===================================================================
--- /code/branches/bindermFS16/data/gui/layouts/CampaignMenu.layout	(revision 11172)
+++ /code/branches/bindermFS16/data/gui/layouts/CampaignMenu.layout	(revision 11173)
@@ -8,4 +8,5 @@
         <Property Name="UnifiedAreaRect" Value="{{0,0},{0,0},{1.0,0},{1.0,0}}" />
         <Property Name="BackgroundEnabled" Value="False" />
+
         <Window Type="MenuWidgets/Button" Name="orxonox/Mission1Button" >
             <Property Name="Text" Value="Mission One" />
@@ -13,6 +14,8 @@
             <Property Name="UnifiedMaxSize" Value="{{1,0},{1,0}}" />
             <Property Name="UnifiedAreaRect" Value="{{0.35,0},{0.1,0},{0.65,0},{0.15,0}}" />
+            <Property Name="Disabled" Value="False" />
             <Event Name="Clicked" Function="CampaignMenu.Mission1Button_clicked"/>
         </Window>
+
         <Window Type="MenuWidgets/Button" Name="orxonox/Mission2Button" >
             <Property Name="Text" Value="Fight in our Back" />
@@ -23,4 +26,5 @@
             <Event Name="Clicked" Function="CampaignMenu.Mission2Button_clicked"/>
         </Window>
+
         <Window Type="MenuWidgets/Button" Name="orxonox/Mission3Button" >
             <Property Name="Text" Value="Pirate Attack" />
@@ -31,4 +35,5 @@
             <Event Name="Clicked" Function="CampaignMenu.Mission3Button_clicked"/>
         </Window>
+
         <Window Type="MenuWidgets/Button" Name="orxonox/Mission4Button" >
             <Property Name="Text" Value="Trip to Area 51" />
@@ -39,4 +44,5 @@
             <Event Name="Clicked" Function="CampaignMenu.Mission4Button_clicked"/>
         </Window>
+
         <Window Type="MenuWidgets/Button" Name="orxonox/Mission5Button" >
             <Property Name="Text" Value="Area 51 under Fire" />
@@ -47,4 +53,5 @@
             <Event Name="Clicked" Function="CampaignMenu.Mission5Button_clicked"/>
         </Window>
+
         <Window Type="MenuWidgets/Button" Name="orxonox/Mission6Button" >
             <Property Name="Text" Value="Escape the Bastards" />
@@ -55,4 +62,5 @@
             <Event Name="Clicked" Function="CampaignMenu.Mission6Button_clicked"/>
         </Window>
+
         <Window Type="MenuWidgets/Button" Name="orxonox/Mission7Button" >
             <Property Name="Text" Value="Expedition to Sector 5C" />
@@ -63,4 +71,5 @@
             <Event Name="Clicked" Function="CampaignMenu.Mission7Button_clicked"/>
         </Window>
+
         <Window Type="MenuWidgets/Button" Name="orxonox/Mission8Button" >
             <Property Name="Text" Value="Shuttle under Attack" />
@@ -71,4 +80,5 @@
             <Event Name="Clicked" Function="CampaignMenu.Mission8Button_clicked"/>
         </Window>
+
         <Window Type="MenuWidgets/Button" Name="orxonox/Mission9Button" >
             <Property Name="Text" Value="Retaliation" />
@@ -80,11 +90,14 @@
         </Window>
 
-
         <Window Type="MenuWidgets/Button" Name="orxonox/CampaignMenuBackButton" >
             <Property Name="Text" Value="Back" />
+            <Property Name="Visible" Value="False"/>
             <Property Name="UnifiedMaxSize" Value="{{1,0},{1,0}}" />
             <Property Name="UnifiedAreaRect" Value="{{0.35,0},{0.85,0},{0.65,0},{0.9,0}}" />
+            <Property Name="Visible" Value="True"/>
+            <Property Name="Disabled" Value="False"/>
             <Event Name="Clicked" Function="CampaignMenu.CampaignMenuBackButton_clicked"/> 
         </Window>
+
         <Window Type="MenuWidgets/StaticText" Name="orxonox/CampaignMenuCongratulation" >
             <Property Name="Text" Value="Campaign Completed!!!" />
Index: /code/branches/bindermFS16/data/gui/scripts/CampaignMenu.lua
===================================================================
--- /code/branches/bindermFS16/data/gui/scripts/CampaignMenu.lua	(revision 11172)
+++ /code/branches/bindermFS16/data/gui/scripts/CampaignMenu.lua	(revision 11173)
@@ -19,44 +19,43 @@
 
 
-    if (P.getIndexOfLastFinishedMission() == orxonox.LevelManager:getInstance():getNumberOfCampaignMissions() - 1) then
-        local label = winMgr:getWindow("orxonox/CampaignMenuCongratulation")
-        label:setProperty("Visible","True")
+--    if (P.getIndexOfLastFinishedMission() == orxonox.LevelManager:getInstance():getNumberOfCampaignMissions() - 1) then
+--        local label = winMgr:getWindow("orxonox/CampaignMenuCongratulation")
+--        label:setProperty("Visible","True")
+--    end
+end
+
+function P.updateButton(index, button)
+    if (orxonox.LevelManager:getInstance():missionactivate(index)) then
+        button:setProperty("Visible", "True")
+        button:setProperty("Disabled", "False")
+    else
+        button:setProperty("Disabled", "True")
     end
 end
 
-function P.updateButton(index, button)
-    if (P.shouldDisplayButton(index)) then
-        button:setProperty("Visible", "True")
+--function P.shouldDisplayButton(index)
+--    local size = orxonox.LevelManager:getInstance():getNumberOfCampaignMissions()
+--    return index < size
+--end
 
-        if (P.shouldEnableButton(index)) then
-            button:setProperty("Disabled", "False")
-        end
-    end
-end
+--function P.shouldActivateButton(index) --checks if button should be activated or not
+--    return index <= P.getIndexOfLastFinishedMission() + 1
+--end
 
-function P.shouldDisplayButton(index)
-    local size = orxonox.LevelManager:getInstance():getNumberOfCampaignMissions()
-    return index < size
-end
-
-function P.shouldEnableButton(index)
-    return index <= P.getIndexOfLastFinishedMission() + 1
-end
-
-function P.getIndexOfLastFinishedMission()
-    local lastMission = orxonox.LevelManager:getInstance():getLastFinishedCampaignMission()
-    if (lastMission and lastMission ~= "") then
-        local size = orxonox.LevelManager:getInstance():getNumberOfCampaignMissions()
-        local index = 0
-        while index < size do
-            local mission = orxonox.LevelManager:getInstance():getCampaignMission(index)
-            if (mission == lastMission) then 
-                return index
-            end
-            index = index + 1
-        end
-    end
-    return -1
-end
+--function P.getIndexOfLastFinishedMission()
+--    local lastMission = orxonox.LevelManager:getInstance():getLastFinishedCampaignMission()
+--    if (lastMission and lastMission ~= "") then
+--        local size = orxonox.LevelManager:getInstance():getNumberOfCampaignMissions()
+--        local index = 0
+--        while index < size do
+--            local mission = orxonox.LevelManager:getInstance():getCampaignMission(index)
+--            if (mission == lastMission) then 
+--                return index
+--            end
+--            index = index + 1
+--        end
+--    end
+--    return -1
+--end
 
 function P.Mission1Button_clicked(e)
Index: /code/branches/bindermFS16/data/gui/scripts/SingleplayerMenu.lua
===================================================================
--- /code/branches/bindermFS16/data/gui/scripts/SingleplayerMenu.lua	(revision 11172)
+++ /code/branches/bindermFS16/data/gui/scripts/SingleplayerMenu.lua	(revision 11173)
@@ -172,7 +172,11 @@
 
 function P.CampaignButton_clicked(e)
-    orxonox.CampaignMenu:test()
+--    P.test()
     showMenuSheet("CampaignMenu", true)
 end
 
+--function P.test()
+--    orxonox.CampaignMenu:test()
+--end
+
 return P
Index: /code/branches/bindermFS16/src/orxonox/CMakeLists.txt
===================================================================
--- /code/branches/bindermFS16/src/orxonox/CMakeLists.txt	(revision 11172)
+++ /code/branches/bindermFS16/src/orxonox/CMakeLists.txt	(revision 11173)
@@ -58,4 +58,5 @@
   TOLUA_FILES
     chat/ChatInputHandler.h
+    overlays/CampaignMenu.h
     LevelInfo.h
     LevelManager.h
Index: /code/branches/bindermFS16/src/orxonox/LevelManager.cc
===================================================================
--- /code/branches/bindermFS16/src/orxonox/LevelManager.cc	(revision 11172)
+++ /code/branches/bindermFS16/src/orxonox/LevelManager.cc	(revision 11173)
@@ -49,4 +49,25 @@
 namespace orxonox
 {
+
+    LevelStatus::LevelStatus()
+    {
+        this->won = true;
+    }
+
+    LevelStatus::~LevelStatus()
+    {}
+
+    bool LevelManager::missionactivate(int index)
+    {
+        //check for index level activate...
+        return index-5;
+    }
+
+    void LevelManager::setLevelStatus(int completedLevel)
+    {
+//        allLevelStatus_[completedLevel]=new LevelStatus;
+    }
+
+
     SetCommandLineArgument(level, "").shortcut("l").information("Default level file (overrides LevelManager::defaultLevelName_ configValue)");
 
@@ -63,4 +84,6 @@
         RegisterObject(LevelManager);
         this->setConfigValues();
+
+
 
         // check override
@@ -73,5 +96,8 @@
         this->nextIndex_ = 0;
         this->nextLevel_ = this->availableLevels_.begin();
-    }
+
+        allLevelStatus_.reserve(1);
+    }
+
 
     LevelManager::~LevelManager()
@@ -103,4 +129,6 @@
         ModifyConfigValue(lastFinishedCampaignMission_, set, lastFinishedCampaignMission);
     }
+
+
 
     /**
Index: /code/branches/bindermFS16/src/orxonox/LevelManager.h
===================================================================
--- /code/branches/bindermFS16/src/orxonox/LevelManager.h	(revision 11172)
+++ /code/branches/bindermFS16/src/orxonox/LevelManager.h	(revision 11173)
@@ -48,4 +48,22 @@
 #include "core/config/Configurable.h"
 
+
+namespace orxonox
+{
+
+    class LevelStatus
+    {
+    public:
+        LevelStatus();
+        virtual ~LevelStatus();
+        
+
+    private:
+        bool won;
+        std::vector<int> nextLevels;
+
+    };
+}
+
 // tolua_begin
 namespace orxonox
@@ -63,6 +81,11 @@
         Damian 'Mozork' Frick
 
-    @ingroup Orxonox
+
+    @ingroup Orxonox1
     */
+
+
+
+
     class _OrxonoxExport LevelManager
     // tolua_end
@@ -74,11 +97,16 @@
             virtual ~LevelManager();
 
+            void setLevelStatus(int integer);
+
+
             void setConfigValues(); //!< Set the config values for this object.
 
             void requestActivity(Level* level); //!< Request activity for the input Level.
             void releaseActivity(Level* level); //!< Release activity for the input Level.
+
             Level* getActiveLevel(); //!< Get the currently active Level.
 
             // tolua_begin
+            bool missionactivate(int index);
             void setDefaultLevel(const std::string& levelName); //!< Set the default Level.
             /**
@@ -97,6 +125,8 @@
             inline unsigned int getNumberOfCampaignMissions()
                 { return this->campaignMissions_.size(); }
+
             inline const std::string& getCampaignMission(unsigned int index)
                 { return this->campaignMissions_[index]; }
+
 
             /**
@@ -129,4 +159,7 @@
             std::string lastFinishedCampaignMission_;
             std::vector<std::string> campaignMissions_;
+            std::vector<LevelStatus> allLevelStatus_;
+
+
 
             static LevelManager* singletonPtr_s;
Index: /code/branches/bindermFS16/src/orxonox/gametypes/Mission.cc
===================================================================
--- /code/branches/bindermFS16/src/orxonox/gametypes/Mission.cc	(revision 11172)
+++ /code/branches/bindermFS16/src/orxonox/gametypes/Mission.cc	(revision 11173)
@@ -92,4 +92,5 @@
 
             LevelManager::getInstance().setLastFinishedCampaignMission(this->getFilename());
+            //LevelManager::getInstance().setLevelStatus(7);
         }
         else if (!this->gtinfo_->hasEnded())
Index: /code/branches/bindermFS16/src/orxonox/overlays/CampaignMenu.cc
===================================================================
--- /code/branches/bindermFS16/src/orxonox/overlays/CampaignMenu.cc	(revision 11172)
+++ /code/branches/bindermFS16/src/orxonox/overlays/CampaignMenu.cc	(revision 11173)
@@ -33,6 +33,9 @@
 #include "core/GameMode.h"
 
+
 namespace orxonox
 {
+
+    
     RegisterClass(CampaignMenu);
 
@@ -52,6 +55,7 @@
     }
 
-    //loads the campaign menu
-    void CampaignMenu::loadNewMenu()
+
+    //loads the new campaign menu
+    void CampaignMenu::loadnewmenu()
     {
         
Index: /code/branches/bindermFS16/src/orxonox/overlays/CampaignMenu.h
===================================================================
--- /code/branches/bindermFS16/src/orxonox/overlays/CampaignMenu.h	(revision 11172)
+++ /code/branches/bindermFS16/src/orxonox/overlays/CampaignMenu.h	(revision 11173)
@@ -32,19 +32,22 @@
 #include <string>
 #include "core/BaseObject.h"
+#include "util/Singleton.h"
 
-
-namespace orxonox // tolua_export
-{ // tolua_export
-
-	class _OrxonoxExport CampaignMenu // tolua_export
-	 : public BaseObject
-    { // tolua_export
+//tolua_begin
+namespace orxonox
+{
+//tolua_end
+class _OrxonoxExport CampaignMenu : public BaseObject //tolua_export
+    { //tolua_export
     public:
         CampaignMenu(Context* context);
         ~CampaignMenu();
-        static void test(); // tolua_export
-        void loadNewMenu();
-    };// tolua_export
-} // tolua_export
+        static void test(); //tolua_export
+        void loadnewmenu();
+    }; //tolua_export
+
+
+
+} //tolua_export
 
 #endif /* _CampaignMenu_H__ */
