Planet
navi homePPSaboutscreenshotsdownloaddevelopmentforum

Ignore:
Timestamp:
Mar 5, 2011, 11:07:39 PM (13 years ago)
Author:
landauf
Message:

update exclusive mouse mode and cursor visibility when changing fullscreen/window mode

Location:
code/branches/usability/src/libraries/core/input
Files:
2 edited

Legend:

Unmodified
Added
Removed
  • code/branches/usability/src/libraries/core/input/InputManager.cc

    r7874 r8023  
    641641        state->destroy();
    642642    }
     643
     644    bool InputManager::setMouseExclusive(const std::string& name, TriBool::Value value)
     645    {
     646        if (name == "empty")
     647        {
     648            COUT(2) << "InputManager: Changing the empty state is not allowed!" << std::endl;
     649            return false;
     650        }
     651        std::map<std::string, InputState*>::iterator it = statesByName_.find(name);
     652        if (it != statesByName_.end())
     653        {
     654            it->second->setMouseExclusive(value);
     655            return true;
     656        }
     657        return false;
     658    }
    643659}
  • code/branches/usability/src/libraries/core/input/InputManager.h

    r7874 r8023  
    163163        */
    164164        bool destroyState(const std::string& name); // tolua_export
     165        /**
     166        @brief
     167            Changes the mouse mode of an input state.
     168        @return
     169            True if the call was successful, fals if the name was not found
     170        */
     171        bool setMouseExclusive(const std::string& name, TriBool::Value value); // tolua_export
    165172
    166173        //-------------------------------
Note: See TracChangeset for help on using the changeset viewer.