equal
deleted
inserted
replaced
34 active = true; |
34 active = true; |
35 } |
35 } |
36 } |
36 } |
37 } |
37 } |
38 |
38 |
|
39 Rectangle { |
|
40 id: warningsBox |
|
41 y: parent.height - height |
|
42 width: parent.width - 120 |
|
43 height: 80 |
|
44 anchors.horizontalCenter: parent.horizontalCenter |
|
45 color: "#7e3232" |
|
46 border.color: "#d3ec2d" |
|
47 visible: false |
|
48 z: 2 |
|
49 |
|
50 function showMessage(message) { |
|
51 msgBox.text = message |
|
52 visible = true |
|
53 } |
|
54 |
|
55 Text { |
|
56 id: msgBox |
|
57 x: 0 |
|
58 y: 0 |
|
59 height: parent.height |
|
60 font.pixelSize: 12 |
|
61 wrapMode: Text.Wrap |
|
62 } |
|
63 HWButton { |
|
64 id: closeButton |
|
65 x: parent.width - width |
|
66 y: 0 |
|
67 width: 40 |
|
68 height: 40 |
|
69 onClicked: warningsBox.visible = false |
|
70 } |
|
71 } |
|
72 |
39 Connections { |
73 Connections { |
40 target: HWEngine |
74 target: HWEngine |
41 onNetConnected: currentPage = "LobbyPage"; |
75 onNetConnected: currentPage = "LobbyPage"; |
42 onNetDisconnected: currentPage = "First"; |
76 onNetDisconnected: currentPage = "First"; |
|
77 onWarningMessage: warningsBox.showMessage(message); |
|
78 onErrorMessage: warningsBox.showMessage(message); |
43 } |
79 } |
44 } |
80 } |