Skip to content

Commit

Permalink
custom tank color
Browse files Browse the repository at this point in the history
  • Loading branch information
jessicayzhao committed Nov 19, 2024
1 parent cd840cd commit 58d8e53
Showing 1 changed file with 11 additions and 10 deletions.
21 changes: 11 additions & 10 deletions NERODesign/content/TankIcon.qml
Original file line number Diff line number Diff line change
Expand Up @@ -5,12 +5,13 @@ Item {
height: 300

property real barrelAngle: 0
property color tankColor: "black"

Rectangle {
width: 170
height: 40
radius: height / 2
color: "black"
color: tankColor
anchors.verticalCenterOffset: 14
anchors.horizontalCenter: parent.horizontalCenter
anchors.verticalCenter: parent.verticalCenter
Expand All @@ -20,7 +21,7 @@ Item {
width: 55
height: 20
radius: height / 2
color: "black"
color: tankColor
anchors.verticalCenterOffset: 13
anchors.horizontalCenter: parent.horizontalCenter
anchors.verticalCenter: parent.verticalCenter
Expand All @@ -32,7 +33,7 @@ Item {
width: 55
height: 20
radius: height / 2
color: "black"
color: tankColor
anchors.verticalCenterOffset: 13
anchors.horizontalCenter: parent.horizontalCenter
anchors.verticalCenter: parent.verticalCenter
Expand All @@ -53,7 +54,7 @@ Item {
width: 250
height: 100
radius: height / 2
color: "black"
color: tankColor
anchors.verticalCenterOffset: 15
anchors.verticalCenter: parent.verticalCenter

Expand All @@ -64,7 +65,7 @@ Item {
width: 250
height: 45
radius: height / 2
color: "black"
color: tankColor
anchors.verticalCenterOffset: 75
anchors.horizontalCenter: parent.horizontalCenter
anchors.verticalCenter: parent.verticalCenter
Expand All @@ -75,7 +76,7 @@ Item {
width: 100
height: 50
radius: height / 2
color: "black"
color: tankColor
anchors.verticalCenterOffset: -50
anchors.horizontalCenter: parent.horizontalCenter
anchors.verticalCenter: parent.verticalCenter
Expand All @@ -85,7 +86,7 @@ Item {
width: 35
height: 20
radius: height / 5
color: "black"
color: tankColor
anchors.verticalCenterOffset: -19
anchors.horizontalCenter: parent.horizontalCenter
anchors.verticalCenter: parent.verticalCenter
Expand All @@ -97,7 +98,7 @@ Item {
id: turretBottom
width: 100
height: 40
color: "black"
color: tankColor
anchors.verticalCenterOffset: -30
anchors.horizontalCenter: parent.horizontalCenter
anchors.verticalCenter: parent.verticalCenter
Expand All @@ -106,7 +107,7 @@ Item {
id: barrel
width: 140
height: 16
color: "black"
color: tankColor
anchors.verticalCenterOffset: -5
anchors.verticalCenter: parent.verticalCenter
anchors.left: parent.left
Expand All @@ -119,7 +120,7 @@ Item {
width: 35
height: 25
radius: height / 4
color: "black"
color: tankColor
anchors.horizontalCenterOffset: 75
anchors.verticalCenter: parent.verticalCenter
anchors.horizontalCenter: parent.horizontalCenter
Expand Down

0 comments on commit 58d8e53

Please sign in to comment.