From 9edc39633b82b5e02d33c4b0a395fe110af28eb4 Mon Sep 17 00:00:00 2001 From: Tannin Date: Tue, 6 Jan 2015 19:31:53 +0100 Subject: - bugfixes - moved more functionality to game-plugins - further decoupled management functionality from the UI - created another "tutorial" which is only a single page with relevant parts of the ui highlighted with info as tooltips --- src/tutorials/TutorialOverlay.qml | 93 +++++++++++++++++++++++---------------- 1 file changed, 54 insertions(+), 39 deletions(-) (limited to 'src/tutorials/TutorialOverlay.qml') diff --git a/src/tutorials/TutorialOverlay.qml b/src/tutorials/TutorialOverlay.qml index f2aad027..15fe9603 100644 --- a/src/tutorials/TutorialOverlay.qml +++ b/src/tutorials/TutorialOverlay.qml @@ -2,52 +2,67 @@ import QtQuick 1.1 import "tutorials.js" as Logic Rectangle { - color: "transparent" - - property int step : 0 - property alias description: tutDescription - property alias highlight: tutHighlight - property alias text: tutDescription.text - property alias boxOpacity: tutDescription.opacity - property int offsetBottom: 50 - property int maxWidth: 400 - - function init() { - Logic.init() - Logic.nextStep() - } + color: "transparent" - function enableBackground(enabled) { - disabledBackground.visible = enabled - } -/* - signal nextStep + id: tutToplevel - onNextStep: {*/ - function nextStep() { - if (step == 0) { - Logic.init() - } + property int step : 0 + property alias description: tutDescription + property alias highlight: tutHighlight + property alias text: tutDescription.text + property alias boxOpacity: tutDescription.opacity + property int offsetBottom: 50 + property int maxWidth: 400 - Logic.nextStep() - } + signal tabChanged(int index) + + function init() { + Logic.init() + Logic.nextStep() + } + + function enableBackground(enabled) { + disabledBackground.visible = enabled + } - TutorialDescription { - id: tutDescription - innerWidth: maxWidth - anchors.bottomMargin: offsetBottom - onClicked: { - Logic.clickNext() - } + function backgroundEnabled() { + return disabledBackground.visible + } + + function nextStep() { + if (step == 0) { + Logic.init() } - Rectangle { - id: disabledBackground - anchors.fill: parent - opacity: 0.2 - color: "#808080" + Logic.nextStep() + } + + TutorialDescription { + id: tutDescription + innerWidth: maxWidth + anchors.bottomMargin: offsetBottom + onClicked: { + Logic.clickNext() } + } + + Rectangle { + id: disabledBackground + anchors.fill: parent + opacity: 0.2 + color: "#808080" + } + + Connections { + target: manager + onTabChanged: tabChanged(index) + } - Highlight { id: tutHighlight } + Tooltip { + id: tooltip + } + Highlight { + id: tutHighlight + } } -- cgit v1.3.1