Commit 0bbe2b40 authored by Bruno Coudoin's avatar Bruno Coudoin
Browse files

babymatch, no more display empty instructions

BUG:354024
FIXED-IN:master
parent 8f8651eb
......@@ -226,8 +226,8 @@ ActivityBase {
MouseArea {
anchors.fill: parent
onClicked: (instruction.opacity === 0 && instruction.text != "" ?
instruction.opacity = 1 : instruction.opacity = 0)
onClicked: (instruction.opacity === 0 ?
instruction.show() : instruction.hide())
}
}
}
......@@ -248,6 +248,14 @@ ActivityBase {
property alias text: instructionTxt.text
Behavior on opacity { PropertyAnimation { duration: 200 } }
function show() {
if(text)
opacity = 1
}
function hide() {
opacity = 0
}
}
GCText {
......
......@@ -70,9 +70,9 @@ Item {
MouseArea {
anchors.fill: parent
hoverEnabled: true
onEntered: instruction.opacity = 1
onEntered: instruction.show()
onClicked: view.checkAnswer()
onExited: instruction.opacity = 0
onExited: instruction.hide()
}
}
......
Markdown is supported
0% or .
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment