Changeset 3274 for code/branches/core4/src/orxonox
- Timestamp:
- Jul 12, 2009, 4:12:04 PM (15 years ago)
- Location:
- code/branches/core4/src/orxonox
- Files:
-
- 10 edited
Legend:
- Unmodified
- Added
- Removed
-
code/branches/core4/src/orxonox/gamestates/GSGraphics.cc
r3270 r3274 38 38 #include <OgreRenderWindow.h> 39 39 40 #include "util/Convert.h" 40 41 #include "core/ConfigValueIncludes.h" 41 42 #include "core/Clock.h" 43 #include "core/CommandExecutor.h" 42 44 #include "core/ConsoleCommand.h" 43 45 #include "core/Core.h" … … 47 49 #include "core/input/InputManager.h" 48 50 #include "core/input/KeyBinder.h" 49 #include "core/input/ SimpleInputState.h"51 #include "core/input/InputState.h" 50 52 #include "core/Loader.h" 51 53 #include "core/XMLFile.h" … … 125 127 126 128 // load master key bindings 127 masterInputState_ = InputManager::getInstance().createInputState <SimpleInputState>("master", true);129 masterInputState_ = InputManager::getInstance().createInputState("master", true); 128 130 masterKeyBinder_ = new KeyBinder(); 129 131 masterKeyBinder_->loadBindings("masterKeybindings.ini"); … … 244 246 { 245 247 // OIS needs this under linux even if we only use relative input measurement. 246 if (this->inputManager_)247 this->inputManager_->setWindowExtents(newWidth, newHeight);248 // HACK: 249 CommandExecutor::execute("setWindowExtents_s " + multi_cast<std::string>(newWidth) + " " + multi_cast<std::string>(newHeight)); 248 250 } 249 251 -
code/branches/core4/src/orxonox/gamestates/GSGraphics.h
r3243 r3274 75 75 76 76 KeyBinder* masterKeyBinder_; //!< Key binder for master key bindings 77 SimpleInputState*masterInputState_; //!< Special input state for master input77 InputState* masterInputState_; //!< Special input state for master input 78 78 XMLFile* debugOverlay_; 79 79 ConsoleCommand* ccToggleGUI_; //!< Console command to toggle GUI -
code/branches/core4/src/orxonox/gamestates/GSLevel.cc
r3249 r3274 31 31 32 32 #include "core/input/InputManager.h" 33 #include "core/input/ SimpleInputState.h"33 #include "core/input/InputState.h" 34 34 #include "core/input/KeyBinder.h" 35 35 #include "core/Clock.h" … … 90 90 if (GameMode::showsGraphics()) 91 91 { 92 gameInputState_ = InputManager::getInstance().createInputState <SimpleInputState>("game");92 gameInputState_ = InputManager::getInstance().createInputState("game"); 93 93 keyBinder_ = new KeyBinder(); 94 94 keyBinder_->loadBindings("keybindings.ini"); 95 95 gameInputState_->setHandler(keyBinder_); 96 96 97 guiMouseOnlyInputState_ = InputManager::getInstance().createInputState <SimpleInputState>("guiMouseOnly");97 guiMouseOnlyInputState_ = InputManager::getInstance().createInputState("guiMouseOnly"); 98 98 guiMouseOnlyInputState_->setMouseHandler(GUIManager::getInstancePtr()); 99 99 100 guiKeysOnlyInputState_ = InputManager::getInstance().createInputState <SimpleInputState>("guiKeysOnly");100 guiKeysOnlyInputState_ = InputManager::getInstance().createInputState("guiKeysOnly"); 101 101 guiKeysOnlyInputState_->setKeyHandler(GUIManager::getInstancePtr()); 102 102 -
code/branches/core4/src/orxonox/gamestates/GSLevel.h
r3245 r3274 63 63 64 64 KeyBinder* keyBinder_; //!< tool that loads and manages the input bindings 65 SimpleInputState*gameInputState_; //!< input state for normal ingame playing66 SimpleInputState*guiMouseOnlyInputState_; //!< input state if we only need the mouse to use the GUI67 SimpleInputState*guiKeysOnlyInputState_; //!< input state if we only need the keys to use the GUI65 InputState* gameInputState_; //!< input state for normal ingame playing 66 InputState* guiMouseOnlyInputState_; //!< input state if we only need the mouse to use the GUI 67 InputState* guiKeysOnlyInputState_; //!< input state if we only need the keys to use the GUI 68 68 Radar* radar_; //!< represents the Radar (not the HUD part) 69 69 CameraManager* cameraManager_; //!< camera manager for this level -
code/branches/core4/src/orxonox/gamestates/GSMainMenu.cc
r3245 r3274 32 32 33 33 #include "core/input/InputManager.h" 34 #include "core/input/ SimpleInputState.h"34 #include "core/input/InputState.h" 35 35 #include "core/Game.h" 36 36 #include "core/Clock.h" … … 57 57 void GSMainMenu::activate() 58 58 { 59 inputState_ = InputManager::getInstance().createInputState <SimpleInputState>("mainMenu");59 inputState_ = InputManager::getInstance().createInputState("mainMenu"); 60 60 inputState_->setHandler(GUIManager::getInstancePtr()); 61 inputState_->setJoyStickHandler(&Input Manager::EMPTY_HANDLER);61 inputState_->setJoyStickHandler(&InputHandler::EMPTY); 62 62 63 63 // create an empty Scene -
code/branches/core4/src/orxonox/gamestates/GSMainMenu.h
r3243 r3274 53 53 54 54 private: 55 SimpleInputState*inputState_;55 InputState* inputState_; 56 56 Scene* scene_; 57 57 Ogre::Camera* camera_; -
code/branches/core4/src/orxonox/gui/GUIManager.cc
r3261 r3274 366 366 void GUIManager::keyPressed(const KeyEvent& evt) 367 367 { 368 guiSystem_->injectKeyDown(evt.key); guiSystem_->injectChar(evt.text); 368 guiSystem_->injectKeyDown(evt.getKeyCode()); 369 guiSystem_->injectChar(evt.getText()); 369 370 } 370 371 void GUIManager::keyReleased(const KeyEvent& evt) 371 372 { 372 guiSystem_->injectKeyUp(evt. key);373 guiSystem_->injectKeyUp(evt.getKeyCode()); 373 374 } 374 375 … … 382 383 It is for CEGUI to process the event. 383 384 */ 384 void GUIManager:: mouseButtonPressed(MouseButtonCode::ByEnum id)385 void GUIManager::buttonPressed(MouseButtonCode::ByEnum id) 385 386 { 386 387 try … … 404 405 It is for CEGUI to process the event. 405 406 */ 406 void GUIManager:: mouseButtonReleased(MouseButtonCode::ByEnum id)407 void GUIManager::buttonReleased(MouseButtonCode::ByEnum id) 407 408 { 408 409 try -
code/branches/core4/src/orxonox/gui/GUIManager.h
r3261 r3274 44 44 45 45 #include "util/OgreForwardRefs.h" 46 #include "core/input/Input Interfaces.h"46 #include "core/input/InputHandler.h" 47 47 48 48 // tolua_begin … … 62 62 class _OrxonoxExport GUIManager 63 63 // tolua_end 64 : public KeyHandler, public MouseHandler64 : public InputHandler 65 65 // tolua_begin 66 66 { … … 106 106 void keyPressed (const KeyEvent& evt); 107 107 void keyReleased(const KeyEvent& evt); 108 void keyHeld (const KeyEvent& evt) { }109 108 110 109 // mouseHandler functions 111 void mouseButtonPressed (MouseButtonCode::ByEnum id); 112 void mouseButtonReleased(MouseButtonCode::ByEnum id); 113 void mouseButtonHeld (MouseButtonCode::ByEnum id) { } 114 void mouseMoved (IntVector2 abs, IntVector2 rel, IntVector2 clippingSize); 115 void mouseScrolled (int abs, int rel); 116 117 void updateInput(float dt) { } 118 void updateKey (float dt) { } 119 void updateMouse(float dt) { } 110 void buttonPressed (MouseButtonCode::ByEnum id); 111 void buttonReleased(MouseButtonCode::ByEnum id); 112 void mouseMoved (IntVector2 abs, IntVector2 rel, IntVector2 clippingSize); 113 void mouseScrolled (int abs, int rel); 120 114 121 115 Ogre::RenderWindow* renderWindow_; //!< Ogre's render window to give CEGUI access to it -
code/branches/core4/src/orxonox/overlays/console/InGameConsole.cc
r3265 r3274 49 49 #include "core/ConsoleCommand.h" 50 50 #include "core/input/InputManager.h" 51 #include "core/input/ SimpleInputState.h"51 #include "core/input/InputState.h" 52 52 #include "core/input/InputBuffer.h" 53 53 … … 158 158 if (bHidesAllInput_) 159 159 { 160 inputState_->setMouseHandler(&Input Manager::EMPTY_HANDLER);161 inputState_->setJoyStickHandler(&Input Manager::EMPTY_HANDLER);160 inputState_->setMouseHandler(&InputHandler::EMPTY); 161 inputState_->setJoyStickHandler(&InputHandler::EMPTY); 162 162 } 163 163 else … … 175 175 { 176 176 // create the corresponding input state 177 inputState_ = InputManager::getInstance().createInputState <SimpleInputState>("console", false, false, InputStatePriority::Console);177 inputState_ = InputManager::getInstance().createInputState("console", false, false, InputStatePriority::Console); 178 178 inputState_->setKeyHandler(Shell::getInstance().getInputBuffer()); 179 179 bHidesAllInputChanged(); -
code/branches/core4/src/orxonox/overlays/console/InGameConsole.h
r3196 r3274 101 101 102 102 // input related 103 SimpleInputState* inputState_;103 InputState* inputState_; 104 104 105 105 // config values
Note: See TracChangeset
for help on using the changeset viewer.