Added TextFields to SteamVR page.
This commit is contained in:
@@ -53,11 +53,27 @@ MyStackViewPage {
|
|||||||
}
|
}
|
||||||
}
|
}
|
||||||
|
|
||||||
MyText {
|
MyTextField {
|
||||||
id: steamvrSupersamplingText
|
id: steamvrSupersamplingText
|
||||||
text: "9.9"
|
text: "0.0"
|
||||||
horizontalAlignment: Text.AlignRight
|
keyBoardUID: 401
|
||||||
Layout.minimumWidth: 64
|
Layout.preferredWidth: 100
|
||||||
|
Layout.leftMargin: 10
|
||||||
|
Layout.rightMargin: 10
|
||||||
|
horizontalAlignment: Text.AlignHCenter
|
||||||
|
function onInputEvent(input) {
|
||||||
|
var val = parseFloat(input)
|
||||||
|
if (!isNaN(val)) {
|
||||||
|
if (val < 0.1) {
|
||||||
|
val = 0.1
|
||||||
|
}
|
||||||
|
console.debug("Supersampling TextField: valueChanged(", val, ")")
|
||||||
|
var v = val.toFixed(1)
|
||||||
|
steamvrSupersamplingSlider.value = v
|
||||||
|
SteamVRTabController.setSuperSampling(v, false)
|
||||||
|
}
|
||||||
|
text = SteamVRTabController.superSampling.toFixed(1)
|
||||||
|
}
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
|
|
||||||
@@ -104,11 +120,28 @@ MyStackViewPage {
|
|||||||
}
|
}
|
||||||
}
|
}
|
||||||
|
|
||||||
MyText {
|
|
||||||
|
MyTextField {
|
||||||
id: steamvrCompositorSupersamplingText
|
id: steamvrCompositorSupersamplingText
|
||||||
text: "9.9"
|
text: "0.0"
|
||||||
horizontalAlignment: Text.AlignRight
|
keyBoardUID: 402
|
||||||
Layout.minimumWidth: 64
|
Layout.preferredWidth: 100
|
||||||
|
Layout.leftMargin: 10
|
||||||
|
Layout.rightMargin: 10
|
||||||
|
horizontalAlignment: Text.AlignHCenter
|
||||||
|
function onInputEvent(input) {
|
||||||
|
var val = parseFloat(input)
|
||||||
|
if (!isNaN(val)) {
|
||||||
|
if (val < 0.1) {
|
||||||
|
val = 0.1
|
||||||
|
}
|
||||||
|
console.debug("Compositor Supersampling TextField: valueChanged(", val, ")")
|
||||||
|
var v = val.toFixed(1)
|
||||||
|
steamvrCompositorSupersamplingSlider.value = v
|
||||||
|
SteamVRTabController.setCompositorSuperSampling(v, false)
|
||||||
|
}
|
||||||
|
text = SteamVRTabController.compositorSuperSampling.toFixed(1)
|
||||||
|
}
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
|
|
||||||
|
|||||||
Reference in New Issue
Block a user