CarChallenge 3D Demo
import QtQuick 2.0
import QtQuick.Controls 1.3
import QtQuick.Controls.Styles 1.3
MenuScreenBase {
id: menuCamera
property alias zoom: sliderZoom.value
property alias angle: sliderAngle.value
Item {
id: menuContainer
width: 300
height: 150
anchors.horizontalCenter: parent.horizontalCenter
anchors.bottom: parent.bottom
anchors.bottomMargin: 5
Behavior on opacity{NumberAnimation{}}
Rectangle {
anchors.fill: parent
color: "black"
opacity: 0.7
}
Column {
spacing: 10
anchors.centerIn: parent
Text {
text: "Zoom: " + sliderZoom.value.toFixed(2)
anchors.horizontalCenter: parent.horizontalCenter
color: "white"
}
Slider {
id: sliderZoom
anchors.horizontalCenter: parent.horizontalCenter
width: 260
onPressedChanged: {
if(pressed) {
menuContainer.opacity=0.3
} else {
menuContainer.opacity=1
}
}
style: SliderStyle {
handle: Rectangle {
implicitWidth: 20
implicitHeight: 30
anchors.centerIn: parent
color: "white"
}
groove: Rectangle {
color: "white"
implicitHeight: 4
opacity: 0.5
}
}
}
Text {
text: "Angle: " + sliderAngle.value.toFixed(2)
anchors.horizontalCenter: parent.horizontalCenter
color: "white"
}
Slider {
id: sliderAngle
anchors.horizontalCenter: parent.horizontalCenter
width: 260
onPressedChanged: {
if(pressed) {
menuContainer.opacity=0.3
} else {
menuContainer.opacity=1
}
}
style: SliderStyle {
handle: Rectangle {
implicitWidth: 20
implicitHeight: 30
anchors.centerIn: parent
color: "white"
}
groove: Rectangle {
color: "white"
implicitHeight: 4
opacity: 0.5
}
}
}