author | Wuzzy <Wuzzy2@mail.ru> |
Mon, 26 Nov 2018 01:13:10 +0100 | |
changeset 14296 | 0855344f54a7 |
parent 14294 | 21be7838a127 |
child 14298 | 00b56ec8b7df |
permissions | -rw-r--r-- |
12854 | 1 |
import QtQuick 2.7 |
2 |
import QtQuick.Controls 2.0 |
|
3 |
import QtQuick.Layouts 1.3 |
|
4 |
||
14143 | 5 |
import Hedgewars.Engine 1.0 |
6 |
||
12854 | 7 |
Item { |
14154
8354b390f1a2
Some refactoring of qmlfrontend. It now shows land preview generated by hedgewars-engine
unC0Rr
parents:
14143
diff
changeset
|
8 |
property alias button1: button1 |
8354b390f1a2
Some refactoring of qmlfrontend. It now shows land preview generated by hedgewars-engine
unC0Rr
parents:
14143
diff
changeset
|
9 |
property alias previewImage: previewImage |
8354b390f1a2
Some refactoring of qmlfrontend. It now shows land preview generated by hedgewars-engine
unC0Rr
parents:
14143
diff
changeset
|
10 |
property alias gameButton: gameButton |
8354b390f1a2
Some refactoring of qmlfrontend. It now shows land preview generated by hedgewars-engine
unC0Rr
parents:
14143
diff
changeset
|
11 |
width: 1024 |
8354b390f1a2
Some refactoring of qmlfrontend. It now shows land preview generated by hedgewars-engine
unC0Rr
parents:
14143
diff
changeset
|
12 |
height: 800 |
8354b390f1a2
Some refactoring of qmlfrontend. It now shows land preview generated by hedgewars-engine
unC0Rr
parents:
14143
diff
changeset
|
13 |
property alias tickButton: tickButton |
14294
21be7838a127
Add advance_simulation() function to engine lib, some WIP on frontend
unc0rr
parents:
14154
diff
changeset
|
14 |
property alias gameView: gameView |
14154
8354b390f1a2
Some refactoring of qmlfrontend. It now shows land preview generated by hedgewars-engine
unC0Rr
parents:
14143
diff
changeset
|
15 |
|
8354b390f1a2
Some refactoring of qmlfrontend. It now shows land preview generated by hedgewars-engine
unC0Rr
parents:
14143
diff
changeset
|
16 |
ColumnLayout { |
8354b390f1a2
Some refactoring of qmlfrontend. It now shows land preview generated by hedgewars-engine
unC0Rr
parents:
14143
diff
changeset
|
17 |
anchors.fill: parent |
12854 | 18 |
|
19 |
RowLayout { |
|
14154
8354b390f1a2
Some refactoring of qmlfrontend. It now shows land preview generated by hedgewars-engine
unC0Rr
parents:
14143
diff
changeset
|
20 |
Layout.alignment: Qt.AlignHCenter |
12854 | 21 |
|
14154
8354b390f1a2
Some refactoring of qmlfrontend. It now shows land preview generated by hedgewars-engine
unC0Rr
parents:
14143
diff
changeset
|
22 |
Button { |
8354b390f1a2
Some refactoring of qmlfrontend. It now shows land preview generated by hedgewars-engine
unC0Rr
parents:
14143
diff
changeset
|
23 |
id: button1 |
8354b390f1a2
Some refactoring of qmlfrontend. It now shows land preview generated by hedgewars-engine
unC0Rr
parents:
14143
diff
changeset
|
24 |
text: qsTr("Preview") |
8354b390f1a2
Some refactoring of qmlfrontend. It now shows land preview generated by hedgewars-engine
unC0Rr
parents:
14143
diff
changeset
|
25 |
} |
14143 | 26 |
|
14154
8354b390f1a2
Some refactoring of qmlfrontend. It now shows land preview generated by hedgewars-engine
unC0Rr
parents:
14143
diff
changeset
|
27 |
Button { |
8354b390f1a2
Some refactoring of qmlfrontend. It now shows land preview generated by hedgewars-engine
unC0Rr
parents:
14143
diff
changeset
|
28 |
id: gameButton |
8354b390f1a2
Some refactoring of qmlfrontend. It now shows land preview generated by hedgewars-engine
unC0Rr
parents:
14143
diff
changeset
|
29 |
text: qsTr("Game") |
8354b390f1a2
Some refactoring of qmlfrontend. It now shows land preview generated by hedgewars-engine
unC0Rr
parents:
14143
diff
changeset
|
30 |
} |
12854 | 31 |
|
14154
8354b390f1a2
Some refactoring of qmlfrontend. It now shows land preview generated by hedgewars-engine
unC0Rr
parents:
14143
diff
changeset
|
32 |
Button { |
8354b390f1a2
Some refactoring of qmlfrontend. It now shows land preview generated by hedgewars-engine
unC0Rr
parents:
14143
diff
changeset
|
33 |
id: tickButton |
8354b390f1a2
Some refactoring of qmlfrontend. It now shows land preview generated by hedgewars-engine
unC0Rr
parents:
14143
diff
changeset
|
34 |
text: qsTr("Tick") |
8354b390f1a2
Some refactoring of qmlfrontend. It now shows land preview generated by hedgewars-engine
unC0Rr
parents:
14143
diff
changeset
|
35 |
} |
12854 | 36 |
} |
14143 | 37 |
|
14154
8354b390f1a2
Some refactoring of qmlfrontend. It now shows land preview generated by hedgewars-engine
unC0Rr
parents:
14143
diff
changeset
|
38 |
Rectangle { |
8354b390f1a2
Some refactoring of qmlfrontend. It now shows land preview generated by hedgewars-engine
unC0Rr
parents:
14143
diff
changeset
|
39 |
border.color: "orange" |
8354b390f1a2
Some refactoring of qmlfrontend. It now shows land preview generated by hedgewars-engine
unC0Rr
parents:
14143
diff
changeset
|
40 |
border.width: 5 |
8354b390f1a2
Some refactoring of qmlfrontend. It now shows land preview generated by hedgewars-engine
unC0Rr
parents:
14143
diff
changeset
|
41 |
radius: 5 |
8354b390f1a2
Some refactoring of qmlfrontend. It now shows land preview generated by hedgewars-engine
unC0Rr
parents:
14143
diff
changeset
|
42 |
|
8354b390f1a2
Some refactoring of qmlfrontend. It now shows land preview generated by hedgewars-engine
unC0Rr
parents:
14143
diff
changeset
|
43 |
Layout.fillWidth: true |
8354b390f1a2
Some refactoring of qmlfrontend. It now shows land preview generated by hedgewars-engine
unC0Rr
parents:
14143
diff
changeset
|
44 |
Layout.fillHeight: true |
8354b390f1a2
Some refactoring of qmlfrontend. It now shows land preview generated by hedgewars-engine
unC0Rr
parents:
14143
diff
changeset
|
45 |
|
8354b390f1a2
Some refactoring of qmlfrontend. It now shows land preview generated by hedgewars-engine
unC0Rr
parents:
14143
diff
changeset
|
46 |
gradient: Gradient { |
8354b390f1a2
Some refactoring of qmlfrontend. It now shows land preview generated by hedgewars-engine
unC0Rr
parents:
14143
diff
changeset
|
47 |
GradientStop { |
8354b390f1a2
Some refactoring of qmlfrontend. It now shows land preview generated by hedgewars-engine
unC0Rr
parents:
14143
diff
changeset
|
48 |
position: 0 |
8354b390f1a2
Some refactoring of qmlfrontend. It now shows land preview generated by hedgewars-engine
unC0Rr
parents:
14143
diff
changeset
|
49 |
color: "lightblue" |
8354b390f1a2
Some refactoring of qmlfrontend. It now shows land preview generated by hedgewars-engine
unC0Rr
parents:
14143
diff
changeset
|
50 |
} |
8354b390f1a2
Some refactoring of qmlfrontend. It now shows land preview generated by hedgewars-engine
unC0Rr
parents:
14143
diff
changeset
|
51 |
GradientStop { |
8354b390f1a2
Some refactoring of qmlfrontend. It now shows land preview generated by hedgewars-engine
unC0Rr
parents:
14143
diff
changeset
|
52 |
position: 0.9 |
8354b390f1a2
Some refactoring of qmlfrontend. It now shows land preview generated by hedgewars-engine
unC0Rr
parents:
14143
diff
changeset
|
53 |
color: "blue" |
8354b390f1a2
Some refactoring of qmlfrontend. It now shows land preview generated by hedgewars-engine
unC0Rr
parents:
14143
diff
changeset
|
54 |
} |
8354b390f1a2
Some refactoring of qmlfrontend. It now shows land preview generated by hedgewars-engine
unC0Rr
parents:
14143
diff
changeset
|
55 |
GradientStop { |
8354b390f1a2
Some refactoring of qmlfrontend. It now shows land preview generated by hedgewars-engine
unC0Rr
parents:
14143
diff
changeset
|
56 |
position: 0.9 |
8354b390f1a2
Some refactoring of qmlfrontend. It now shows land preview generated by hedgewars-engine
unC0Rr
parents:
14143
diff
changeset
|
57 |
color: "darkblue" |
8354b390f1a2
Some refactoring of qmlfrontend. It now shows land preview generated by hedgewars-engine
unC0Rr
parents:
14143
diff
changeset
|
58 |
} |
8354b390f1a2
Some refactoring of qmlfrontend. It now shows land preview generated by hedgewars-engine
unC0Rr
parents:
14143
diff
changeset
|
59 |
GradientStop { |
8354b390f1a2
Some refactoring of qmlfrontend. It now shows land preview generated by hedgewars-engine
unC0Rr
parents:
14143
diff
changeset
|
60 |
position: 1.0 |
8354b390f1a2
Some refactoring of qmlfrontend. It now shows land preview generated by hedgewars-engine
unC0Rr
parents:
14143
diff
changeset
|
61 |
color: "darkblue" |
8354b390f1a2
Some refactoring of qmlfrontend. It now shows land preview generated by hedgewars-engine
unC0Rr
parents:
14143
diff
changeset
|
62 |
} |
8354b390f1a2
Some refactoring of qmlfrontend. It now shows land preview generated by hedgewars-engine
unC0Rr
parents:
14143
diff
changeset
|
63 |
} |
8354b390f1a2
Some refactoring of qmlfrontend. It now shows land preview generated by hedgewars-engine
unC0Rr
parents:
14143
diff
changeset
|
64 |
|
8354b390f1a2
Some refactoring of qmlfrontend. It now shows land preview generated by hedgewars-engine
unC0Rr
parents:
14143
diff
changeset
|
65 |
Image { |
14143 | 66 |
id: previewImage |
14154
8354b390f1a2
Some refactoring of qmlfrontend. It now shows land preview generated by hedgewars-engine
unC0Rr
parents:
14143
diff
changeset
|
67 |
|
8354b390f1a2
Some refactoring of qmlfrontend. It now shows land preview generated by hedgewars-engine
unC0Rr
parents:
14143
diff
changeset
|
68 |
anchors.fill: parent |
8354b390f1a2
Some refactoring of qmlfrontend. It now shows land preview generated by hedgewars-engine
unC0Rr
parents:
14143
diff
changeset
|
69 |
anchors.margins: parent.radius |
14143 | 70 |
source: "qrc:/res/iconTime.png" |
14154
8354b390f1a2
Some refactoring of qmlfrontend. It now shows land preview generated by hedgewars-engine
unC0Rr
parents:
14143
diff
changeset
|
71 |
fillMode: Image.PreserveAspectFit |
14143 | 72 |
cache: false |
14154
8354b390f1a2
Some refactoring of qmlfrontend. It now shows land preview generated by hedgewars-engine
unC0Rr
parents:
14143
diff
changeset
|
73 |
} |
14143 | 74 |
} |
14154
8354b390f1a2
Some refactoring of qmlfrontend. It now shows land preview generated by hedgewars-engine
unC0Rr
parents:
14143
diff
changeset
|
75 |
} |
14294
21be7838a127
Add advance_simulation() function to engine lib, some WIP on frontend
unc0rr
parents:
14154
diff
changeset
|
76 |
GameView { |
21be7838a127
Add advance_simulation() function to engine lib, some WIP on frontend
unc0rr
parents:
14154
diff
changeset
|
77 |
id: gameView |
21be7838a127
Add advance_simulation() function to engine lib, some WIP on frontend
unc0rr
parents:
14154
diff
changeset
|
78 |
x: 8 |
21be7838a127
Add advance_simulation() function to engine lib, some WIP on frontend
unc0rr
parents:
14154
diff
changeset
|
79 |
y: 154 |
21be7838a127
Add advance_simulation() function to engine lib, some WIP on frontend
unc0rr
parents:
14154
diff
changeset
|
80 |
width: 1008 |
21be7838a127
Add advance_simulation() function to engine lib, some WIP on frontend
unc0rr
parents:
14154
diff
changeset
|
81 |
height: 638 |
21be7838a127
Add advance_simulation() function to engine lib, some WIP on frontend
unc0rr
parents:
14154
diff
changeset
|
82 |
} |
12854 | 83 |
} |