Commit bc2c607b authored by Don Gagne's avatar Don Gagne

Allow buttons to be scrolled

parent 39a2500b
......@@ -153,76 +153,85 @@ Rectangle {
}
}
Column {
id: buttonColumn
width: buttonWidth
SubMenuButton {
id: summaryButton
width: buttonWidth
imageResource: "/qmlimages/VehicleSummaryIcon.png"
setupIndicator: false
exclusiveGroup: setupButtonGroup
text: "SUMMARY"
onClicked: showSummaryPanel()
}
SubMenuButton {
id: firmwareButton
width: buttonWidth
imageResource: "/qmlimages/FirmwareUpgradeIcon.png"
setupIndicator: false
exclusiveGroup: setupButtonGroup
visible: !ScreenTools.isMobile
text: "FIRMWARE"
Flickable {
id: buttonFlickable
width: buttonWidth
height: parent.height
contentWidth: buttonWidth
contentHeight: buttonColumn.height
flickableDirection: Flickable.VerticalFlick
Column {
id: buttonColumn
width: buttonWidth
onClicked: showFirmwarePanel()
}
SubMenuButton {
id: summaryButton
width: buttonWidth
imageResource: "/qmlimages/VehicleSummaryIcon.png"
setupIndicator: false
exclusiveGroup: setupButtonGroup
text: "SUMMARY"
SubMenuButton {
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: showSummaryPanel()
}
onClicked: showJoystickPanel()
}
SubMenuButton {
id: firmwareButton
width: buttonWidth
imageResource: "/qmlimages/FirmwareUpgradeIcon.png"
setupIndicator: false
exclusiveGroup: setupButtonGroup
visible: !ScreenTools.isMobile
text: "FIRMWARE"
Repeater {
model: multiVehicleManager.parameterReadyVehicleAvailable ? multiVehicleManager.activeVehicle.autopilot.vehicleComponents : 0
onClicked: showFirmwarePanel()
}
SubMenuButton {
id: joystickButton
width: buttonWidth
imageResource: modelData.iconResource
setupIndicator: modelData.requiresSetup
setupComplete: modelData.setupComplete
setupIndicator: true
setupComplete: joystickManager.activeJoystick ? joystickManager.activeJoystick.calibrated : false
exclusiveGroup: setupButtonGroup
text: modelData.name.toUpperCase()
visible: multiVehicleManager.parameterReadyVehicleAvailable && joystickManager.joysticks.length != 0
text: "JOYSTICK"
onClicked: showVehicleComponentPanel(modelData)
onClicked: showJoystickPanel()
}
}
SubMenuButton {
width: buttonWidth
setupIndicator: false
exclusiveGroup: setupButtonGroup
visible: multiVehicleManager.parameterReadyVehicleAvailable
text: "PARAMETERS"
Repeater {
model: multiVehicleManager.parameterReadyVehicleAvailable ? multiVehicleManager.activeVehicle.autopilot.vehicleComponents : 0
onClicked: showParametersPanel()
}
} // Column
SubMenuButton {
width: buttonWidth
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 {
id: panelLoader
anchors.leftMargin: defaultTextWidth
anchors.rightMargin: defaultTextWidth
anchors.left: buttonColumn.right
anchors.left: buttonFlickable.right
anchors.right: parent.right
anchors.top: parent.top
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