MCPcopy Create free account
hub / github.com/TombEngine/TombEngine / GetBoundKeyID

Method GetBoundKeyID

TombEngine/Specific/Input/Bindings.cpp:178–196  ·  view source on GitHub ↗

Source from the content-addressed store, hash-verified

176 };
177
178 int BindingManager::GetBoundKeyID(BindingProfileID profileID, ActionID actionID) const
179 {
180 // Find binding profile.
181 auto profileIt = _bindings.find(profileID);
182 if (profileIt == _bindings.end())
183 return OIS::KC_UNASSIGNED;
184
185 // Get binding profile.
186 const auto& [inputDeviceID, profile] = *profileIt;
187
188 // Find key-action binding.
189 auto keyIt = profile.find(actionID);
190 if (keyIt == profile.end())
191 return OIS::KC_UNASSIGNED;
192
193 // Return key binding.
194 const auto& [keyActionID, keyID] = *keyIt;
195 return keyID;
196 }
197
198 const BindingProfile& BindingManager::GetBindingProfile(BindingProfileID profileID) const
199 {

Callers 8

RenderOptionsMenuMethod · 0.80
LoadConfigurationFunction · 0.80
TestBoundKeyFunction · 0.80
DefaultConflictFunction · 0.80
SetDiscreteAxisValuesFunction · 0.80
ReadGamepadFunction · 0.80
KeyFunction · 0.80

Calls 2

findMethod · 0.45
endMethod · 0.45

Tested by 1

TestBoundKeyFunction · 0.64