Commit bc2c607b authored by Don Gagne's avatar Don Gagne

Allow buttons to be scrolled

parent 39a2500b
...@@ -153,76 +153,85 @@ Rectangle { ...@@ -153,76 +153,85 @@ Rectangle {
} }
} }
Column { Flickable {
id: buttonColumn id: buttonFlickable
width: buttonWidth width: buttonWidth
height: parent.height
SubMenuButton { contentWidth: buttonWidth
id: summaryButton contentHeight: buttonColumn.height
width: buttonWidth flickableDirection: Flickable.VerticalFlick
imageResource: "/qmlimages/VehicleSummaryIcon.png"
setupIndicator: false Column {
exclusiveGroup: setupButtonGroup id: buttonColumn
text: "SUMMARY" width: buttonWidth
onClicked: showSummaryPanel()
}
SubMenuButton {
id: firmwareButton
width: buttonWidth
imageResource: "/qmlimages/FirmwareUpgradeIcon.png"
setupIndicator: false
exclusiveGroup: setupButtonGroup
visible: !ScreenTools.isMobile
text: "FIRMWARE"
onClicked: showFirmwarePanel() SubMenuButton {
} id: summaryButton
width: buttonWidth
imageResource: "/qmlimages/VehicleSummaryIcon.png"
setupIndicator: false
exclusiveGroup: setupButtonGroup
text: "SUMMARY"
SubMenuButton { onClicked: showSummaryPanel()
id: joystickButton }
width: buttonWidth
setupIndicator: true
setupComplete: joystickManager.activeJoystick ? joystickManager.activeJoystick.calibrated : false
exclusiveGroup: setupButtonGroup
visible: multiVehicleManager.parameterReadyVehicleAvailable && joystickManager.joysticks.length != 0
text: "JOYSTICK"
onClicked: showJoystickPanel() SubMenuButton {
} id: firmwareButton
width: buttonWidth
imageResource: "/qmlimages/FirmwareUpgradeIcon.png"
setupIndicator: false
exclusiveGroup: setupButtonGroup
visible: !ScreenTools.isMobile
text: "FIRMWARE"
Repeater { onClicked: showFirmwarePanel()
model: multiVehicleManager.parameterReadyVehicleAvailable ? multiVehicleManager.activeVehicle.autopilot.vehicleComponents : 0 }
SubMenuButton { SubMenuButton {
id: joystickButton
width: buttonWidth width: buttonWidth
imageResource: modelData.iconResource setupIndicator: true
setupIndicator: modelData.requiresSetup setupComplete: joystickManager.activeJoystick ? joystickManager.activeJoystick.calibrated : false
setupComplete: modelData.setupComplete
exclusiveGroup: setupButtonGroup exclusiveGroup: setupButtonGroup
text: modelData.name.toUpperCase() visible: multiVehicleManager.parameterReadyVehicleAvailable && joystickManager.joysticks.length != 0
text: "JOYSTICK"
onClicked: showVehicleComponentPanel(modelData) onClicked: showJoystickPanel()
} }
}
SubMenuButton { Repeater {
width: buttonWidth model: multiVehicleManager.parameterReadyVehicleAvailable ? multiVehicleManager.activeVehicle.autopilot.vehicleComponents : 0
setupIndicator: false
exclusiveGroup: setupButtonGroup
visible: multiVehicleManager.parameterReadyVehicleAvailable
text: "PARAMETERS"
onClicked: showParametersPanel() SubMenuButton {
} width: buttonWidth
} // Column imageResource: modelData.iconResource
setupIndicator: modelData.requiresSetup
setupComplete: modelData.setupComplete
exclusiveGroup: setupButtonGroup
text: modelData.name.toUpperCase()
onClicked: showVehicleComponentPanel(modelData)
}
}
SubMenuButton {
width: buttonWidth
setupIndicator: false
exclusiveGroup: setupButtonGroup
visible: multiVehicleManager.parameterReadyVehicleAvailable
text: "PARAMETERS"
onClicked: showParametersPanel()
}
} // Column
} // Flickable
Loader { Loader {
id: panelLoader id: panelLoader
anchors.leftMargin: defaultTextWidth anchors.leftMargin: defaultTextWidth
anchors.rightMargin: defaultTextWidth anchors.rightMargin: defaultTextWidth
anchors.left: buttonColumn.right anchors.left: buttonFlickable.right
anchors.right: parent.right anchors.right: parent.right
anchors.top: parent.top anchors.top: parent.top
anchors.bottom: parent.bottom anchors.bottom: parent.bottom
......
Markdown is supported
0% or
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment