From 7f6f01b5f2b6bfab0c6bf9c6b977fd6a79039899 Mon Sep 17 00:00:00 2001 From: emmaus Date: Sun, 7 Oct 2018 15:15:27 +0000 Subject: [PATCH] add general and log config uis --- Ryujinx.UI/UI/MainWindow.qml | 10 ++ Ryujinx.UI/UI/Views/Configuration.qml | 117 ++++++++++++++++++++++++ Ryujinx.UI/UI/Views/GeneralSettings.qml | 48 ++++++++++ Ryujinx.UI/UI/Views/MiscSettings.qml | 92 +++++++++++++++++++ 4 files changed, 267 insertions(+) create mode 100644 Ryujinx.UI/UI/Views/Configuration.qml create mode 100644 Ryujinx.UI/UI/Views/GeneralSettings.qml create mode 100644 Ryujinx.UI/UI/Views/MiscSettings.qml diff --git a/Ryujinx.UI/UI/MainWindow.qml b/Ryujinx.UI/UI/MainWindow.qml index a336a23716..7bff366bce 100644 --- a/Ryujinx.UI/UI/MainWindow.qml +++ b/Ryujinx.UI/UI/MainWindow.qml @@ -36,6 +36,16 @@ ApplicationWindow { } } + MenuItem { + id: configMenuItem + text: "Configuration" + onClicked: { + var component = Qt.createComponent("./Views/Configuration.qml") + var configWindow = component.createObject(window) + configWindow.show() + } + } + MenuSeparator{} MenuItem { diff --git a/Ryujinx.UI/UI/Views/Configuration.qml b/Ryujinx.UI/UI/Views/Configuration.qml new file mode 100644 index 0000000000..33375c58e3 --- /dev/null +++ b/Ryujinx.UI/UI/Views/Configuration.qml @@ -0,0 +1,117 @@ +import QtQuick 2.4 +import QtQuick.Window 2.11 +import QtQuick.Layouts 1.3 +import QtQuick.Templates 2.4 +import QtQuick.Controls 2.3 + +Window { + id: configWindow + width: 640 + height: 480 + color: "#f0efef" + title: "Configuration" + modality: Qt.ApplicationModal + + Column{ + spacing: 10 + id: contentColumn + height: configWindow.height + width: configWindow.width + + TabBar { + id: configTabs + currentIndex: 0 + height: 50 + width: parent.width + + TabButton { + width: 80 + height: 50 + text: qsTr("General") + checked: true + } + + /*TabButton { + text: qsTr("Controls") + }*/ + + TabButton { + x: 80 + y: 0 + width: 80 + text: qsTr("Misc") + checked: false + height: 50 + } + } + + StackLayout { + id: pagesView + currentIndex: configTabs.currentIndex + width: contentColumn.width + height: contentColumn.height + - configTabs.height + - bottomRow.height + - (contentColumn.spacing * 3) + + Item { + id: genConfigPage + + Loader { + source: "./GeneralSettings.qml" + + width: pagesView.width + height: pagesView.height + } + } + + Item { + id: miscConfigPage + + Loader { + source: "./MiscSettings.qml" + width: pagesView.width + height: pagesView.height + } + } + + /*onIndexChanged: { + if(currentIndex !== configContent.currentIndex){ + configContent.currentIndex = currentIndex + } + }*/ + } + + Row { + spacing: 20 + id: bottomRow + anchors.right: parent.right + anchors.rightMargin: 55 + + Button{ + id: acceptButton + width: 80 + height: 20 + text: "OK" + + onClicked: { + + configWindow.close() + } + } + + Button{ + id: cancelButton + width: 80 + height: 20 + text: "Cancel" + visible: true + + onClicked: { + + configWindow.close() + } + } + } + } +} diff --git a/Ryujinx.UI/UI/Views/GeneralSettings.qml b/Ryujinx.UI/UI/Views/GeneralSettings.qml new file mode 100644 index 0000000000..3d0fdd8908 --- /dev/null +++ b/Ryujinx.UI/UI/Views/GeneralSettings.qml @@ -0,0 +1,48 @@ +import QtQuick 2.0 +import QtQuick.Controls 2.3 +import QtQuick.Layouts 1.3 + +Frame { + id: generalSetttingsFrame + + Column { + anchors.fill: parent + + GroupBox { + title: qsTr("Game") + + Column { + CheckBox { + id: dockedCheckBox + text: "Enable Docked Mode" + + } + + CheckBox { + id: vsyncCheckBox + text: "Enable Ingame VSync" + + } + } + } + + GroupBox { + title: qsTr("System") + + Column { + CheckBox { + id: memoryCheckBox + text: "Enable Memory Checks" + + } + + CheckBox { + id: multiCoreCheckBox + text: "Enable Multi-Core Scheduling" + + } + } + } + } + +} diff --git a/Ryujinx.UI/UI/Views/MiscSettings.qml b/Ryujinx.UI/UI/Views/MiscSettings.qml new file mode 100644 index 0000000000..81f957e445 --- /dev/null +++ b/Ryujinx.UI/UI/Views/MiscSettings.qml @@ -0,0 +1,92 @@ +import QtQuick 2.0 +import QtQuick.Controls 2.3 +import QtQuick.Layouts 1.3 + +Frame { + id: miscSettingsFrame + width: 500 + height: 480 + Column{ + anchors.fill: parent + + GroupBox { + anchors.fill: parent + title: qsTr("Logging") + + Column { + id: column + anchors.fill: parent + CheckBox { + id: loggingCheckBox + text: "Enable Logging" + + } + + Row { + id: row + anchors.top: loggingCheckBox.bottom + anchors.topMargin: 0 + GroupBox { + id: logLevelsGroup + title: qsTr("Log Levels") + + Column { + anchors.fill: parent + + CheckBox { + id: debugLogCheckBox + text: "Debug" + } + + CheckBox { + id: stubLogCheckBox + text: "Stub" + } + + CheckBox { + id: infoLogCheckBox + text: "Info" + } + + CheckBox { + id: warnLogCheckBox + text: "Warning" + } + + CheckBox { + id: errorLogCheckBox + text: "Error" + } + } + } + + GroupBox { + id: groupBox + anchors.left: logLevelsGroup.right + anchors.leftMargin: 0 + title: qsTr("Log Classes") + width: Math.min(200, column.width - logLevelsGroup.width) - 20 + height: logLevelsGroup.height + + Column { + id: column1 + anchors.fill: parent + + TextArea { + id: logClassesTextArea + anchors.fill: parent + + } + } + } + + } + } + } + } +} + +/*##^## Designer { + D{i:29;anchors_height:-243;anchors_width:-111}D{i:4;anchors_height:0;anchors_width:0} +} + ##^##*/