From ae198ea1ee4fdb46c46329fb9f5a00f2183dd3a3 Mon Sep 17 00:00:00 2001 From: armored-dragon Date: Thu, 5 Sep 2024 02:15:24 -0500 Subject: [PATCH] Added basic graphic settings. --- scripts/system/settings/settings.js | 4 -- scripts/system/settings/settings.qml | 85 +++++++++++++++++++++++++++- 2 files changed, 82 insertions(+), 7 deletions(-) diff --git a/scripts/system/settings/settings.js b/scripts/system/settings/settings.js index 74dad37266..44546bff29 100644 --- a/scripts/system/settings/settings.js +++ b/scripts/system/settings/settings.js @@ -12,10 +12,6 @@ /* global Script Tablet */ // TODO: Bind Target frame Rate to Graphics Preset -// TODO: Refresh rates -// TODO: Rendering scale -// TODO: FOV -// TODO: Anti-Aliasing // TODO: Fullscreen display? (() => { diff --git a/scripts/system/settings/settings.qml b/scripts/system/settings/settings.qml index 1e15c392ca..3999b8fd4c 100644 --- a/scripts/system/settings/settings.qml +++ b/scripts/system/settings/settings.qml @@ -35,7 +35,6 @@ Rectangle { } } - // Graphics ColumnLayout { width: parent.width - 10 @@ -68,7 +67,6 @@ Rectangle { ListElement { text: "High" } ListElement { text: "Custom" } } - onCurrentIndexChanged: console.debug(cbItems.get(currentIndex).text + ", " + cbItems.get(currentIndex).color) } } @@ -89,10 +87,13 @@ Rectangle { id: rendering_effects_state } } + + // FIXME: Height is hardcoded // Rendering Effects sub options Item { Layout.fillWidth: true visible: rendering_effects_state.checked == true + height: 100 Rectangle { color: "#333333" @@ -102,7 +103,7 @@ Rectangle { GridLayout { columns: 2 - height: implicitHeight + 10 + height: 100 width: parent.width - 10 anchors.horizontalCenter: parent.horizontalCenter @@ -152,6 +153,84 @@ Rectangle { validator: RegExpValidator { regExp: /[0-9]*/ } } } + + // Resolution Scale + RowLayout { + width: parent.width + + Text { + text: "Resolution Scale" + color: "white" + height: parent.height + width: parent.width - 150 + font.pointSize: 14 + Layout.fillWidth: true + } + + Text { + text: parent.children[2].value.toFixed(1) + color: "white" + } + + Slider { + id: resolution_slider + from: 0.1 + to: 2 + value: 1 + stepSize: 0.1 + } + } + + // FOV + RowLayout { + width: parent.width + + Text { + text: "FOV" + color: "white" + height: parent.height + width: parent.width - 150 + font.pointSize: 14 + Layout.fillWidth: true + } + + Text { + text: parent.children[2].value.toFixed(1) + color: "white" + } + + Slider { + id: fov_slider + from: 20 + to: 130 + value: 90 // TODO: Need to set to Overte default + stepSize: 1 + } + } + + // Graphics Presets + RowLayout { + width: parent.width + + Text { + text: "Anti-Aliasing" + color: "white" + height: parent.height + width: parent.width - 150 + font.pointSize: 14 + Layout.fillWidth: true + } + + ComboBox { + currentIndex: 2 + Layout.fillWidth: true + model: ListModel { + ListElement { text: "None" } + ListElement { text: "TAA" } + ListElement { text: "FXAA" } + } + } + } } // Templates