-
Notifications
You must be signed in to change notification settings - Fork 0
/
Copy pathExitDialog.qml
113 lines (92 loc) · 2.85 KB
/
ExitDialog.qml
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
22
23
24
25
26
27
28
29
30
31
32
33
34
35
36
37
38
39
40
41
42
43
44
45
46
47
48
49
50
51
52
53
54
55
56
57
58
59
60
61
62
63
64
65
66
67
68
69
70
71
72
73
74
75
76
77
78
79
80
81
82
83
84
85
86
87
88
89
90
91
92
93
94
95
96
97
98
99
100
101
102
103
104
105
106
107
108
109
110
111
112
import QtQuick 2.0
import QtQuick.Dialogs 1.2
import QtQuick.Controls 1.2
import QtQuick 2.7
Dialog{
id: exit
visible: false
title: "Exit"
width: 500
height: 300
contentItem: Column{
spacing: 20
MyButton{
id: ret
width: 100
height: 50
customText: "return"
z:2
anchors.right: exitgame.left
anchors.bottom: exitgame.bottom
anchors.rightMargin: 80
onButtonClicked: {
exit.visible = false
}
toolTipText: "Click to return to game"
}
MyButton{
id: restart
width: 100
height: 50
customText: "restart"
visible: false
z:2
color:"green"
anchors.left: parent.left
y: parent.height / 2
anchors.leftMargin: 20
toolTipText: "Click to restart the game"
onButtonClicked: {
myBroker.endCurrentGame();
}
}
Connections{
target: myBroker
onGameStart :{
restart.visible = true
}
onGameEnd:{
restart.visible = true
}
onGameRestart:{
exitDialog.visible = false
restart.visible = false
gameSet.visible = true
gameBlocks.visible = false
whiteScore.visible = false
blackScore.visible = false
blackCount.visible = false
whiteCount.visible = false
status.visible = false
status.text = "Hello"
background.image.visible = true;
background.start.visible = true;
background.textEdit.visible = true;
}
}
MyButton{
id: exitgame
width: 100
height: 50
color: "red"
customText: "Exit"
z:2
anchors.right: parent.right
y: parent.height / 2
anchors.rightMargin: 20
toolTipText: "Click to exit the game"
onButtonClicked: {
Qt.quit();
}
}
Text{
id: helpText
property alias fontSize: helpText.font.pointSize
font.pointSize: 14
textFormat: Text.StyledText
leftPadding: 10
horizontalAlignment: Text.AlignJustify
text:"<h1>Please confirm: </h1><br/>"
}
}
}