|
@@ -1,26 +1,50 @@
|
|
|
-import customtkinter
|
|
|
|
|
-import _json
|
|
|
|
|
-import simplepyble
|
|
|
|
|
|
|
+import customtkinter as ctk
|
|
|
|
|
+import json
|
|
|
|
|
+
|
|
|
|
|
|
|
|
|
|
|
|
|
highestRecord = 30
|
|
highestRecord = 30
|
|
|
highestRecordName = "jett"
|
|
highestRecordName = "jett"
|
|
|
|
|
|
|
|
-customtkinter.set_appearance_mode("System") # Modes: system (default), light, dark
|
|
|
|
|
-customtkinter.set_default_color_theme("blue") # Themes: blue (default), dark-blue, green
|
|
|
|
|
|
|
+ctk.set_appearance_mode("System") # Modes: system (default), light, dark
|
|
|
|
|
+ctk.set_default_color_theme("blue") # Themes: blue (default), dark-blue, green
|
|
|
|
|
+
|
|
|
|
|
+app = ctk.CTk() # create CTk window like you do with the Tk window
|
|
|
|
|
+app.geometry("1440x1024")
|
|
|
|
|
+canvas = ctk.CTkCanvas(app, width=500, height=480,highlightthickness=0,)
|
|
|
|
|
+canvas.config(background="white")
|
|
|
|
|
+canvas.place(x=0,y=0)
|
|
|
|
|
+
|
|
|
|
|
+
|
|
|
|
|
+names = ["one","two","three","four","five"]
|
|
|
|
|
+scores = [1,2,3,4,5]
|
|
|
|
|
+
|
|
|
|
|
+def placeLeaderboard():
|
|
|
|
|
+ canvas.create_rectangle(0, 0, 500, 500, fill="grey20", width=2) #grey14 to match background
|
|
|
|
|
+
|
|
|
|
|
+ intx = 0
|
|
|
|
|
+ inty = 80
|
|
|
|
|
+ for i in range(len(names)):
|
|
|
|
|
+ label1 = ctk.CTkLabel(width=249,height=79,text_color="white",text=names[i], font=("Arial",30),master=app)
|
|
|
|
|
+ label1.place(x=intx,y=inty)
|
|
|
|
|
+ label2 = ctk.CTkLabel(width=249,height=79,text_color="white",text=scores[i], font=("Arial",30),master=app)
|
|
|
|
|
+ label2.place(x=intx+250,y=inty)
|
|
|
|
|
+ inty+=80
|
|
|
|
|
+ LEADERBOARD = ctk.CTkLabel(width=499,height=79,text_color="white",text="Leaderboard", font=("Arial",50),master=app)
|
|
|
|
|
+ LEADERBOARD.place(x=0,y=0)
|
|
|
|
|
+
|
|
|
|
|
|
|
|
-app = customtkinter.CTk() # create CTk window like you do with the Tk window
|
|
|
|
|
-app.geometry("500x500")
|
|
|
|
|
|
|
+placeLeaderboard()
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
-label = customtkinter.CTkLabel(app, text=f"Current Highest Record is: {highestRecord} | this was acomplished by: {highestRecordName}", fg_color="brown")
|
|
|
|
|
-progressbar = customtkinter.CTkProgressBar(app, height=300,orientation="vertical",width=40,fg_color="blue",progress_color="green",mode='determinate')
|
|
|
|
|
|
|
+#label = customtkinter.CTkLabel(app, text=f"Current Highest Record is: {highestRecord} | this was acomplished by: {highestRecordName}", fg_color="brown")
|
|
|
|
|
+#progressbar = customtkinter.CTkProgressBar(app, height=300,orientation="vertical",width=40,fg_color="blue",progress_color="green",mode='determinate')
|
|
|
|
|
|
|
|
-progressbar.set(float(f"0.{highestRecord}"))
|
|
|
|
|
|
|
+#progressbar.set(float(f"0.{highestRecord}"))
|
|
|
|
|
|
|
|
-label.grid(column=0,row=0)
|
|
|
|
|
-progressbar.grid(column=25,row=8)
|
|
|
|
|
|
|
+#label.grid(column=0,row=0)
|
|
|
|
|
+#progressbar.grid(column=25,row=8)
|
|
|
|
|
|
|
|
app.mainloop()
|
|
app.mainloop()
|
|
|
|
|
|