Changeset 3148
- Timestamp:
- Jun 11, 2009, 10:26:40 PM (15 years ago)
- Location:
- code/branches/pch/src/core/input
- Files:
-
- 16 edited
Legend:
- Unmodified
- Added
- Removed
-
code/branches/pch/src/core/input/ExtendedInputState.cc
r2896 r3148 36 36 37 37 #include <cassert> 38 #include " util/Debug.h"38 #include "core/Executor.h" 39 39 40 40 namespace orxonox … … 457 457 this->bHandlersChanged_ = true; 458 458 } 459 460 void ExtendedInputState::onEnter() 461 { 462 if (executorOnEnter_) 463 (*executorOnEnter_)(); 464 } 465 466 void ExtendedInputState::onLeave() 467 { 468 if (executorOnLeave_) 469 (*executorOnLeave_)(); 470 } 459 471 } -
code/branches/pch/src/core/input/ExtendedInputState.h
r2896 r3148 38 38 39 39 #include <vector> 40 41 40 #include "InputInterfaces.h" 42 41 #include "InputState.h" … … 89 88 void update(); 90 89 90 void onEnter(); 91 void onLeave(); 92 91 93 std::vector<KeyHandler*> keyHandlers_; 92 94 std::vector<MouseHandler*> mouseHandlers_; -
code/branches/pch/src/core/input/HalfAxis.h
r2087 r3148 37 37 38 38 #include "core/CorePrereqs.h" 39 39 40 #include "Button.h" 40 41 #include "InputCommands.h" -
code/branches/pch/src/core/input/InputBuffer.cc
r2896 r3148 28 28 29 29 #include "InputBuffer.h" 30 31 #include <iostream>32 30 33 31 #include "util/Clipboard.h" … … 57 55 } 58 56 59 InputBuffer::InputBuffer(const std::string allowedChars)57 InputBuffer::InputBuffer(const std::string& allowedChars) 60 58 { 61 59 RegisterRootObject(InputBuffer); -
code/branches/pch/src/core/input/InputBuffer.h
r2896 r3148 32 32 #include "core/CorePrereqs.h" 33 33 34 #include <list> 34 35 #include <string> 35 #include <list>36 37 36 #include "core/OrxonoxClass.h" 38 37 #include "InputInterfaces.h" … … 80 79 InputBuffer(); 81 80 ~InputBuffer(); 82 InputBuffer(const std::string allowedChars);81 InputBuffer(const std::string& allowedChars); 83 82 84 83 void setConfigValues(); … … 145 144 void updated(const char& update, bool bSingleInput); 146 145 147 inline std::stringget() const146 inline const std::string& get() const 148 147 { return this->buffer_; } 149 148 inline unsigned int getSize() const -
code/branches/pch/src/core/input/InputCommands.cc
r2087 r3148 35 35 #include "InputCommands.h" 36 36 #include "util/Math.h" 37 #include "core/CommandExecutor.h"38 37 39 38 namespace orxonox -
code/branches/pch/src/core/input/InputInterfaces.h
r2896 r3148 38 38 #include "core/CorePrereqs.h" 39 39 40 #include "ois/OISKeyboard.h"41 #include "ois/OISMouse.h"42 #include "ois/OISJoyStick.h"40 #include <ois/OISKeyboard.h> 41 #include <ois/OISMouse.h> 42 #include <ois/OISJoyStick.h> 43 43 #include "util/Math.h" 44 44 -
code/branches/pch/src/core/input/InputManager.cc
r3147 r3148 38 38 #include <climits> 39 39 #include <cassert> 40 41 #include "ois/OISException.h" 42 #include "ois/OISInputManager.h" 43 #include "core/ConsoleCommand.h" 40 #include <ois/OISException.h> 41 #include <ois/OISInputManager.h> 44 42 45 43 // HACK 46 44 #ifdef ORXONOX_PLATFORM_LINUX 47 # include "ois/linux/LinuxMouse.h"45 # include <ois/linux/LinuxMouse.h> 48 46 #endif 49 47 50 48 #include "util/Exception.h" 49 #include "util/Debug.h" 50 #include "core/ConsoleCommand.h" 51 51 #include "core/Clock.h" 52 52 #include "core/CoreIncludes.h" 53 53 #include "core/ConfigValueIncludes.h" 54 #include "core/CommandExecutor.h"55 54 #include "core/CommandLine.h" 56 #include "util/Debug.h"57 55 58 56 #include "InputBuffer.h" 59 #include "KeyBinder.h"60 57 #include "KeyDetector.h" 61 58 #include "InputState.h" -
code/branches/pch/src/core/input/InputManager.h
r3084 r3148 40 40 41 41 #include <map> 42 #include <set> 43 #include <string> 42 44 #include <vector> 43 #include <stack> 45 #include <ois/OISKeyboard.h> 46 #include <ois/OISMouse.h> 47 #include <ois/OISJoyStick.h> 48 44 49 #include "util/Math.h" 45 50 #include "util/OrxEnum.h" -
code/branches/pch/src/core/input/InputState.h
r2896 r3148 39 39 #include <string> 40 40 #include <vector> 41 #include "core/Executor.h"42 41 #include "InputInterfaces.h" 43 42 … … 63 62 void resetHandlersChanged() { bHandlersChanged_ = false; } 64 63 65 virtual void onEnter() { if (executorOnEnter_) (*executorOnEnter_)(); }66 virtual void onLeave() { if (executorOnLeave_) (*executorOnLeave_)(); }64 virtual void onEnter() = 0; 65 virtual void onLeave() = 0; 67 66 68 67 virtual void registerOnEnter(Executor* executor) { executorOnEnter_ = executor; } … … 108 107 109 108 bool bHandlersChanged_; 109 Executor* executorOnEnter_; 110 Executor* executorOnLeave_; 110 111 111 112 private: … … 123 124 bool bAlwaysGetsInput_; 124 125 bool bTransparent_; 125 126 Executor* executorOnEnter_;127 Executor* executorOnLeave_;128 126 }; 129 127 } -
code/branches/pch/src/core/input/KeyBinder.cc
r2896 r3148 33 33 34 34 #include "KeyBinder.h" 35 36 #include <fstream>37 #include <string>38 35 39 36 #include "util/Convert.h" -
code/branches/pch/src/core/input/KeyBinder.h
r2896 r3148 38 38 #include "core/CorePrereqs.h" 39 39 40 #include <cassert> 41 #include <string> 40 42 #include <vector> 41 #include <cassert>42 43 43 44 #include "InputInterfaces.h" -
code/branches/pch/src/core/input/KeyDetector.cc
r1887 r3148 34 34 35 35 #include "KeyDetector.h" 36 36 37 #include "util/Debug.h" 37 38 #include "core/CoreIncludes.h" 38 #include "core/CommandExecutor.h"39 #include "core/CommandEvaluation.h"40 #include "InputCommands.h"41 39 #include "Button.h" 42 40 -
code/branches/pch/src/core/input/KeyDetector.h
r1887 r3148 38 38 #include "core/CorePrereqs.h" 39 39 40 #include <string> 40 41 #include "KeyBinder.h" 41 42 -
code/branches/pch/src/core/input/SimpleInputState.cc
r1887 r3148 34 34 35 35 #include "SimpleInputState.h" 36 #include "core/Executor.h" 36 37 37 38 namespace orxonox … … 148 149 bHandlersChanged_ = true; 149 150 } 151 152 void SimpleInputState::onEnter() 153 { 154 if (executorOnEnter_) 155 (*executorOnEnter_)(); 156 } 157 158 void SimpleInputState::onLeave() 159 { 160 if (executorOnLeave_) 161 (*executorOnLeave_)(); 162 } 150 163 } -
code/branches/pch/src/core/input/SimpleInputState.h
r2896 r3148 79 79 void update(); 80 80 void numberOfJoySticksChanged(unsigned int n); 81 82 void onEnter(); 83 void onLeave(); 81 84 82 85 KeyHandler* keyHandler_;
Note: See TracChangeset
for help on using the changeset viewer.