Planet
navi homePPSaboutscreenshotsdownloaddevelopmentforum

Ignore:
Timestamp:
Mar 16, 2010, 1:49:16 PM (15 years ago)
Author:
rgrieder
Message:

Linked every GUI sheet to exactly one InputState.
Also added util/TriBool that has states {true, false, Dontcare}.

Location:
code/branches/gamestate/src/orxonox/gamestates
Files:
2 edited

Legend:

Unmodified
Added
Removed
  • code/branches/gamestate/src/orxonox/gamestates/GSLevel.cc

    r6417 r6537  
    6969        {
    7070            gameInputState_ = InputManager::getInstance().createInputState("game");
    71             gameInputState_->setMouseMode(MouseMode::Exclusive);
     71            gameInputState_->setMouseExclusive(TriBool::True);
    7272            gameInputState_->setHandler(KeyBinderManager::getInstance().getDefaultAsHandler());
    7373            KeyBinderManager::getInstance().setToDefault();
    7474
    7575            guiMouseOnlyInputState_ = InputManager::getInstance().createInputState("guiMouseOnly");
    76             guiMouseOnlyInputState_->setMouseMode(MouseMode::Exclusive);
    77             guiMouseOnlyInputState_->setMouseHandler(GUIManager::getInstancePtr());
     76            guiMouseOnlyInputState_->setMouseExclusive(TriBool::True);
     77            guiMouseOnlyInputState_->setMouseHandler(&GUIManager::getInstance());
    7878
    7979            guiKeysOnlyInputState_ = InputManager::getInstance().createInputState("guiKeysOnly");
    80             guiKeysOnlyInputState_->setKeyHandler(GUIManager::getInstancePtr());
     80            guiKeysOnlyInputState_->setKeyHandler(&GUIManager::getInstance());
    8181        }
    8282
  • code/branches/gamestate/src/orxonox/gamestates/GSMainMenu.cc

    r6417 r6537  
    5353        RegisterRootObject(GSMainMenu);
    5454        inputState_ = InputManager::getInstance().createInputState("mainMenu");
    55         inputState_->setMouseMode(MouseMode::Nonexclusive);
    56         inputState_->setHandler(GUIManager::getInstancePtr());
     55        inputState_->setMouseExclusive(TriBool::False);
     56        inputState_->setHandler(&GUIManager::getInstance());
    5757        inputState_->setKeyHandler(KeyBinderManager::getInstance().getDefaultAsHandler());
    5858        inputState_->setJoyStickHandler(&InputHandler::EMPTY);
     
    101101
    102102        KeyBinderManager::getInstance().setToDefault();
    103         InputManager::getInstance().enterState("mainMenu");
     103        //InputManager::getInstance().enterState("mainMenu");
    104104
    105105        this->setConfigValues();
     
    119119        }
    120120
    121         InputManager::getInstance().leaveState("mainMenu");
     121        //InputManager::getInstance().leaveState("mainMenu");
    122122
    123123        GUIManager::getInstance().setCamera(0);
Note: See TracChangeset for help on using the changeset viewer.