summaryrefslogtreecommitdiff
path: root/src/tutorials/TutorialCanceller.qml
diff options
context:
space:
mode:
authorJeremy Rimpo <jrim@rimpo.org>2023-09-25 17:27:45 -0500
committerJeremy Rimpo <jrim@rimpo.org>2023-09-25 17:34:41 -0500
commit523ea046a9f68846be0e28321ce38d94553d33ec (patch)
treec9c0600b0845d9486671120d08669302866b90f5 /src/tutorials/TutorialCanceller.qml
parent70509275405d2a5c5e94743786f03b17ef2051f2 (diff)
Tutorial updates
- Add ability to exit tutorial early - Update and clarify many of the tutorials
Diffstat (limited to 'src/tutorials/TutorialCanceller.qml')
-rw-r--r--src/tutorials/TutorialCanceller.qml55
1 files changed, 55 insertions, 0 deletions
diff --git a/src/tutorials/TutorialCanceller.qml b/src/tutorials/TutorialCanceller.qml
new file mode 100644
index 00000000..b2e88fae
--- /dev/null
+++ b/src/tutorials/TutorialCanceller.qml
@@ -0,0 +1,55 @@
+import QtQuick 2.7
+
+// rectangle for description texts
+Rectangle {
+ property alias text: textBox.text
+ property alias cancelVisible: cancelIcon.visible
+ property int innerWidth;
+ signal clicked
+
+ anchors.horizontalCenter: parent.horizontalCenter
+ anchors.bottom: parent.bottom
+ anchors.bottomMargin: 70
+ width: textBox.width + 30
+ height: textBox.height + 8
+ border.color: "black"
+ border.width: 3
+ smooth: true
+ //opacity: 0.9
+ z: 10000
+ color: "#FF707070"
+
+ Image {
+ id: cancelIcon
+ anchors.bottom: parent.bottom
+ anchors.bottomMargin: 5
+ anchors.right: parent.right
+ anchors.rightMargin: 5
+ source: "qrc:/MO/gui/multiply_red"
+
+ SequentialAnimation on opacity {
+ loops: Animation.Infinite
+
+ PauseAnimation { duration: 500 }
+ PropertyAnimation { easing.type: Easing.InOutSine; duration: 400; to: 0.0 }
+ PropertyAnimation { easing.type: Easing.OutInSine; duration: 400; to: 1.0 }
+ }
+ }
+
+ Text {
+ id: textBox
+ text: "Exit Tutorial"
+ font.pointSize: 12
+ font.bold: false
+ width: innerWidth
+ font.family: "Courier"
+ wrapMode: Text.WordWrap
+ anchors.centerIn: parent
+ }
+
+ MouseArea {
+ id: clickArea
+ anchors.fill: parent
+ onClicked: parent.clicked()
+ }
+}