@ -29,62 +29,62 @@ Item {
signal cancel ( )
signal done ( var shortcut )
property var shortcutInfo: ( {
version: 1 ,
name: null ,
launch: false ,
launchPath: null ,
launchAppArgs: null ,
closeOnExit: true ,
waitForChildProcs: true ,
hideDevices: true ,
windowMode: false ,
maxFps: null ,
scale: null ,
icon: null ,
maxControllers: 4 ,
disableOverlay: false ,
realDeviceIds: false ,
allowDesktopConfig: false ,
emulateDS4: false ,
} )
property var shortcutInfo: ( { } )
function resetInfo ( ) {
shortcutInfo = ( {
version: 1 ,
name: null ,
launch: false ,
launchPath: null ,
launchAppArgs: null ,
closeOnExit: true ,
waitForChildProcs: true ,
hideDevices: true ,
windowMode: false ,
maxFps: null ,
scale: null ,
icon: null ,
maxControllers: 4 ,
disableOverlay: false ,
realDeviceIds: false ,
allowDesktopConfig: false ,
emulateDS4: false ,
"controller" : {
"maxControllers" : 1 ,
"emulateDS4" : false ,
"allowDesktopConfig" : false
} ,
"devices" : {
"hideDevices" : true ,
"realDeviceIds" : false
} ,
"icon" : null ,
"launch" : {
"closeOnExit" : true ,
"launch" : false ,
"launchAppArgs" : null ,
"launchPath" : null ,
"waitForChildProcs" : true
} ,
"name" : null ,
"version" : 1 ,
"window" : {
"disableOverlay" : false ,
"maxFps" : null ,
"scale" : null ,
"windowMode" : false
} ,
"extendedLogging" : false
} )
}
Component.onCompleted: function ( ) {
resetInfo ( )
}
onShortcutInfoChanged: function ( ) {
nameInput . text = shortcutInfo . name || ""
launchApp . checked = shortcutInfo . launch || false
pathInput . text = shortcutInfo . launchPath || ""
argsInput . text = shortcutInfo . launchAppArgs || ""
closeOnExit . checked = shortcutInfo . closeOnExit || false
waitForChildren . checked = shortcutInfo . waitForChildProcs
hideDevices . checked = shortcutInfo . hideDevices || false
windowMode . checked = shortcutInfo . windowMode || false
maxControllersSpinBox . value = shortcutInfo . maxControllers
disableOverlayCheckbox . checked = shortcutInfo . disableOverlay || false
realDeviceIds . checked = shortcutInfo . realDeviceIds || false
allowDesktopConfig . checked = shortcutInfo . allowDesktopConfig || false
emulateDS4 . checked = shortcutInfo . emulateDS4 || false
if ( extendedLogging ) {
extendedLogging . checked = shortcutInfo . extendedLogging || false
}
launchApp . checked = shortcutInfo . launch . launch
pathInput . text = shortcutInfo . launch . launchPath || ""
argsInput . text = shortcutInfo . launch . launchAppArgs || ""
closeOnExit . checked = shortcutInfo . launch . closeOnExit
waitForChildren . checked = shortcutInfo . launch . waitForChildProcs
hideDevices . checked = shortcutInfo . devices . hideDevices
realDeviceIds . checked = shortcutInfo . devices . realDeviceIds
windowMode . checked = shortcutInfo . window . windowMode
disableOverlayCheckbox . checked = shortcutInfo . window . disableOverlay
scaleSpinBox . value = shortcutInfo . window . scale
maxFPSSpinBox . value = shortcutInfo . window . maxFps
maxControllersSpinBox . value = shortcutInfo . controller . maxControllers
allowDesktopConfig . checked = shortcutInfo . controller . allowDesktopConfig
emulateDS4 . checked = shortcutInfo . controller . emulateDS4
}
Flickable {
@ -144,7 +144,6 @@ Item {
}
RPane {
width: parent . width
height: 248
radius: 4
Material.elevation: 32
bgOpacity: 0.97
@ -155,17 +154,18 @@ Item {
Row {
spacing: 32
width: parent . width
height: closeOnExitCol . height
CheckBox {
id: launchApp
text: qsTr ( "Launch app" )
checked: shortcutInfo . launch
checked: shortcutInfo . launch . launch
onCheckedChanged: function ( ) {
shortcutInfo . launch = checked
shortcutInfo . launch . launch = checked
if ( checked ) {
closeOnExit . enabled = true ;
if ( closeOnExit . checked ) {
waitForChildren . enabled = true ;
if ( closeOnExit ) {
closeOnExit . enabled = true ;
if ( closeOnExit . checked ) {
waitForChildren . enabled = true ;
}
}
allowDesktopConfig . enabled = true ;
} else {
@ -175,54 +175,6 @@ Item {
}
}
}
Column {
id: closeOnExitCol
spacing: 2
CheckBox {
id: closeOnExit
text: qsTr ( "Close when launched app quits" )
checked: shortcutInfo . closeOnExit
onCheckedChanged: function ( ) {
shortcutInfo . closeOnExit = checked
if ( checked ) {
waitForChildren . enabled = true ;
} else {
waitForChildren . enabled = false ;
}
}
}
Label {
text: qsTr ( "Recommended to disable for launcher-games" )
wrapMode: Text . WordWrap
width: parent . width
leftPadding: 32
topPadding: - 8
}
CheckBox {
id: waitForChildren
text: qsTr ( "Wait for child processes" )
checked: shortcutInfo . waitForChildProcs
onCheckedChanged: function ( ) {
shortcutInfo . waitForChildProcs = checked
}
}
}
Column {
spacing: 2
CheckBox {
id: allowDesktopConfig
text: qsTr ( "Allow desktop-config" )
checked: shortcutInfo . allowDesktopConfig
onCheckedChanged: function ( ) {
shortcutInfo . allowDesktopConfig = checked
}
}
Label {
text: qsTr ( "Use desktop-config if launched application is not focused" )
leftPadding: 32
topPadding: - 8
}
}
}
Item {
width: 1
@ -231,14 +183,17 @@ Item {
RowLayout {
id: launchlayout
spacing: 4
width: parent . width
anchors.left: parent . left
anchors.right: parent . right
anchors.leftMargin: 32
anchors.rightMargin: 32
Image {
id: maybeIcon
source: shortcutInfo . icon
? shortcutInfo . icon . endsWith ( ".exe" )
? "image://exe/" + shortcutInfo . icon
: "file:///" + shortcutInfo . icon
: null
: ''
Layout.preferredWidth: 48
Layout.preferredHeight: 48
visible: shortcutInfo . icon
@ -267,8 +222,8 @@ Item {
id: pathInput
placeholderText: qsTr ( "..." )
enabled: launchApp . checked
text: shortcutInfo . launch Path || ""
onTextChanged: shortcutInfo . launch Path = text
text: shortcutInfo . launch . launch Path || ""
onTextChanged: shortcutInfo . launch . launch Path = text
}
}
Button {
@ -304,8 +259,8 @@ Item {
anchors.topMargin: 4
id: argsInput
enabled: launchApp . checked
text: shortcutInfo . launch AppArgs
onTextChanged: shortcutInfo . launch AppArgs = text
text: shortcutInfo . launch . launch AppArgs
onTextChanged: shortcutInfo . launch . launch AppArgs = text
}
}
}
@ -315,183 +270,467 @@ 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:
Column {
spacing: 16
Column {
spacing: 2
RPane {
width: parent . width
Row {
CheckBox {
id: hideDevices
text: qsTr ( "Hide (Real) Controllers" )
checked: shortcutInfo . hideDevices
onCheckedChanged: shortcutInfo . 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 ( )
radius: 4
Material.elevation: 32
bgOpacity: 0.97
height: advancedLaunchCol . height + 24
Column {
id: advancedLaunchCol
spacing: 4
height: advancedLaunchedRow . height
Row {
id: advancedLaunchedRow
spacing: 32
width: parent . width
height: closeOnExitCol . height
Column {
id: closeOnExitCol
spacing: 2
CheckBox {
id: closeOnExit
text: qsTr ( "Close when launched app quits" )
checked: shortcutInfo . launch . closeOnExit
onCheckedChanged: function ( ) {
shortcutInfo . launch . closeOnExit = checked
if ( checked ) {
waitForChildren . enabled = true ;
} else {
waitForChildren . enabled = false ;
}
}
}
Label {
text: qsTr ( "Recommended to disable for launcher-games" )
wrapMode: Text . WordWrap
width: parent . width
leftPadding: 32
topPadding: - 8
}
CheckBox {
id: waitForChildren
text: qsTr ( "Wait for child processes" )
checked: shortcutInfo . launch . waitForChildProcs
onCheckedChanged: function ( ) {
shortcutInfo . launch . waitForChildProcs = 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
Column {
spacing: 2
CheckBox {
id: allowDesktopConfig
text: qsTr ( "Allow desktop-config" )
checked: shortcutInfo . controller . allowDesktopConfig
onCheckedChanged: function ( ) {
shortcutInfo . controller . allowDesktopConfig = checked
}
}
Label {
text: qsTr ( "Allow desktop-config if launched application is not focused" )
leftPadding: 32
topPadding: - 8
}
}
}
}
Item {
width: 1
height: 4
}
Row {
CheckBox {
id: realDeviceIds
text: qsTr ( "Use real device (USB)-IDs" )
checked: shortcutInfo . realDeviceIds
onCheckedChanged: shortcutInfo . realDeviceIds = checked
}
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 {
spacing: 16
width: parent . width
RPane {
width: parent . width / 2 - 8
height: 248
radius: 4
Material.elevation: 32
bgOpacity: 0.97
Column {
spacing: 0
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 ( )
}
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
}
}
}
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
}
}
}
Item {
width: 1
height: 4
}
Row {
CheckBox {
id: emulateDS4
text: qsTr ( "Emulate DS4" )
checked: shortcutInfo . emulateDS4
onCheckedChanged: shortcutInfo . emulateDS4 = checked
}
RoundButton {
onClicked: ( ) = > {
helpInfoDialog . titleText = qsTr ( "Emulate DS4" )
helpInfoDialog . text =
qsTr ( "Instead of X360 Pad" )
+ "\n"
+ qsTr ( "Disable \"Playstation Configuration support\" in Steam" )
helpInfoDialog . open ( )
Row {
CheckBox {
id: realDeviceIds
text: qsTr ( "Use real device (USB)-IDs" )
checked: shortcutInfo . devices . realDeviceIds
onCheckedChanged: shortcutInfo . devices . realDeviceIds = checked
}
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
}
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
}
}
}
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
editable: true
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 device 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
}
}
}
}
}
Item {
width: 1
height: 4
}
Row {
leftPadding: 16
Label {
text: qsTr ( "Max. emulated controllers" )
topPadding: 16
}
SpinBox {
id: maxControllersSpinBox
width: 128
value: 4
from: 0
to: 4
onValueChanged: shortcutInfo . maxControllers = value
RPane {
width: parent . width / 2 - 8
height: 248
radius: 4
Material.elevation: 32
bgOpacity: 0.97
Column {
spacing: 0
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 ( )
}
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
}
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 {
width: 1
height: 4
}
Row {
leftPadding: 16
Label {
text: qsTr ( "GlosSI-Overlay scale" )
topPadding: 16
}
SpinBox {
id: scaleSpinBox
width: 172
from: - 100
value: shortcutInfo . window . scale * 100 || 0
to: 350
stepSize: 10
editable: true
property int decimals: 2
property real realValue: value / 100
validator: DoubleValidator {
bottom: Math . min ( scaleSpinBox . from , scaleSpinBox . to )
top: Math . max ( scaleSpinBox . from , scaleSpinBox . to )
}
textFromValue: function ( value , locale ) {
return Number ( value / 100 ) . toLocaleString ( locale , 'f' , scaleSpinBox . decimals )
}
valueFromText: function ( text , locale ) {
return Number . fromLocaleString ( locale , text ) * 100
}
onValueChanged: function ( ) {
if ( value <= 0 ) {
shortcutInfo . window . scale = null
return
}
shortcutInfo . window . scale = value / 100
}
}
RoundButton {
onClicked: ( ) = > {
helpInfoDialog . titleText = qsTr ( "GloSI-Overlay scaling" )
helpInfoDialog . text =
qsTr ( "Scales the elements of the GlosSI-Overlay (not Steam Overlay)" )
+ "\n"
+ qsTr ( " <= 0.0 to use auto-detection" )
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. Overlay FPS" )
topPadding: 16
}
SpinBox {
id: maxFPSSpinBox
width: 172
from: - 1
value: shortcutInfo . window . maxFps || 0
to: 244
stepSize: 5
editable: true
onValueChanged: function ( ) {
if ( value <= 0 ) {
shortcutInfo . window . maxFps = null
return
}
shortcutInfo . window . maxFps = value
}
}
RoundButton {
onClicked: ( ) = > {
helpInfoDialog . titleText = qsTr ( "Max. Overlay FPS" )
helpInfoDialog . text =
qsTr ( "Restricts the FPS of the overlay to the given value" )
+ "\n"
+ qsTr ( " <= 0.0 to use screen refresh rate" )
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
RPane {
width: parent . width
CheckBox {
id: windowMode
text: qsTr ( "Steam/GlosSI overlay as separate window" )
checked: shortcutInfo . windowMode
onCheckedChanged: shortcutInfo . windowMode = checked
}
Label {
text: qsTr ( "Doesn't show overlay on top, but as separate window" )
wrapMode: Text . WordWrap
width: parent . width
leftPadding: 32
topPadding: - 8
}
Label {
text: qsTr ( "Use if blackscreen-issues are encountered." )
wrapMode: Text . WordWrap
width: parent . width
leftPadding: 32
}
Item {
width: 1
height: 4
}
CheckBox {
id: disableOverlayCheckbox
text: qsTr ( "Disable Steam/GlosSI overlay" )
checked: shortcutInfo . disableOverlay
onCheckedChanged: shortcutInfo . disableOverlay = checked
}
Label {
text: qsTr ( "Only controller emulation - No extra window" )
wrapMode: Text . WordWrap
width: parent . width
leftPadding: 32
topPadding: - 8
radius: 4
Material.elevation: 32
bgOpacity: 0.97
Column {
spacing: 4
Row {
Row {
CheckBox {
id: extendedLogging
text: qsTr ( "Extended Logging" )
checked: shortcutInfo . extendedLogging
onCheckedChanged: shortcutInfo . extendedLogging = checked
}
/ / R o u n d B u t t o n {
/ / o n C l i c k e d : ( ) = > {
/ / h e l p I n f o D i a l o g . t i t l e T e x t = q s T r ( " H i d e ( R e a l ) C o n t r o l l e r s " )
/ / h e l p I n f o D i a l o g . t e x t =
/ / q s T r ( " H i d e s r e a l g a m e c o n t r o l l e r s f r o m t h e s y s t e m \ n T h i s m a y p r e v e n t d o u b l e d i n p u t s " )
/ / + " \ n "
/ / + q s T r ( " Y o u c a n c h a n g e t h i s s e t t i n g a n d w h i c h d e v i c e s a r e h i d d e n i n t h e G l o s S I o v e r l a y " )
/ / h e l p I n f o D i a l o g . o p e n ( )
/ / }
/ / w i d t h : 4 8
/ / h e i g h t : 4 8
/ / M a t e r i a l . e l e v a t i o n : 0
/ / a n c h o r s . t o p M a r g i n : 1 6
/ / I m a g e {
/ / a n c h o r s . c e n t e r I n : p a r e n t
/ / s o u r c e : " q r c : / s v g / h e l p _ o u t l i n e _ w h i t e _ 2 4 d p . s v g "
/ / w i d t h : 2 4
/ / h e i g h t : 2 4
/ / }
/ / }
}
}
}
}
}
}
Item {
id: bottomspacing
width: 1