Skip to content

Commit c8529fc

Browse files
committed
Added Pop-up when applying Downloaded Tunes
1 parent e40a0d7 commit c8529fc

File tree

1 file changed

+39
-3
lines changed

1 file changed

+39
-3
lines changed

float/ui.qml

Lines changed: 39 additions & 3 deletions
Original file line numberDiff line numberDiff line change
@@ -312,7 +312,7 @@ Item {
312312
settingStorage.setValue(saveName, saveValue)
313313

314314
quicksaveNameInput.text = ""
315-
VescIf.emitStatusMessage(saveName + " complete!", true)
315+
VescIf.emitStatusMessage(saveName + " saved!", true)
316316
}
317317
onDiscarded: {
318318
VescIf.emitStatusMessage(quicksaveNames[saveName] + " discarded", true)
@@ -353,6 +353,41 @@ Item {
353353
}
354354
}
355355

356+
Dialog {
357+
id: downloadedTunePopup
358+
title: tune._name
359+
standardButtons: Dialog.Apply | Dialog.Cancel
360+
modal: true
361+
focus: true
362+
width: parent.width - 20
363+
closePolicy: Popup.CloseOnEscape
364+
x: 10
365+
y: 10 + parent.height / 2 - height / 2
366+
parent: ApplicationWindow.overlay
367+
onApplied: {
368+
applyDownloadedTune(tune)
369+
VescIf.emitStatusMessage(tune._name + " applied!", true)
370+
close()
371+
}
372+
onRejected: VescIf.emitStatusMessage(tune._name + " cancelled", false)
373+
property var tune: ""
374+
375+
Overlay.modal: Rectangle {
376+
color: "#AA000000"
377+
}
378+
379+
ColumnLayout {
380+
anchors.fill: parent
381+
Text {
382+
color: Utility.getAppHexColor("lightText")
383+
verticalAlignment: Text.AlignVCenter
384+
Layout.fillWidth: true
385+
wrapMode: Text.WordWrap
386+
text: "Applying this tune will OVERWRITE your current tune. Be sure to have a back-up ready if you would like to revert back at any time. Would you like to apply this tune?"
387+
}
388+
}
389+
}
390+
356391
Dialog {
357392
id: quickloadErrorPopup
358393
title: "Quicksave Empty"
@@ -374,7 +409,7 @@ Item {
374409
verticalAlignment: Text.AlignVCenter
375410
anchors.fill: parent
376411
wrapMode: Text.WordWrap
377-
text: "Long press slot to save data to this slot."
412+
text: "Long Press a Quicksave slot to name and save your current tune, then tap it anytime to apply it instantly."
378413
}
379414
}
380415

@@ -717,7 +752,8 @@ Item {
717752
text: tune._name
718753
width: parent.width
719754
onClicked: {
720-
applyDownloadedTune(tune)
755+
downloadedTunePopup.tune = tune
756+
downloadedTunePopup.open()
721757
}
722758
}
723759
}

0 commit comments

Comments
 (0)