diff --git a/GlosSIConfig/GlosSIConfig.vcxproj b/GlosSIConfig/GlosSIConfig.vcxproj index 816dbf2..025235d 100644 --- a/GlosSIConfig/GlosSIConfig.vcxproj +++ b/GlosSIConfig/GlosSIConfig.vcxproj @@ -137,6 +137,7 @@ + diff --git a/GlosSIConfig/GlosSIConfig.vcxproj.filters b/GlosSIConfig/GlosSIConfig.vcxproj.filters index 757008d..4b2ed94 100644 --- a/GlosSIConfig/GlosSIConfig.vcxproj.filters +++ b/GlosSIConfig/GlosSIConfig.vcxproj.filters @@ -71,6 +71,9 @@ qml + + qml + diff --git a/GlosSIConfig/Resource.rc b/GlosSIConfig/Resource.rc index 0c465db..315c1a0 100644 --- a/GlosSIConfig/Resource.rc +++ b/GlosSIConfig/Resource.rc @@ -51,8 +51,8 @@ END // VS_VERSION_INFO VERSIONINFO - FILEVERSION 0,0,8,105004039005 - PRODUCTVERSION 0,0,8,105004039005 + FILEVERSION 0,0,8,1023005406006 + PRODUCTVERSION 0,0,8,1023005406006 FILEFLAGSMASK 0x3fL #ifdef _DEBUG FILEFLAGS 0x1L @@ -69,12 +69,12 @@ BEGIN BEGIN VALUE "CompanyName", "Peter Repukat - FlatspotSoftware" VALUE "FileDescription", "GlosSI - Config" - VALUE "FileVersion", "0.0.8.1-5-g40390b5" + VALUE "FileVersion", "0.0.8.1-23-g54e6bf6" VALUE "InternalName", "GlosSIConfig" VALUE "LegalCopyright", "Copyright (C) 2021 Peter Repukat - FlatspotSoftware" VALUE "OriginalFilename", "GlosSIConfig.exe" VALUE "ProductName", "GlosSI" - VALUE "ProductVersion", "0.0.8.1-5-g40390b5" + VALUE "ProductVersion", "0.0.8.1-23-g54e6bf6" END END BLOCK "VarFileInfo" @@ -872,6 +872,226 @@ IDI_ICON1 ICON "..\GloSC_Icon.ico" + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + diff --git a/GlosSIConfig/qml.qrc b/GlosSIConfig/qml.qrc index b626964..b273ad9 100644 --- a/GlosSIConfig/qml.qrc +++ b/GlosSIConfig/qml.qrc @@ -17,5 +17,7 @@ svg/help_outline_white_24dp.svg qml/SteamNotFoundDialog.qml qml/SteamInputXboxDisabledDialog.qml + qml/CollapsiblePane.qml + svg/expand_more_white_24dp.svg diff --git a/GlosSIConfig/qml/CollapsiblePane.qml b/GlosSIConfig/qml/CollapsiblePane.qml new file mode 100644 index 0000000..c5273e4 --- /dev/null +++ b/GlosSIConfig/qml/CollapsiblePane.qml @@ -0,0 +1,96 @@ +/* +Copyright 2021-2022 Peter Repukat - FlatspotSoftware + +Licensed under the Apache License, Version 2.0 (the "License"); +you may not use this file except in compliance with the License. +You may obtain a copy of the License at + +http://www.apache.org/licenses/LICENSE-2.0 + +Unless required by applicable law or agreed to in writing, software +distributed under the License is distributed on an "AS IS" BASIS, +WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. +See the License for the specific language governing permissions and +limitations under the License. +*/ +import QtQuick 2.9 +import QtQuick.Controls 2.9 +import QtQuick.Controls.Material 2.9 +import QtQuick.Controls.Material.impl 2.9 + + +RPane { + property alias title: paneTitle.text + width: parent.width + + property alias content: ldr.sourceComponent + clip: true + height: paneTitle.height + collapseColumn.spacing + property bool collapsed: true + id: collapsePane + + Behavior on height { + NumberAnimation { + duration: 300 + easing.type: Easing.InOutQuad + } + } + + Column { + id: collapseColumn + width: parent.width + spacing: 16 + Item { + width: parent.width + height: paneTitle.height + Label { + id: paneTitle + anchors.left: parent.left + anchors.leftMargin: 4 + font.bold: true + font.pixelSize: 24 + anchors.top: parent.top + anchors.topMargin: -2 + } + RoundButton { + width: 48 + height: 48 + Material.elevation: 0 + anchors.rightMargin: 0 + anchors.top: parent.top + anchors.topMargin: -12 + onClicked: function(){ + collapsed = !collapsed; + if (collapsed) { + collapsePane.height = paneTitle.height + collapseColumn.spacing + } else { + collapsePane.height = paneTitle.height + collapseColumn.spacing * 3 + ldr.item.height + } + } + Image { + id: arrowImg + anchors.centerIn: parent + source: "qrc:/svg/expand_more_white_24dp.svg" + width: 24 + height: 24 + transform: Rotation{ + angle: collapsed ? 0 : 180 + origin.x: arrowImg.width/2 + origin.y: arrowImg.height/2 + Behavior on angle { + NumberAnimation { + duration: 125 + easing.type: Easing.InOutQuad + } + } + } + } + anchors.right: parent.right + } + } + Loader { + id: ldr + width: parent.width + } + } +} diff --git a/GlosSIConfig/qml/ShortcutProps.qml b/GlosSIConfig/qml/ShortcutProps.qml index e6f0029..d787be0 100644 --- a/GlosSIConfig/qml/ShortcutProps.qml +++ b/GlosSIConfig/qml/ShortcutProps.qml @@ -311,232 +311,241 @@ Item { width: 1 height: 8 } - Row { - spacing: 16 - width: parent.width - RPane { - width: parent.width / 2 - 8 - height: 264 - radius: 4 - Material.elevation: 32 - bgOpacity: 0.97 + CollapsiblePane { + radius: 4 + Material.elevation: 32 + bgOpacity: 0.97 + title: qsTr("Advanced") + content: Row { + spacing: 16 + width: parent.width - Column { - spacing: 2 - width: parent.width - Row { - CheckBox { - id: hideDevices - text: qsTr("Hide (Real) Controllers") - checked: shortcutInfo.devices.hideDevices - onCheckedChanged: shortcutInfo.devices.hideDevices = checked - } - RoundButton { - onClicked: () => { - helpInfoDialog.titleText = qsTr("Hide (Real) Controllers") - helpInfoDialog.text = - qsTr("Hides real game controllers from the system\nThis may prevent doubled inputs") - + "\n" - + qsTr("You can change this setting and which devices are hidden in the GlosSI overlay") - - helpInfoDialog.open() + RPane { + width: parent.width / 2 - 8 + height: 264 + radius: 4 + Material.elevation: 32 + bgOpacity: 0.97 + + Column { + spacing: 2 + width: parent.width + Row { + CheckBox { + id: hideDevices + text: qsTr("Hide (Real) Controllers") + checked: shortcutInfo.devices.hideDevices + onCheckedChanged: shortcutInfo.devices.hideDevices = checked } - width: 48 - height: 48 - Material.elevation: 0 - anchors.topMargin: 16 - Image { - anchors.centerIn: parent - source: "qrc:/svg/help_outline_white_24dp.svg" - width: 24 - height: 24 + RoundButton { + onClicked: () => { + helpInfoDialog.titleText = qsTr("Hide (Real) Controllers") + helpInfoDialog.text = + qsTr("Hides real game controllers from the system\nThis may prevent doubled inputs") + + "\n" + + qsTr("You can change this setting and which devices are hidden in the GlosSI overlay") + + helpInfoDialog.open() + } + width: 48 + height: 48 + Material.elevation: 0 + anchors.topMargin: 16 + Image { + anchors.centerIn: parent + source: "qrc:/svg/help_outline_white_24dp.svg" + width: 24 + height: 24 + } } } - } - Item { - width: 1 - height: 4 - } - Row { - CheckBox { - id: realDeviceIds - text: qsTr("Use real device (USB)-IDs") - checked: shortcutInfo.devices.realDeviceIds - onCheckedChanged: shortcutInfo.devices.realDeviceIds = checked + Item { + width: 1 + height: 4 } - RoundButton { - onClicked: () => { - helpInfoDialog.titleText = qsTr("Use real device (USB)-IDs") - helpInfoDialog.text = - qsTr("Only enable if input's are not recognized by the game") - + "\n" - + qsTr("If enabled, device-hiding won't work.\nUse the \"Max. Controller count\" setting!") - - helpInfoDialog.open() + Row { + CheckBox { + id: realDeviceIds + text: qsTr("Use real device (USB)-IDs") + checked: shortcutInfo.devices.realDeviceIds + onCheckedChanged: shortcutInfo.devices.realDeviceIds = checked } - width: 48 - height: 48 - Material.elevation: 0 - anchors.topMargin: 16 - Image { - anchors.centerIn: parent - source: "qrc:/svg/help_outline_white_24dp.svg" - width: 24 - height: 24 + RoundButton { + onClicked: () => { + helpInfoDialog.titleText = qsTr("Use real device (USB)-IDs") + helpInfoDialog.text = + qsTr("Only enable if input's are not recognized by the game") + + "\n" + + qsTr("If enabled, device-hiding won't work.\nUse the \"Max. Controller count\" setting!") + + helpInfoDialog.open() + } + width: 48 + height: 48 + Material.elevation: 0 + anchors.topMargin: 16 + Image { + anchors.centerIn: parent + source: "qrc:/svg/help_outline_white_24dp.svg" + width: 24 + height: 24 + } } } - } - Item { - width: 1 - height: 4 - } - Row { - CheckBox { - id: emulateDS4 - text: qsTr("Emulate DS4") - checked: shortcutInfo.controller.emulateDS4 || false - onCheckedChanged: shortcutInfo.controller.emulateDS4 = checked + Item { + width: 1 + height: 4 } - RoundButton { - onClicked: () => { - helpInfoDialog.titleText = qsTr("Emulate DS4") - helpInfoDialog.text = - qsTr("Emulates a DS4 instead of X360 Pad") - + "\n" - qsTr("for usage with, for example, PSNow") - + "\n" - + qsTr("If enabled you have to disable \"Playstation Configuration support\" in Steam") - helpInfoDialog.open() + Row { + CheckBox { + id: emulateDS4 + text: qsTr("Emulate DS4") + checked: shortcutInfo.controller.emulateDS4 || false + onCheckedChanged: shortcutInfo.controller.emulateDS4 = checked } - width: 48 - height: 48 - Material.elevation: 0 - anchors.topMargin: 16 - Image { - anchors.centerIn: parent - source: "qrc:/svg/help_outline_white_24dp.svg" - width: 24 - height: 24 + RoundButton { + onClicked: () => { + helpInfoDialog.titleText = qsTr("Emulate DS4") + helpInfoDialog.text = + qsTr("Emulates a DS4 instead of X360 Pad") + + "\n" + qsTr("for usage with, for example, PSNow") + + "\n" + + qsTr("If enabled you have to disable \"Playstation Configuration support\" in Steam") + helpInfoDialog.open() + } + width: 48 + height: 48 + Material.elevation: 0 + anchors.topMargin: 16 + Image { + anchors.centerIn: parent + source: "qrc:/svg/help_outline_white_24dp.svg" + width: 24 + height: 24 + } } } - } - Item { - width: 1 - height: 4 - } - Row { - leftPadding: 16 - Label { - text: qsTr("Max. emulated controllers") - topPadding: 16 - } - SpinBox { - id: maxControllersSpinBox - width: 128 - value: shortcutInfo.controller.maxControllers - from: 0 - to: 4 - onValueChanged: shortcutInfo.controller.maxControllers = value + Item { + width: 1 + height: 4 } - RoundButton { - onClicked: () => { - helpInfoDialog.titleText = qsTr("Max. emulated controllers") - helpInfoDialog.text = - qsTr("GlosSI will only provide [NUMBER] of controllers") - + "\n" - + qsTr("Required to set to actually connected controller count when using \"real devuce IDs\" ") - helpInfoDialog.open() + Row { + leftPadding: 16 + Label { + text: qsTr("Max. emulated controllers") + topPadding: 16 } - width: 48 - height: 48 - Material.elevation: 0 - anchors.topMargin: 16 - Image { - anchors.centerIn: parent - source: "qrc:/svg/help_outline_white_24dp.svg" - width: 24 - height: 24 + SpinBox { + id: maxControllersSpinBox + width: 128 + value: shortcutInfo.controller.maxControllers + from: 0 + to: 4 + onValueChanged: shortcutInfo.controller.maxControllers = value + } + RoundButton { + onClicked: () => { + helpInfoDialog.titleText = qsTr("Max. emulated controllers") + helpInfoDialog.text = + qsTr("GlosSI will only provide [NUMBER] of controllers") + + "\n" + + qsTr("Required to set to actually connected controller count when using \"real devuce IDs\" ") + helpInfoDialog.open() + } + width: 48 + height: 48 + Material.elevation: 0 + anchors.topMargin: 16 + Image { + anchors.centerIn: parent + source: "qrc:/svg/help_outline_white_24dp.svg" + width: 24 + height: 24 + } } } } } - } - RPane { - width: parent.width / 2 - 8 - height: 264 - radius: 4 - Material.elevation: 32 - bgOpacity: 0.97 - Column { - spacing: 2 - width: parent.width - Row { - CheckBox { - id: windowMode - text: qsTr("Steam/GlosSI overlay as separate window") - checked: shortcutInfo.window.windowMode - onCheckedChanged: shortcutInfo.window.windowMode = checked - } - RoundButton { - onClicked: () => { - helpInfoDialog.titleText = qsTr("Steam/GlosSI overlay as separate window") - helpInfoDialog.text = - qsTr("Doesn't show overlay on top, but as separate window") - + "\n" - + qsTr("Use if blackscreen-issues are encountered.") - - helpInfoDialog.open() + RPane { + width: parent.width / 2 - 8 + height: 264 + radius: 4 + Material.elevation: 32 + bgOpacity: 0.97 + Column { + spacing: 2 + width: parent.width + Row { + CheckBox { + id: windowMode + text: qsTr("Steam/GlosSI overlay as separate window") + checked: shortcutInfo.window.windowMode + onCheckedChanged: shortcutInfo.window.windowMode = checked } - width: 48 - height: 48 - Material.elevation: 0 - anchors.topMargin: 16 - Image { - anchors.centerIn: parent - source: "qrc:/svg/help_outline_white_24dp.svg" - width: 24 - height: 24 + RoundButton { + onClicked: () => { + helpInfoDialog.titleText = qsTr("Steam/GlosSI overlay as separate window") + helpInfoDialog.text = + qsTr("Doesn't show overlay on top, but as separate window") + + "\n" + + qsTr("Use if blackscreen-issues are encountered.") + + helpInfoDialog.open() + } + width: 48 + height: 48 + Material.elevation: 0 + anchors.topMargin: 16 + Image { + anchors.centerIn: parent + source: "qrc:/svg/help_outline_white_24dp.svg" + width: 24 + height: 24 + } } } - } - Item { - width: 1 - height: 4 - } - - Row { - CheckBox { - id: disableOverlayCheckbox - text: qsTr("Disable Steam/GlosSI overlay") - checked: shortcutInfo.window.disableOverlay - onCheckedChanged: shortcutInfo.window.disableOverlay = checked + Item { + width: 1 + height: 4 } - RoundButton { - onClicked: () => { - helpInfoDialog.titleText = qsTr("Disable Steam/GlosSI overlay") - helpInfoDialog.text = - qsTr("Only controller emulation - No extra window") - + "\n" - + qsTr("Might help with Steam remote play.") - helpInfoDialog.open() + Row { + CheckBox { + id: disableOverlayCheckbox + text: qsTr("Disable Steam/GlosSI overlay") + checked: shortcutInfo.window.disableOverlay + onCheckedChanged: shortcutInfo.window.disableOverlay = checked } - width: 48 - height: 48 - Material.elevation: 0 - anchors.topMargin: 16 - Image { - anchors.centerIn: parent - source: "qrc:/svg/help_outline_white_24dp.svg" - width: 24 - height: 24 + RoundButton { + onClicked: () => { + helpInfoDialog.titleText = qsTr("Disable Steam/GlosSI overlay") + helpInfoDialog.text = + qsTr("Only controller emulation - No extra window") + + "\n" + + qsTr("Might help with Steam remote play.") + + helpInfoDialog.open() + } + width: 48 + height: 48 + Material.elevation: 0 + anchors.topMargin: 16 + Image { + anchors.centerIn: parent + source: "qrc:/svg/help_outline_white_24dp.svg" + width: 24 + height: 24 + } } } } } } + } + Item { id: bottomspacing width: 1 diff --git a/GlosSIConfig/svg/expand_more_white_24dp.svg b/GlosSIConfig/svg/expand_more_white_24dp.svg new file mode 100644 index 0000000..9c420ca --- /dev/null +++ b/GlosSIConfig/svg/expand_more_white_24dp.svg @@ -0,0 +1 @@ + \ No newline at end of file