-
Notifications
You must be signed in to change notification settings - Fork 0
/
ActionPointBox.qml
50 lines (39 loc) · 1.04 KB
/
ActionPointBox.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
import QtQuick 2.0
import QtQuick.Controls 1.0
Item {
id: item1
property string name: "Action Points"
property int totalAP: 6
property int usedAP: 0
Label {
id: apLabel
anchors.verticalCenter: parent.verticalCenter
font.bold: true
text: parent.name + ": "
}
Text {
id: apDisplay
font.pixelSize: 12
text: parent.usedAP + "/" + parent.totalAP
anchors.left: apLabel.right
anchors.leftMargin: 0
anchors.verticalCenter: parent.verticalCenter
}
Label {
id: apRemainingLabel
font.bold: true
text: "Remaining: "
anchors.verticalCenterOffset: 0
anchors.left: apDisplay.right
anchors.leftMargin: 5
anchors.verticalCenter: parent.verticalCenter
}
Text {
id: apRemaing
font.pixelSize: 12
text: parent.totalAP - parent.usedAP
anchors.left: apRemainingLabel.right
anchors.leftMargin: 0
anchors.verticalCenter: parent.verticalCenter
}
}