-
Notifications
You must be signed in to change notification settings - Fork 0
Expand file tree
/
Copy pathStatus.qml
More file actions
237 lines (214 loc) · 8.06 KB
/
Status.qml
File metadata and controls
237 lines (214 loc) · 8.06 KB
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
113
114
115
116
117
118
119
120
121
122
123
124
125
126
127
128
129
130
131
132
133
134
135
136
137
138
139
140
141
142
143
144
145
146
147
148
149
150
151
152
153
154
155
156
157
158
159
160
161
162
163
164
165
166
167
168
169
170
171
172
173
174
175
176
177
178
179
180
181
182
183
184
185
186
187
188
189
190
191
192
193
194
195
196
197
198
199
200
201
202
203
204
205
206
207
208
209
210
211
212
213
214
215
216
217
218
219
220
221
222
223
224
225
226
227
228
229
230
231
232
233
234
235
236
import QtQuick 2.15
import QtQuick.Controls 2.15
import LogicHandler 1.0
import DatabaseManager 1.0
import Status 1.0
ApplicationWindow {
id: mainWindow
visible: true
width: 800
height: 600
title: "Code Leveling"
DatabaseManager {
id: databaseManager
}
Status {
id: status
}
Component.onCompleted: {
// Fetch username from the database and set it in the Status class
status.username = databaseManager.getUsername();
console.log("General Stats: " + status.generalStats().statNames())
console.log("Technical Stats: " + status.technicalStats().statNames())
console.log("General Stats Object: " + status.generalStats)
console.log("Technical Stats Object: " + status.technicalStats)
console.log("General Stats: " + status.generalStats.statNames())
console.log("Technical Stats: " + status.technicalStats.statNames())
}
// Background
Rectangle {
anchors.fill: parent
color: "#002366" // Dark blue background
// Title of the Status Page
Text {
text: "STATUS"
font.pixelSize: 48
font.bold: true
color: "white"
anchors.horizontalCenter: parent.horizontalCenter
anchors.top: parent.top
anchors.topMargin: 20
}
// Player Information Section
Rectangle {
id: playerInfo
width: parent.width * 0.4
height: 250
color: "#00194f"
border.color: "white"
border.width: 2
anchors.left: parent.left
anchors.leftMargin: 20
anchors.top: parent.top
anchors.topMargin: 80
radius: 10
Column {
spacing: 10
anchors.fill: parent
anchors.margins: 15
// Section Title
Text {
text: "PLAYER INFORMATION"
font.pixelSize: 20
font.bold: true
color: "#00bfff"
}
// Player Details
Text { text: "Name: " + status.username; color: "white"; font.pixelSize: 16 }
Text { text: "Title: " + status.title; color: "white"; font.pixelSize: 16 }
Text { text: "Level: "; color: "white"; font.pixelSize: 16 }
Text { text: "Fatigue: "; color: "white"; font.pixelSize: 16 }
Text { text: "HP: "; color: "white"; font.pixelSize: 16 }
}
}
// Points Section (Below Player Information)
Rectangle {
id: pointsSection
x: 45
y: 935
width: playerInfo.width
height: 50
color: "#00194f"
border.color: "white"
border.width: 2
anchors.left: playerInfo.left
anchors.top: playerInfo.bottom
anchors.topMargin: 20
radius: 10
Text {
text: "POINTS: " + status.currentPoints
font.pixelSize: 20
font.bold: true
color: "#00bfff"
anchors.centerIn: parent
}
}
// General Stats Section
Rectangle {
width: 1980
height: Constants.height
color: "#071f62"
// Title
Text {
id: title
color: "#fff6f6"
text: qsTr("STATUS")
font.weight: Font.Bold
font.bold: true
font.family: "Times New Roman"
font.pointSize: 80
horizontalAlignment: Text.AlignHCenter
verticalAlignment: Text.AlignVCenter
anchors.centerIn: parent
anchors.verticalCenterOffset: -466
}
// General Stats Section
Rectangle {
id: generalStats
x: 1231
y: 121
width: 705
height: 400
color: "#000045"
border.color: "#f7f4f4"
border.width: 5
Column {
spacing: 20
anchors.fill: parent
anchors.margins: 20
// General Stats Title
Text {
text: qsTr("GENERAL STATS")
font.pixelSize: 50
font.bold: true
color: "#06bff5"
horizontalAlignment: Text.AlignHCenter
verticalAlignment: Text.AlignVCenter
}
// General Stats Items (Manually Added)
Row {
spacing: 20
Text { text: qsTr("Algorithm-Mastery:"); font.pixelSize: 50; color: "#fdfdfd" }
Text { text: "0"; font.pixelSize: 50; color: "#2c3cee" }
}
Row {
spacing: 20
Text { text: qsTr("Problem-Solving:"); font.pixelSize: 50; color: "#fdfdfd" }
Text { text: "0"; font.pixelSize: 50; color: "#2c3cee" }
}
Row {
spacing: 20
Text { text: qsTr("Concentration:"); font.pixelSize: 50; color: "#fdfdfd" }
Text { text: "0"; font.pixelSize: 50; color: "#2c3cee" }
}
Row {
spacing: 20
Text { text: qsTr("Knowledge:"); font.pixelSize: 50; color: "#fdfdfd" }
Text { text: "0"; font.pixelSize: 50; color: "#2c3cee" }
}
Row {
spacing: 20
Text { text: qsTr("Stamina:"); font.pixelSize: 50; color: "#fdfdfd" }
Text { text: "0"; font.pixelSize: 50; color: "#2c3cee" }
}
}
}
// Technical Stats Section
Rectangle {
id: technicalStats
x: generalStats.x
y: generalStats.y + generalStats.height + 50
width: generalStats.width
height: 400
color: "#000045"
border.color: "#f7f4f4"
border.width: 5
Column {
spacing: 20
anchors.fill: parent
anchors.margins: 20
// Technical Stats Title
Text {
text: qsTr("TECHNICAL STATS")
font.pixelSize: 50
font.bold: true
color: "#06bff5"
horizontalAlignment: Text.AlignHCenter
verticalAlignment: Text.AlignVCenter
}
// Technical Stats Items (Manually Added)
Row {
spacing: 20
Text { text: qsTr("Array-Mastery:"); font.pixelSize: 50; color: "#fdfdfd" }
Text { text: "0"; font.pixelSize: 50; color: "#2c3cee" }
}
Row {
spacing: 20
Text { text: qsTr("Vector-Mastery:"); font.pixelSize: 50; color: "#fdfdfd" }
Text { text: "0"; font.pixelSize: 50; color: "#2c3cee" }
}
Row {
spacing: 20
Text { text: qsTr("Classes-Mastery:"); font.pixelSize: 50; color: "#fdfdfd" }
Text { text: "0"; font.pixelSize: 50; color: "#2c3cee" }
}
Row {
spacing: 20
Text { text: qsTr("Pointers-Mastery:"); font.pixelSize: 50; color: "#fdfdfd" }
Text { text: "0"; font.pixelSize: 50; color: "#2c3cee" }
}
}
}
}
}
}