mirror of
https://github.com/JulianGro/overte.git
synced 2025-04-09 16:52:28 +02:00
Fixing typo and review comments
This commit is contained in:
parent
fc15c7cd98
commit
b37a6f689a
6 changed files with 7 additions and 13 deletions
|
@ -3,7 +3,7 @@
|
|||
"channels": [
|
||||
{ "from": "Standard.LY", "to": "Actions.TranslateZ" },
|
||||
{ "from": "Standard.LX", "to": "Actions.TranslateX" },
|
||||
{ "from": "Standard.RX", "to": "Actions.Yaw" },
|
||||
{ "from": "Standard.RX", "to": "Actions.Yaw" },
|
||||
{ "from": "Standard.RY", "to": "Actions.Pitch" },
|
||||
|
||||
{ "from": [ "Standard.DU", "Standard.DL", "Standard.DR", "Standard.DD" ], "to": "Standard.LeftPrimaryThumb" },
|
||||
|
|
|
@ -647,7 +647,6 @@ Application::Application(int& argc, char** argv, QElapsedTimer& startupTimer) :
|
|||
// Setup the keyboardMouseDevice and the user input mapper with the default bindings
|
||||
userInputMapper->registerDevice(_keyboardMouseDevice);
|
||||
|
||||
//userInputMapper->getApplicationDevice()->(float)qApp->getAvatarUpdater()->isHMDMode()
|
||||
|
||||
// check first run...
|
||||
if (_firstRun.get()) {
|
||||
|
|
|
@ -75,8 +75,6 @@ namespace controller {
|
|||
makeAxisPair(Action::BOOM_IN, "BoomIn"),
|
||||
makeAxisPair(Action::BOOM_OUT, "BoomOut"),
|
||||
|
||||
makeButtonPair(Action::IN_HMD, "InHMD"),
|
||||
|
||||
// Deprecated aliases
|
||||
// FIXME remove after we port all scripts
|
||||
makeAxisPair(Action::LONGITUDINAL_BACKWARD, "LONGITUDINAL_BACKWARD"),
|
||||
|
|
|
@ -77,9 +77,7 @@ enum class Action {
|
|||
// Biseced aliases for TRANSLATE_CAMERA_Z
|
||||
BOOM_IN,
|
||||
BOOM_OUT,
|
||||
|
||||
IN_HMD, // THis is a read only action ?
|
||||
|
||||
|
||||
NUM_ACTIONS,
|
||||
};
|
||||
|
||||
|
|
|
@ -30,7 +30,7 @@ void StateController::update(float deltaTime, bool jointsCaptured) {}
|
|||
void StateController::focusOutEvent() {}
|
||||
|
||||
void StateController::addInputVariant(QString name, ReadLambda& lambda) {
|
||||
namedReadLambdas.push_back(NamedReadLambda(name, lambda));
|
||||
_namedReadLambdas.push_back(NamedReadLambda(name, lambda));
|
||||
}
|
||||
void StateController::buildDeviceProxy(DeviceProxy::Pointer proxy) {
|
||||
proxy->_name = _name;
|
||||
|
@ -42,15 +42,15 @@ void StateController::buildDeviceProxy(DeviceProxy::Pointer proxy) {
|
|||
QVector<Input::NamedPair> availableInputs;
|
||||
|
||||
int i = 0;
|
||||
for (auto pair : namedReadLambdas) {
|
||||
for (auto& pair : _namedReadLambdas) {
|
||||
availableInputs.push_back(Input::NamedPair(Input(_deviceID, i, ChannelType::BUTTON), pair.first));
|
||||
i++;
|
||||
}
|
||||
return availableInputs;
|
||||
};
|
||||
proxy->createEndpoint = [this] (const Input& input) -> Endpoint::Pointer {
|
||||
if (input.getChannel() < namedReadLambdas.size()) {
|
||||
return std::make_shared<LambdaEndpoint>(namedReadLambdas[input.getChannel()].second);
|
||||
if (input.getChannel() < _namedReadLambdas.size()) {
|
||||
return std::make_shared<LambdaEndpoint>(_namedReadLambdas[input.getChannel()].second);
|
||||
}
|
||||
|
||||
return Endpoint::Pointer();
|
||||
|
|
|
@ -40,8 +40,7 @@ public:
|
|||
|
||||
void addInputVariant(QString name, ReadLambda& lambda);
|
||||
|
||||
QVector<NamedReadLambda> namedReadLambdas;
|
||||
QVector<Input::NamedPair> availableInputs;
|
||||
QVector<NamedReadLambda> _namedReadLambdas;
|
||||
};
|
||||
|
||||
}
|
||||
|
|
Loading…
Reference in a new issue