Browse Source

Change button name when forced to buttons only

QGC4.4
Don Gagne 2 years ago committed by Don Gagne
parent
commit
d5b4de2e09
  1. 8
      src/VehicleSetup/SetupView.qml

8
src/VehicleSetup/SetupView.qml

@ -260,12 +260,16 @@ Rectangle { @@ -260,12 +260,16 @@ Rectangle {
id: joystickButton
imageResource: "/qmlimages/Joystick.png"
setupIndicator: true
setupComplete: joystickManager.activeJoystick ? joystickManager.activeJoystick.calibrated || joystickManager.activeJoystick.axisCount == 0 : false
setupComplete: _activeJoystick ? _activeJoystick.calibrated || _buttonsOnly : false
exclusiveGroup: setupButtonGroup
visible: _fullParameterVehicleAvailable && joystickManager.joysticks.length !== 0
text: qsTr("Joystick")
text: _forcedToButtonsOnly ? qsTr("Buttons") : qsTr("Joystick")
Layout.fillWidth: true
onClicked: showPanel(this, "JoystickConfig.qml")
property var _activeJoystick: joystickManager.activeJoystick
property bool _buttonsOnly: _activeJoystick ? _activeJoystick.axisCount == 0 : false
property bool _forcedToButtonsOnly: !QGroundControl.corePlugin.options.allowJoystickSelection && _buttonsOnly
}
Repeater {

Loading…
Cancel
Save