mirror of
https://github.com/overte-org/overte.git
synced 2025-08-09 15:49:24 +02:00
Read from settings.
This commit is contained in:
parent
22be7d1b37
commit
156a206b4a
1 changed files with 53 additions and 8 deletions
|
@ -3,6 +3,8 @@ import QtQuick.Controls 2.15
|
||||||
import QtQuick.Layouts 1.3
|
import QtQuick.Layouts 1.3
|
||||||
import controlsUit 1.0 as HifiControlsUit
|
import controlsUit 1.0 as HifiControlsUit
|
||||||
|
|
||||||
|
// TODO: Some default values wait until component is completed. Is this nessicary?
|
||||||
|
|
||||||
Rectangle {
|
Rectangle {
|
||||||
color: Qt.rgba(0.1,0.1,0.1,1)
|
color: Qt.rgba(0.1,0.1,0.1,1)
|
||||||
signal sendToScript(var message);
|
signal sendToScript(var message);
|
||||||
|
@ -58,7 +60,7 @@ Rectangle {
|
||||||
}
|
}
|
||||||
|
|
||||||
ComboBox {
|
ComboBox {
|
||||||
currentIndex: 2
|
currentIndex: Performance.getPerformancePreset() - 1 // One off error FTW!
|
||||||
Layout.fillWidth: true
|
Layout.fillWidth: true
|
||||||
model: ListModel {
|
model: ListModel {
|
||||||
id: cbItems
|
id: cbItems
|
||||||
|
@ -68,9 +70,14 @@ Rectangle {
|
||||||
ListElement { text: "High" }
|
ListElement { text: "High" }
|
||||||
ListElement { text: "Custom" }
|
ListElement { text: "Custom" }
|
||||||
}
|
}
|
||||||
|
|
||||||
|
Component.onCompleted: {
|
||||||
|
console.log("\n\n"+ Performance.getPerformancePreset())
|
||||||
|
}
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
|
|
||||||
|
// TODO: Deferred render vs forward render?
|
||||||
// Rendering Effects
|
// Rendering Effects
|
||||||
RowLayout {
|
RowLayout {
|
||||||
width: parent.width
|
width: parent.width
|
||||||
|
@ -86,6 +93,8 @@ Rectangle {
|
||||||
|
|
||||||
CheckBox {
|
CheckBox {
|
||||||
id: rendering_effects_state
|
id: rendering_effects_state
|
||||||
|
checked: Render.renderMethod === 0
|
||||||
|
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
|
|
||||||
|
@ -108,28 +117,36 @@ Rectangle {
|
||||||
width: parent.width - 10
|
width: parent.width - 10
|
||||||
anchors.horizontalCenter: parent.horizontalCenter
|
anchors.horizontalCenter: parent.horizontalCenter
|
||||||
|
|
||||||
|
// TODO: Some things were hard corded to be enabled / disabled depending on renderer. Why?
|
||||||
CheckBox {
|
CheckBox {
|
||||||
text: "Shadows"
|
text: "Shadows"
|
||||||
Layout.fillWidth: true
|
Layout.fillWidth: true
|
||||||
palette.windowText: "gray" // TODO: Is this good?
|
palette.windowText: "gray"
|
||||||
|
checked: Render.shadowsEnabled
|
||||||
}
|
}
|
||||||
|
|
||||||
CheckBox {
|
CheckBox {
|
||||||
text: "Local Lights"
|
text: "Local Lights"
|
||||||
Layout.fillWidth: true
|
Layout.fillWidth: true
|
||||||
palette.windowText: "gray" // TODO: Is this good?
|
palette.windowText: "gray"
|
||||||
|
//checked: Render.localLightsEnabled
|
||||||
|
checked: rendering_effects_state.checked // FIXME Hardcoded, why?
|
||||||
}
|
}
|
||||||
|
|
||||||
CheckBox {
|
CheckBox {
|
||||||
text: "Fog"
|
text: "Fog"
|
||||||
Layout.fillWidth: true
|
Layout.fillWidth: true
|
||||||
palette.windowText: "gray" // TODO: Is this good?
|
palette.windowText: "gray"
|
||||||
|
//checked: Render.fogEnabled
|
||||||
|
checked: rendering_effects_state.checked // FIXME Hardcoded, why?
|
||||||
}
|
}
|
||||||
|
|
||||||
CheckBox {
|
CheckBox {
|
||||||
text: "Bloom"
|
text: "Bloom"
|
||||||
Layout.fillWidth: true
|
Layout.fillWidth: true
|
||||||
palette.windowText: "gray" // TODO: Is this good?
|
palette.windowText: "gray"
|
||||||
|
//checked: Render.bloomEnabled
|
||||||
|
checked: rendering_effects_state.checked // FIXME Hardcoded, why?
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
|
@ -158,6 +175,10 @@ Rectangle {
|
||||||
ListElement { text: "Real-Time" }
|
ListElement { text: "Real-Time" }
|
||||||
ListElement { text: "Custom" }
|
ListElement { text: "Custom" }
|
||||||
}
|
}
|
||||||
|
|
||||||
|
Component.onCompleted: {
|
||||||
|
refresh_rate_cb.currentIndex = Performance.getRefreshRateProfile()
|
||||||
|
}
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
|
|
||||||
|
@ -193,6 +214,10 @@ Rectangle {
|
||||||
Layout.maximumWidth: 50
|
Layout.maximumWidth: 50
|
||||||
inputMethodHints: Qt.ImhFormattedNumbersOnly
|
inputMethodHints: Qt.ImhFormattedNumbersOnly
|
||||||
validator: RegExpValidator { regExp: /[0-9]*/ }
|
validator: RegExpValidator { regExp: /[0-9]*/ }
|
||||||
|
|
||||||
|
Component.onCompleted: {
|
||||||
|
text = Performance.getCustomRefreshRate(0)
|
||||||
|
}
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
|
|
||||||
|
@ -207,6 +232,10 @@ Rectangle {
|
||||||
Layout.maximumWidth: 50
|
Layout.maximumWidth: 50
|
||||||
inputMethodHints: Qt.ImhFormattedNumbersOnly
|
inputMethodHints: Qt.ImhFormattedNumbersOnly
|
||||||
validator: RegExpValidator { regExp: /[0-9]*/ }
|
validator: RegExpValidator { regExp: /[0-9]*/ }
|
||||||
|
|
||||||
|
Component.onCompleted: {
|
||||||
|
text = Performance.getCustomRefreshRate(1)
|
||||||
|
}
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
|
|
||||||
|
@ -221,6 +250,10 @@ Rectangle {
|
||||||
Layout.maximumWidth: 50
|
Layout.maximumWidth: 50
|
||||||
inputMethodHints: Qt.ImhFormattedNumbersOnly
|
inputMethodHints: Qt.ImhFormattedNumbersOnly
|
||||||
validator: RegExpValidator { regExp: /[0-9]*/ }
|
validator: RegExpValidator { regExp: /[0-9]*/ }
|
||||||
|
|
||||||
|
Component.onCompleted: {
|
||||||
|
text = Performance.getCustomRefreshRate(2)
|
||||||
|
}
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
|
|
||||||
|
@ -235,6 +268,10 @@ Rectangle {
|
||||||
Layout.maximumWidth: 50
|
Layout.maximumWidth: 50
|
||||||
inputMethodHints: Qt.ImhFormattedNumbersOnly
|
inputMethodHints: Qt.ImhFormattedNumbersOnly
|
||||||
validator: RegExpValidator { regExp: /[0-9]*/ }
|
validator: RegExpValidator { regExp: /[0-9]*/ }
|
||||||
|
|
||||||
|
Component.onCompleted: {
|
||||||
|
text = Performance.getCustomRefreshRate(3)
|
||||||
|
}
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
|
|
||||||
|
@ -249,6 +286,10 @@ Rectangle {
|
||||||
Layout.maximumWidth: 50
|
Layout.maximumWidth: 50
|
||||||
inputMethodHints: Qt.ImhFormattedNumbersOnly
|
inputMethodHints: Qt.ImhFormattedNumbersOnly
|
||||||
validator: RegExpValidator { regExp: /[0-9]*/ }
|
validator: RegExpValidator { regExp: /[0-9]*/ }
|
||||||
|
|
||||||
|
Component.onCompleted: {
|
||||||
|
text = Performance.getCustomRefreshRate(4)
|
||||||
|
}
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
|
|
||||||
|
@ -263,6 +304,10 @@ Rectangle {
|
||||||
Layout.maximumWidth: 50
|
Layout.maximumWidth: 50
|
||||||
inputMethodHints: Qt.ImhFormattedNumbersOnly
|
inputMethodHints: Qt.ImhFormattedNumbersOnly
|
||||||
validator: RegExpValidator { regExp: /[0-9]*/ }
|
validator: RegExpValidator { regExp: /[0-9]*/ }
|
||||||
|
|
||||||
|
Component.onCompleted: {
|
||||||
|
text = Performance.getCustomRefreshRate(5)
|
||||||
|
}
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
|
|
||||||
|
@ -291,7 +336,7 @@ Rectangle {
|
||||||
id: resolution_slider
|
id: resolution_slider
|
||||||
from: 0.1
|
from: 0.1
|
||||||
to: 2
|
to: 2
|
||||||
value: 1
|
value: Render.viewportResolutionScale.toFixed(1)
|
||||||
stepSize: 0.1
|
stepSize: 0.1
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
|
@ -318,7 +363,7 @@ Rectangle {
|
||||||
id: fov_slider
|
id: fov_slider
|
||||||
from: 20
|
from: 20
|
||||||
to: 130
|
to: 130
|
||||||
value: 90 // TODO: Need to set to Overte default
|
value: Render.verticalFieldOfView.toFixed(1) // TODO: Need to set to Overte default
|
||||||
stepSize: 1
|
stepSize: 1
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
|
@ -337,7 +382,7 @@ Rectangle {
|
||||||
}
|
}
|
||||||
|
|
||||||
ComboBox {
|
ComboBox {
|
||||||
currentIndex: 2
|
currentIndex: Render.antialiasingMode
|
||||||
Layout.fillWidth: true
|
Layout.fillWidth: true
|
||||||
model: ListModel {
|
model: ListModel {
|
||||||
ListElement { text: "None" }
|
ListElement { text: "None" }
|
||||||
|
|
Loading…
Reference in a new issue