Planet
navi homePPSaboutscreenshotsdownloaddevelopmentforum

Ignore:
Timestamp:
Apr 16, 2010, 1:07:57 PM (15 years ago)
Author:
rgrieder
Message:
  • Bugfix in keyESC.
  • Default behaviour for GUI sheet InputStates is now not to handle keyboard input —> KeyBinder is used.
  • Added some temporary hackery to GSMainMenu to enable the use of Keys in the MainMenu.
Location:
code/branches/gamestates2
Files:
3 edited

Legend:

Unmodified
Added
Removed
  • code/branches/gamestates2/data/gui/scripts/MenuSheet.lua

    r6718 r6743  
    1616    newSheet.bHidePrevious  = handleDefArg(_bHidePrevious,  true)
    1717    newSheet.tShowCursor    = handleDefArg(_tShowCusor,     TriBool.True)
    18     newSheet.tUseKeyboard   = handleDefArg(_tUseKeyboard,   TriBool.True)
     18    newSheet.tUseKeyboard   = handleDefArg(_tUseKeyboard,   TriBool.Dontcare)
    1919    newSheet.bBlockJoyStick = handleDefArg(_bBlockJoyStick, false)
    2020
  • code/branches/gamestates2/data/gui/scripts/SheetManager.lua

    r6737 r6743  
    181181        orxonox.execute("exit")
    182182    elseif activeMenuSheets.size > 0 then
    183         orxonox.execute("hideMenuSheet "..activeMenuSheets.topSheetTuple.sheet.name)
     183        orxonox.execute("hideGUI "..activeMenuSheets.topSheetTuple.sheet.name)
    184184    else
    185185        showMenuSheet("InGameMenu")
  • code/branches/gamestates2/src/orxonox/gamestates/GSMainMenu.cc

    r6741 r6743  
    4040#include "Scene.h"
    4141#include "sound/AmbientSound.h"
     42// HACK
     43#include "core/input/InputManager.h"
     44#include "core/input/InputState.h"
    4245
    4346namespace orxonox
     
    4952    {
    5053        RegisterRootObject(GSMainMenu);
     54
     55        InputManager::getInstance().createInputState("MainMenuHackery")->setKeyHandler(KeyBinderManager::getInstance().getDefaultAsHandler());
    5156
    5257        // create an empty Scene
     
    6873            this->ambient_->destroy();
    6974
     75        InputManager::getInstance().destroyState("MainMenuHackery");
     76
    7077        this->scene_->getSceneManager()->destroyCamera(this->camera_);
    7178        this->scene_->destroy();
     
    7986        GUIManager::getInstance().setBackgroundImage("MainMenuBackground", "Background");
    8087        GraphicsManager::getInstance().setCamera(this->camera_);
     88
     89        InputManager::getInstance().enterState("MainMenuHackery");
    8190
    8291        CommandExecutor::addConsoleCommandShortcut(createConsoleCommand(createFunctor(&GSMainMenu::startStandalone), "startGame"));
     
    106115            this->ambient_->stop();
    107116        }
     117
     118        InputManager::getInstance().leaveState("MainMenuHackery");
    108119
    109120        GUIManager::getInstance().setCamera(0);
Note: See TracChangeset for help on using the changeset viewer.