Planet
navi homePPSaboutscreenshotsdownloaddevelopmentforum

Ignore:
Timestamp:
Jul 19, 2009, 5:31:02 PM (15 years ago)
Author:
rgrieder
Message:

Merged all remaining revisions from core4 back to the trunk.

Location:
code/trunk
Files:
6 edited

Legend:

Unmodified
Added
Removed
  • code/trunk

  • code/trunk/src/orxonox/overlays/GUIOverlay.cc

    r3301 r3327  
    7070            str = out.str();
    7171            GUIManager::getInstance().executeCode("showCursor()");
    72             InputManager::getInstance().requestEnterState("guiMouseOnly");
     72            InputManager::getInstance().enterState("guiMouseOnly");
    7373            GUIManager::getInstance().executeCode("showGUI(\"" + this->guiName_ + "\", " + str + ")");
    7474        }
     
    7777            GUIManager::getInstance().executeCode("hideGUI(\"" + this->guiName_ + "\")");
    7878            GUIManager::getInstance().executeCode("hideCursor()");
    79             InputManager::getInstance().requestLeaveState("guiMouseOnly");
     79            InputManager::getInstance().leaveState("guiMouseOnly");
    8080        }
    8181    }
  • code/trunk/src/orxonox/overlays/OrxonoxOverlay.cc

    r3301 r3327  
    4747#include "core/XMLPort.h"
    4848#include "core/ConsoleCommand.h"
    49 #include "GraphicsManager.h"
    5049
    5150namespace orxonox
     
    8180
    8281        // Get aspect ratio from the render window. Later on, we get informed automatically
    83         Ogre::RenderWindow* defaultWindow = GraphicsManager::getInstance().getRenderWindow();
    84         this->windowAspectRatio_ = static_cast<float>(defaultWindow->getWidth()) / defaultWindow->getHeight();
     82        this->windowAspectRatio_ = static_cast<float>(this->getWindowWidth()) / this->getWindowHeight();
    8583        this->sizeCorrectionChanged();
    8684
  • code/trunk/src/orxonox/overlays/OrxonoxOverlay.h

    r3196 r3327  
    4242#include "util/OgreForwardRefs.h"
    4343#include "core/BaseObject.h"
    44 #include "interfaces/WindowEventListener.h"
     44#include "core/WindowEventListener.h"
    4545
    4646namespace orxonox
  • code/trunk/src/orxonox/overlays/console/InGameConsole.cc

    r3301 r3327  
    4949#include "core/ConsoleCommand.h"
    5050#include "core/input/InputManager.h"
    51 #include "core/input/SimpleInputState.h"
     51#include "core/input/InputState.h"
    5252#include "core/input/InputBuffer.h"
    5353
     
    9898
    9999        // destroy the input state previously created (InputBuffer gets destroyed by the Shell)
    100         InputManager::getInstance().requestDestroyState("console");
     100        InputManager::getInstance().destroyState("console");
    101101
    102102        Ogre::OverlayManager* ovMan = Ogre::OverlayManager::getSingletonPtr();
     
    158158            if (bHidesAllInput_)
    159159            {
    160                 inputState_->setMouseHandler(&InputManager::EMPTY_HANDLER);
    161                 inputState_->setJoyStickHandler(&InputManager::EMPTY_HANDLER);
     160                inputState_->setMouseHandler(&InputHandler::EMPTY);
     161                inputState_->setJoyStickHandler(&InputHandler::EMPTY);
    162162            }
    163163            else
     
    172172        @brief Initializes the InGameConsole.
    173173    */
    174     void InGameConsole::initialise(int windowWidth, int windowHeight)
     174    void InGameConsole::initialise()
    175175    {
    176176        // create the corresponding input state
    177         inputState_ = InputManager::getInstance().createInputState<SimpleInputState>("console", false, false, InputStatePriority::Console);
     177        inputState_ = InputManager::getInstance().createInputState("console", false, false, InputStatePriority::Console);
    178178        inputState_->setKeyHandler(Shell::getInstance().getInputBuffer());
    179179        bHidesAllInputChanged();
     
    248248        this->consoleOverlayContainer_->addChild(this->consoleOverlayNoise_);
    249249
    250         this->windowResized(windowWidth, windowHeight);
     250        this->windowResized(this->getWindowWidth(), this->getWindowWidth());
    251251
    252252        // move overlay "above" the top edge of the screen
     
    507507        {
    508508            this->bActive_ = true;
    509             InputManager::getInstance().requestEnterState("console");
     509            InputManager::getInstance().enterState("console");
    510510            Shell::getInstance().registerListener(this);
    511511
     
    529529        {
    530530            this->bActive_ = false;
    531             InputManager::getInstance().requestLeaveState("console");
     531            InputManager::getInstance().leaveState("console");
    532532            Shell::getInstance().unregisterListener(this);
    533533
  • code/trunk/src/orxonox/overlays/console/InGameConsole.h

    r3196 r3327  
    3636#include "util/OgreForwardRefs.h"
    3737#include "core/Shell.h"
    38 #include "interfaces/WindowEventListener.h"
     38#include "core/WindowEventListener.h"
    3939
    4040namespace orxonox
     
    4646        ~InGameConsole();
    4747
    48         void initialise(int windowWidth, int windowHeight);
     48        void initialise();
    4949        void destroy();
    5050        void setConfigValues();
     
    101101
    102102        // input related
    103         SimpleInputState* inputState_;
     103        InputState* inputState_;
    104104
    105105        // config values
Note: See TracChangeset for help on using the changeset viewer.