mirror of
https://github.com/overte-org/overte.git
synced 2025-07-16 02:56:37 +02:00
Added haze setting.
This commit is contained in:
parent
83b2666fb5
commit
52d354541e
1 changed files with 37 additions and 29 deletions
|
@ -3,9 +3,6 @@ import QtQuick.Controls 2.15
|
||||||
import QtQuick.Layouts 1.3
|
import QtQuick.Layouts 1.3
|
||||||
import "./qml_widgets"
|
import "./qml_widgets"
|
||||||
|
|
||||||
|
|
||||||
// TODO: Some default values wait until component is completed. Is this necessary?
|
|
||||||
|
|
||||||
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);
|
||||||
|
@ -90,7 +87,18 @@ Rectangle {
|
||||||
|
|
||||||
CheckBox {
|
CheckBox {
|
||||||
id: rendering_effects_state
|
id: rendering_effects_state
|
||||||
checked: Render.renderMethod === 0
|
|
||||||
|
Component.onCompleted: {
|
||||||
|
checked: Render.renderMethod == 1
|
||||||
|
}
|
||||||
|
|
||||||
|
onCheckedChanged: {
|
||||||
|
if (checked){
|
||||||
|
Render.renderMethod = 0;
|
||||||
|
} else {
|
||||||
|
Render.renderMethod = 1;
|
||||||
|
}
|
||||||
|
}
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
|
|
||||||
|
@ -99,24 +107,20 @@ Rectangle {
|
||||||
Item {
|
Item {
|
||||||
Layout.fillWidth: true
|
Layout.fillWidth: true
|
||||||
visible: rendering_effects_state.checked == true
|
visible: rendering_effects_state.checked == true
|
||||||
height: 100
|
height: 150
|
||||||
|
|
||||||
Rectangle {
|
Rectangle {
|
||||||
color: "#333333"
|
color: "#333333"
|
||||||
height: parent.children[1].height
|
height: parent.children[1].height
|
||||||
width: parent.width
|
width: parent.width
|
||||||
}
|
}
|
||||||
|
|
||||||
|
|
||||||
// TODO: Some things were hard corded to be enabled / disabled depending on renderer.
|
|
||||||
// This is fixed currently in the ProtocolChanges branch, but not yet merged into master
|
|
||||||
// Remove "checked: XXXXXX" and replace with commented out "checked: XXXXX" this when merged
|
|
||||||
// Also please remove "enabled:false". That was just to make sure users don't diddle with settings they can't change :)
|
|
||||||
GridLayout {
|
GridLayout {
|
||||||
columns: 2
|
columns: 2
|
||||||
height: 100
|
height: 150
|
||||||
width: parent.width - 10
|
width: parent.width - 10
|
||||||
anchors.horizontalCenter: parent.horizontalCenter
|
anchors.horizontalCenter: parent.horizontalCenter
|
||||||
|
id: renderSettingsContainer
|
||||||
|
|
||||||
CheckBox {
|
CheckBox {
|
||||||
text: "Shadows"
|
text: "Shadows"
|
||||||
|
@ -129,39 +133,43 @@ Rectangle {
|
||||||
}
|
}
|
||||||
|
|
||||||
CheckBox {
|
CheckBox {
|
||||||
enabled: false
|
|
||||||
text: "Local Lights"
|
text: "Local Lights"
|
||||||
Layout.fillWidth: true
|
Layout.fillWidth: true
|
||||||
palette.windowText: "gray"
|
palette.windowText: "gray"
|
||||||
//checked: Render.localLightsEnabled
|
checked: Render.localLightsEnabled
|
||||||
checked: rendering_effects_state.checked
|
onCheckedChanged: {
|
||||||
//onCheckedChanged: {
|
Render.localLightsEnabled = checked;
|
||||||
// Render.localLightsEnabled = checked;
|
}
|
||||||
//}
|
|
||||||
}
|
}
|
||||||
|
|
||||||
CheckBox {
|
CheckBox {
|
||||||
enabled: false
|
|
||||||
text: "Fog"
|
text: "Fog"
|
||||||
Layout.fillWidth: true
|
Layout.fillWidth: true
|
||||||
palette.windowText: "gray"
|
palette.windowText: "gray"
|
||||||
//checked: Render.fogEnabled
|
checked: Render.fogEnabled
|
||||||
checked: rendering_effects_state.checked
|
onCheckedChanged: {
|
||||||
//onCheckedChanged: {
|
Render.fogEnabled = checked;
|
||||||
// Render.fogEnabled = checked;
|
}
|
||||||
//}
|
}
|
||||||
|
|
||||||
|
CheckBox {
|
||||||
|
text: "Haze"
|
||||||
|
Layout.fillWidth: true
|
||||||
|
palette.windowText: "gray"
|
||||||
|
checked: Render.hazeEnabled
|
||||||
|
onCheckedChanged: {
|
||||||
|
Render.hazeEnabled = checked;
|
||||||
|
}
|
||||||
}
|
}
|
||||||
|
|
||||||
CheckBox {
|
CheckBox {
|
||||||
enabled: false
|
|
||||||
text: "Bloom"
|
text: "Bloom"
|
||||||
Layout.fillWidth: true
|
Layout.fillWidth: true
|
||||||
palette.windowText: "gray"
|
palette.windowText: "gray"
|
||||||
//checked: Render.bloomEnabled
|
checked: Render.bloomEnabled
|
||||||
checked: rendering_effects_state.checked
|
onCheckedChanged: {
|
||||||
//onCheckedChanged: {
|
Render.bloomEnabled = checked;
|
||||||
// Render.bloomEnabled = checked;
|
}
|
||||||
//}
|
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
|
|
Loading…
Reference in a new issue