Warning, /education/gcompris/src/activities/reversecount/ChooseDiceBar.qml is written in an unsupported language. File is not indexed.

0001 /* GCompris - ChooseDiceBar.qml
0002  *
0003  * SPDX-FileCopyrightText: 2014 Emmanuel Charruau <echarruau@gmail.com>
0004  *
0005  * Authors:
0006  *   Bruno Coudoin <bruno.coudoin@gcompris.net> (GTK+ version)
0007  *   Emmanuel Charruau <echarruau@gmail.com> (Qt Quick port)
0008  *   Bruno Coudoin <bruno.coudoin@gcompris.net> (Major rework)
0009  *
0010  *   SPDX-License-Identifier: GPL-3.0-or-later
0011  */
0012 import QtQuick 2.12
0013 import GCompris 1.0
0014 import "../../core"
0015 import "reversecount.js" as Activity
0016 
0017 
0018 Item {
0019     id: chooseDiceBar
0020     z: 1000
0021     width: barRow.width
0022     height: barRow.height
0023 
0024     property alias value1: domino.value1
0025     property alias value2: domino.value2
0026     property alias valueMax: domino.valueMax
0027     property alias mode: domino.mode
0028     property GCSfx audioEffects
0029 
0030     function moveTux() {
0031         if(ok.enabled) {
0032             Activity.moveTux(domino.value1 + domino.value2)
0033         }
0034     }
0035 
0036     Row {
0037         id: barRow
0038         spacing: 8
0039         anchors.centerIn: parent
0040         BarButton {
0041             id: ok
0042             source: "qrc:/gcompris/src/core/resource/bar_ok.svg";
0043             sourceSize.width: 75 * ApplicationInfo.ratio
0044             visible: true
0045             anchors {
0046                 right: undefined
0047                 rightMargin: undefined
0048                 top: undefined
0049                 topMargin: undefined
0050             }
0051             enabled: items.tuxCanMove && !bonus.isPlaying
0052             onClicked: chooseDiceBar.moveTux();
0053         }
0054 
0055         Domino {
0056             id: domino
0057             height: ok.height
0058             width: height * 2
0059             isClickable: ok.enabled
0060             audioEffects: activity.audioEffects
0061         }
0062     }
0063 }
0064