Planet
navi homePPSaboutscreenshotsdownloaddevelopmentforum

Ignore:
Timestamp:
Apr 6, 2009, 1:59:00 AM (15 years ago)
Author:
landauf
Message:

Merged gui branch back to trunk.

I did 2 small changes in IngameManager.cc on line 777 and 888 (yes, really), because const_reverse_iterator strangely doesn't work on MinGW.

Location:
code/trunk
Files:
2 edited

Legend:

Unmodified
Added
Removed
  • code/trunk

  • code/trunk/src/orxonox/gamestates/GSStandalone.cc

    r2790 r2896  
    3232#include <OgreViewport.h>
    3333#include <OgreCamera.h>
    34 #include "core/Core.h"
     34#include "core/Game.h"
     35#include "core/GameMode.h"
    3536#include "core/ConsoleCommand.h"
    3637#include "gui/GUIManager.h"
     38#include "GraphicsManager.h"
    3739
    3840namespace orxonox
    3941{
    40     SetConsoleCommand(GSStandalone, showGUI, true).setAsInputCommand();
     42    AddGameState(GSStandalone, "standalone");
    4143
    42     bool GSStandalone::guiShowing_s = false;
    43 
    44     GSStandalone::GSStandalone()
    45         : GameState<GSGraphics>("standalone")
     44    GSStandalone::GSStandalone(const std::string& name)
     45        : GameState(name)
    4646    {
    4747    }
     
    5151    }
    5252
    53     void GSStandalone::showGUI()
     53
     54    void GSStandalone::activate()
    5455    {
    55         GSStandalone::guiShowing_s = true;
     56        GameMode::setIsStandalone(true);
    5657    }
    5758
    58     void GSStandalone::enter()
     59    void GSStandalone::deactivate()
    5960    {
    60         Core::setIsStandalone(true);
    61 
    62         GSLevel::enter(this->getParent()->getViewport());
    63 
    64         guiManager_ = getParent()->getGUIManager();
    65         // not sure if necessary
    66         // guiManager_->loadScene("IngameMenu");
     61        GameMode::setIsStandalone(false);
    6762    }
    6863
    69     void GSStandalone::leave()
     64    void GSStandalone::update(const Clock& time)
    7065    {
    71         GSLevel::leave();
    72 
    73         Core::setIsStandalone(false);
    74     }
    75 
    76     void GSStandalone::ticked(const Clock& time)
    77     {
    78         if (guiShowing_s)
    79         {
    80             guiManager_->showGUI("IngameMenu", this->getParent()->getViewport()->getCamera()->getSceneManager());
    81         }
    82         else
    83         {
    84             if (guiManager_)
    85                 guiManager_->hideGUI();
    86         }
    87         // tick CEGUI
    88         guiManager_->tick(time.getDeltaTime());
    89 
    90         GSLevel::ticked(time);
    91         this->tickChild(time);
    9266    }
    9367}
Note: See TracChangeset for help on using the changeset viewer.