Add smooth turn and universe centered rotation
This commit is contained in:
@@ -42,6 +42,14 @@ MyStackViewPage {
|
||||
}
|
||||
}
|
||||
|
||||
MyToggleButton {
|
||||
id: universeCenteredRotationToggle
|
||||
text: "Universe-Centered Rotation (Disables HMD Centering)"
|
||||
onCheckedChanged: {
|
||||
MoveCenterTabController.setUniverseCenteredRotation(checked, true)
|
||||
}
|
||||
}
|
||||
|
||||
Item {
|
||||
Layout.fillHeight: true
|
||||
}
|
||||
@@ -51,6 +59,7 @@ MyStackViewPage {
|
||||
forceReviveToggle.checked = SettingsTabController.forceRevivePage
|
||||
allowExternalEditsToggle.checked = MoveCenterTabController.allowExternalEdits
|
||||
oldStyleMotionToggle.checked = MoveCenterTabController.oldStyleMotion
|
||||
universeCenteredRotationToggle.checked = MoveCenterTabController.universeCenteredRotation
|
||||
}
|
||||
|
||||
Connections {
|
||||
@@ -71,6 +80,9 @@ MyStackViewPage {
|
||||
onOldStyleMotionChanged: {
|
||||
oldStyleMotionToggle.checked = MoveCenterTabController.oldStyleMotion
|
||||
}
|
||||
onUniverseCenteredRotationChanged: {
|
||||
universeCenteredRotationToggle.checked = MoveCenterTabController.universeCenteredRotation
|
||||
}
|
||||
}
|
||||
}
|
||||
}
|
||||
|
||||
@@ -24,7 +24,7 @@ GroupBox {
|
||||
id: snapTurnAngleText
|
||||
text: "45°"
|
||||
keyBoardUID: 154
|
||||
Layout.preferredWidth: 150
|
||||
Layout.preferredWidth: 100
|
||||
Layout.leftMargin: 10
|
||||
horizontalAlignment: Text.AlignHCenter
|
||||
function onInputEvent(input) {
|
||||
@@ -39,26 +39,6 @@ GroupBox {
|
||||
}
|
||||
}
|
||||
|
||||
Item {
|
||||
Layout.fillWidth: true
|
||||
}
|
||||
|
||||
MyPushButton {
|
||||
id: snapTurnButton15
|
||||
Layout.preferredWidth: 90
|
||||
text:"15°"
|
||||
onClicked: {
|
||||
MoveCenterTabController.snapTurnAngle = 1500
|
||||
}
|
||||
}
|
||||
MyPushButton {
|
||||
id: snapTurnButton30
|
||||
Layout.preferredWidth: 90
|
||||
text:"30°"
|
||||
onClicked: {
|
||||
MoveCenterTabController.snapTurnAngle = 3000
|
||||
}
|
||||
}
|
||||
MyPushButton {
|
||||
id: snapTurnButton45
|
||||
Layout.preferredWidth: 90
|
||||
@@ -83,11 +63,41 @@ GroupBox {
|
||||
MoveCenterTabController.snapTurnAngle = 18000
|
||||
}
|
||||
}
|
||||
|
||||
Item {
|
||||
Layout.fillWidth: true
|
||||
}
|
||||
|
||||
MyText {
|
||||
text: "Smooth Turn Rate:"
|
||||
horizontalAlignment: Text.AlignRight
|
||||
Layout.rightMargin: 2
|
||||
}
|
||||
|
||||
MyTextField {
|
||||
id: smoothTurnRateText
|
||||
text: "100%"
|
||||
keyBoardUID: 155
|
||||
Layout.preferredWidth: 130
|
||||
Layout.leftMargin: 10
|
||||
horizontalAlignment: Text.AlignHCenter
|
||||
function onInputEvent(input) {
|
||||
var val = parseInt(input)
|
||||
if (!isNaN(val)) {
|
||||
MoveCenterTabController.smoothTurnRate = val
|
||||
text = MoveCenterTabController.smoothTurnRate + "%"
|
||||
} else {
|
||||
text = MoveCenterTabController.smoothTurnRate + "%"
|
||||
}
|
||||
}
|
||||
}
|
||||
|
||||
}
|
||||
}
|
||||
|
||||
Component.onCompleted: {
|
||||
snapTurnAngleText.text = ( Math.round( MoveCenterTabController.snapTurnAngle / 100 ) ) + "°"
|
||||
smoothTurnRateText.text = MoveCenterTabController.smoothTurnRate + "%"
|
||||
}
|
||||
|
||||
Connections {
|
||||
@@ -96,5 +106,8 @@ GroupBox {
|
||||
onSnapTurnAngleChanged: {
|
||||
snapTurnAngleText.text = ( Math.round( MoveCenterTabController.snapTurnAngle / 100 ) ) + "°"
|
||||
}
|
||||
onSmoothTurnRateChanged: {
|
||||
smoothTurnRateText.text = MoveCenterTabController.smoothTurnRate + "%"
|
||||
}
|
||||
}
|
||||
}
|
||||
|
||||
Reference in New Issue
Block a user