Planet
navi homePPSaboutscreenshotsdownloaddevelopmentforum

Ignore:
Timestamp:
Mar 31, 2010, 1:05:28 AM (15 years ago)
Author:
rgrieder
Message:

Merged revisions 6621-6661 to gamestates2.

Location:
code/branches/gamestates2
Files:
2 edited

Legend:

Unmodified
Added
Removed
  • code/branches/gamestates2

  • code/branches/gamestates2/src/libraries/core/GUIManager.cc

    r6595 r6662  
    253253    }
    254254
    255     const std::string& GUIManager::createInputState(const std::string& name, TriBool::Value showMouse, TriBool::Value useKeyboard, bool bBlockJoyStick)
     255    const std::string& GUIManager::createInputState(const std::string& name, TriBool::Value showCursor, TriBool::Value useKeyboard, bool bBlockJoyStick)
    256256    {
    257257        InputState* state = InputManager::getInstance().createInputState(name);
    258258
    259         if (GraphicsManager::getInstance().isFullScreen() && showMouse == TriBool::True ||
    260            !GraphicsManager::getInstance().isFullScreen() && showMouse == TriBool::False)
     259        /* Table that maps isFullScreen() and showCursor to mouseExclusive
     260        isFullscreen / showCursor | True  | False | Dontcare
     261        ----------------------------------------------------
     262        true                      | True  | True  | Dontcare
     263        ----------------------------------------------------
     264        false                     | False | True  | Dontcare
     265        */
     266        if (showCursor == TriBool::Dontcare)
     267            state->setMouseExclusive(TriBool::Dontcare);
     268        else if (GraphicsManager::getInstance().isFullScreen() || showCursor == TriBool::False)
    261269            state->setMouseExclusive(TriBool::True);
    262270        else
    263             state->setMouseExclusive(TriBool::Dontcare);
    264 
    265         if (showMouse == TriBool::True)
     271            state->setMouseExclusive(TriBool::False);
     272
     273        if (showCursor == TriBool::True)
    266274            state->setMouseHandler(this);
    267         else if (showMouse == TriBool::False)
     275        else if (showCursor == TriBool::False)
    268276            state->setMouseHandler(&InputHandler::EMPTY);
    269277
Note: See TracChangeset for help on using the changeset viewer.