Planet
navi homePPSaboutscreenshotsdownloaddevelopmentforum

Ignore:
Timestamp:
May 22, 2009, 9:15:59 AM (15 years ago)
Author:
scheusso
Message:

console command grabMouse / ungrabMouse now working (used for a presentation hack)

Location:
code/branches/netp3/src/core/input
Files:
2 edited

Legend:

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

    r3005 r3014  
    4141#include "ois/OISException.h"
    4242#include "ois/OISInputManager.h"
     43#include "core/ConsoleCommand.h"
    4344
    4445// HACK
     
    5253#include "core/ConfigValueIncludes.h"
    5354#include "core/CommandExecutor.h"
    54 #include "core/ConsoleCommand.h"
    5555#include "core/CommandLine.h"
    5656#include "util/Debug.h"
     
    6969    SetConsoleCommand(InputManager, calibrate, true);
    7070    SetConsoleCommand(InputManager, reload, false);
     71    SetConsoleCommand(InputManager, grabMouse, true);
     72    SetConsoleCommand(InputManager, ungrabMouse, true);
    7173    SetCommandLineSwitch(keyboard_no_grab);
    7274
     
    14841486    void InputManager::grabMouse()
    14851487    {
    1486         OIS::LinuxMouse* linuxMouse = dynamic_cast<OIS::LinuxMouse*>(this->mouse_);
     1488        OIS::LinuxMouse* linuxMouse = dynamic_cast<OIS::LinuxMouse*>(singletonRef_s->mouse_);
    14871489        assert(linuxMouse);
    14881490        linuxMouse->grab(true);
     
    14911493    void InputManager::ungrabMouse()
    14921494    {
    1493         OIS::LinuxMouse* linuxMouse = dynamic_cast<OIS::LinuxMouse*>(this->mouse_);
     1495        OIS::LinuxMouse* linuxMouse = dynamic_cast<OIS::LinuxMouse*>(singletonRef_s->mouse_);
    14941496        assert(linuxMouse);
    14951497        linuxMouse->grab(false);
  • code/branches/netp3/src/core/input/InputManager.h

    r3005 r3014  
    140140#ifdef ORXONOX_PLATFORM_LINUX
    141141        // HACK!
    142         void grabMouse();
    143         void ungrabMouse();
     142        static void grabMouse();
     143        static void ungrabMouse();
    144144#endif
    145145
Note: See TracChangeset for help on using the changeset viewer.