|
|
|
@ -40,6 +40,8 @@ GridView {
|
|
|
|
|
model: uiModel.targetList;
|
|
|
|
|
GridView.delayRemove: true
|
|
|
|
|
|
|
|
|
|
property var manualInfo: null
|
|
|
|
|
|
|
|
|
|
// TODO: animations only properly work with abstractListModel... grrr...
|
|
|
|
|
addDisplaced: Transition {
|
|
|
|
|
NumberAnimation { properties: "x,y"; duration: 300 }
|
|
|
|
@ -65,10 +67,133 @@ GridView {
|
|
|
|
|
NumberAnimation { properties: "x,y"; duration: 300; easing.type: Easing.InQuad }
|
|
|
|
|
}
|
|
|
|
|
|
|
|
|
|
Dialog {
|
|
|
|
|
id: manualAddDialog
|
|
|
|
|
anchors.centerIn: parent
|
|
|
|
|
visible: false
|
|
|
|
|
modal: true
|
|
|
|
|
dim: true
|
|
|
|
|
parent: Overlay.overlay
|
|
|
|
|
Overlay.modal: Rectangle {
|
|
|
|
|
color: Qt.rgba(0,0,0,0.4)
|
|
|
|
|
opacity: backdropOpacity
|
|
|
|
|
Behavior on opacity {
|
|
|
|
|
NumberAnimation {
|
|
|
|
|
duration: 300
|
|
|
|
|
}
|
|
|
|
|
}
|
|
|
|
|
}
|
|
|
|
|
property real backdropOpacity: 1.0
|
|
|
|
|
enter: Transition {
|
|
|
|
|
NumberAnimation{target: madcontent; property: "y"; from: parent.height; to: 16; duration: 300; easing.type: Easing.OutQuad }
|
|
|
|
|
NumberAnimation{target: madbackground; property: "y"; from: parent.height; to: 0; duration: 300; easing.type: Easing.OutQuad }
|
|
|
|
|
NumberAnimation{target: manualAddDialog; property: "backdropOpacity"; from: 0; to: 1; duration: 300; easing.type: Easing.OutQuad }
|
|
|
|
|
}
|
|
|
|
|
|
|
|
|
|
exit: Transition {
|
|
|
|
|
NumberAnimation{target: madcontent; property: "y"; from: 16; to: parent.height; duration: 300; easing.type: Easing.InQuad }
|
|
|
|
|
NumberAnimation{target: madbackground; property: "y"; from: 0; to: parent.height; duration: 300; easing.type: Easing.InQuad }
|
|
|
|
|
NumberAnimation{target: manualAddDialog; property: "backdropOpacity"; from: 1; to: 0; duration: 300; easing.type: Easing.InQuad }
|
|
|
|
|
}
|
|
|
|
|
|
|
|
|
|
background: RPane {
|
|
|
|
|
id: madbackground
|
|
|
|
|
radius: 4
|
|
|
|
|
Material.elevation: 64
|
|
|
|
|
bgOpacity: 0.97
|
|
|
|
|
}
|
|
|
|
|
contentItem: Item {
|
|
|
|
|
id: madcontent
|
|
|
|
|
implicitWidth: steamscreener.width
|
|
|
|
|
implicitHeight: madtext.height + 16 + steamscreener.height + 16 + madrow.height
|
|
|
|
|
|
|
|
|
|
Label {
|
|
|
|
|
id: madtext
|
|
|
|
|
text: qsTr("Add \"GlosSITarget\" as game to Steam and change it's properties (in Steam) to this:")
|
|
|
|
|
}
|
|
|
|
|
|
|
|
|
|
Image {
|
|
|
|
|
anchors.top: madtext.bottom
|
|
|
|
|
anchors.left: madtext.left
|
|
|
|
|
anchors.topMargin: 16
|
|
|
|
|
id: steamscreener
|
|
|
|
|
source: "qrc:/steamscreener.png"
|
|
|
|
|
}
|
|
|
|
|
|
|
|
|
|
FluentTextInput {
|
|
|
|
|
id: madnameinput
|
|
|
|
|
text: manualInfo ? manualInfo.name : ""
|
|
|
|
|
anchors.top: steamscreener.top
|
|
|
|
|
anchors.left: steamscreener.left
|
|
|
|
|
anchors.topMargin: 72
|
|
|
|
|
anchors.leftMargin: 92
|
|
|
|
|
readOnly: true
|
|
|
|
|
background: Item {}
|
|
|
|
|
width: 550
|
|
|
|
|
}
|
|
|
|
|
|
|
|
|
|
FluentTextInput {
|
|
|
|
|
id: glossiPathInput
|
|
|
|
|
text: manualInfo ? manualInfo.launch : ""
|
|
|
|
|
anchors.top: steamscreener.top
|
|
|
|
|
anchors.left: steamscreener.left
|
|
|
|
|
anchors.topMargin: 192
|
|
|
|
|
anchors.leftMargin: 24
|
|
|
|
|
readOnly: true
|
|
|
|
|
background: Item {}
|
|
|
|
|
width: 550
|
|
|
|
|
}
|
|
|
|
|
|
|
|
|
|
FluentTextInput {
|
|
|
|
|
id: startDirInput
|
|
|
|
|
text: manualInfo ? manualInfo.launchDir : ""
|
|
|
|
|
anchors.top: steamscreener.top
|
|
|
|
|
anchors.left: steamscreener.left
|
|
|
|
|
anchors.topMargin: 266
|
|
|
|
|
anchors.leftMargin: 24
|
|
|
|
|
readOnly: true
|
|
|
|
|
background: Item {}
|
|
|
|
|
width: 550
|
|
|
|
|
}
|
|
|
|
|
|
|
|
|
|
FluentTextInput {
|
|
|
|
|
id: launchOptsInput
|
|
|
|
|
text: manualInfo ? manualInfo.config : ""
|
|
|
|
|
anchors.top: steamscreener.top
|
|
|
|
|
anchors.left: steamscreener.left
|
|
|
|
|
anchors.topMargin: 432
|
|
|
|
|
anchors.leftMargin: 24
|
|
|
|
|
readOnly: true
|
|
|
|
|
background: Item {}
|
|
|
|
|
width: 550
|
|
|
|
|
}
|
|
|
|
|
|
|
|
|
|
Row {
|
|
|
|
|
id: madrow
|
|
|
|
|
anchors.top: steamscreener.bottom
|
|
|
|
|
anchors.topMargin: 16
|
|
|
|
|
spacing: 16
|
|
|
|
|
|
|
|
|
|
Button {
|
|
|
|
|
text: qsTr("OK")
|
|
|
|
|
onClicked: function(){
|
|
|
|
|
manualAddDialog.close()
|
|
|
|
|
}
|
|
|
|
|
}
|
|
|
|
|
anchors.right: parent.right
|
|
|
|
|
}
|
|
|
|
|
}
|
|
|
|
|
}
|
|
|
|
|
|
|
|
|
|
InfoDialog {
|
|
|
|
|
id: writeErrorDialog
|
|
|
|
|
titleText: qsTr("Error")
|
|
|
|
|
text: qsTr("Error writing shortcuts.vdf...")
|
|
|
|
|
extraButton: true
|
|
|
|
|
extraButtonText: qsTr("Manual instructions")
|
|
|
|
|
onConfirmedExtra: function(data) {
|
|
|
|
|
manualAddDialog.open();
|
|
|
|
|
}
|
|
|
|
|
}
|
|
|
|
|
|
|
|
|
|
delegate: RPane {
|
|
|
|
@ -174,9 +299,6 @@ GridView {
|
|
|
|
|
anchors.bottom: parent.bottom
|
|
|
|
|
width: 72
|
|
|
|
|
onClicked: function(){
|
|
|
|
|
if (steamShortcutsChanged == false) {
|
|
|
|
|
steamChangedDialog.open();
|
|
|
|
|
}
|
|
|
|
|
if (delegateRoot.isInSteam) {
|
|
|
|
|
if (!uiModel.removeFromSteam(modelData.name, "")) {
|
|
|
|
|
writeErrorDialog.open();
|
|
|
|
@ -184,10 +306,14 @@ GridView {
|
|
|
|
|
}
|
|
|
|
|
} else {
|
|
|
|
|
if (!uiModel.addToSteam(modelData, "")) {
|
|
|
|
|
manualInfo = uiModel.manualProps(modelData);
|
|
|
|
|
writeErrorDialog.open();
|
|
|
|
|
return;
|
|
|
|
|
}
|
|
|
|
|
}
|
|
|
|
|
if (steamShortcutsChanged == false) {
|
|
|
|
|
steamChangedDialog.open();
|
|
|
|
|
}
|
|
|
|
|
delegateRoot.isInSteam = uiModel.isInSteam(modelData)
|
|
|
|
|
steamShortcutsChanged = true
|
|
|
|
|
}
|
|
|
|
|