Changeset 10829 for code/branches/cpp11_v2/src/libraries/core
- Timestamp:
- Nov 22, 2015, 5:30:57 PM (9 years ago)
- Location:
- code/branches/cpp11_v2/src/libraries/core/input
- Files:
-
- 2 edited
Legend:
- Unmodified
- Added
- Removed
-
code/branches/cpp11_v2/src/libraries/core/input/KeyBinderManager.cc
r10768 r10829 205 205 void KeyBinderManager::registerKeybindCallback(LuaFunctor* function) 206 206 { 207 this->callbackFunction_ = function;207 this->callbackFunction_.reset(function); 208 208 } 209 209 } -
code/branches/cpp11_v2/src/libraries/core/input/KeyBinderManager.h
r10825 r10829 34 34 #include <map> 35 35 #include <string> 36 #include <memory> 36 37 37 38 #include "util/Singleton.h" 38 #include "util/SharedPtr.h"39 39 #include "core/config/Configurable.h" 40 40 … … 108 108 109 109 // KeyBinder management 110 KeyBinder* currentBinder_; //! Currently selected KeyBinder (never nullptr!)111 std::map<std::string, KeyBinder*> binders_; //! All loaded KeyBinders112 bool bDefaultFileLoaded_; //! Tells whether the default one is loaded113 std::string defaultFilename_; //! Name of the file with the default key bindings110 KeyBinder* currentBinder_; //! Currently selected KeyBinder (never nullptr!) 111 std::map<std::string, KeyBinder*> binders_; //! All loaded KeyBinders 112 bool bDefaultFileLoaded_; //! Tells whether the default one is loaded 113 std::string defaultFilename_; //! Name of the file with the default key bindings 114 114 115 115 // keybind command related 116 SharedPtr<LuaFunctor> callbackFunction_;//! Function to be called when key was pressed after "keybind" command117 bool bBinding_; //! Tells whether a key binding process is active118 bool bTemporary_; //! Stores tkeybind/keybind value119 std::string command_; //! Stores the command received by (t)keybind116 std::shared_ptr<LuaFunctor> callbackFunction_; //! Function to be called when key was pressed after "keybind" command 117 bool bBinding_; //! Tells whether a key binding process is active 118 bool bTemporary_; //! Stores tkeybind/keybind value 119 std::string command_; //! Stores the command received by (t)keybind 120 120 121 121 static KeyBinderManager* singletonPtr_s;
Note: See TracChangeset
for help on using the changeset viewer.