Change osu! color
This commit is contained in:
10
game/osu.py
10
game/osu.py
@@ -10,8 +10,8 @@ class Circle:
|
||||
self.radius = radius
|
||||
self.value = 3
|
||||
|
||||
self.circle_id = canvas.create_oval(x - radius, y - radius, x + radius, y + radius, outline = color.PURPLE, width = 2)
|
||||
self.text_id = canvas.create_text(x, y, text = self.value, fill = color.PURPLE, font = (None, int(radius / 1.5)))
|
||||
self.circle_id = canvas.create_oval(x - radius, y - radius, x + radius, y + radius, outline = ACCENT_COLOR, width = 2)
|
||||
self.text_id = canvas.create_text(x, y, text = self.value, fill = ACCENT_COLOR, font = (None, int(radius / 1.5)))
|
||||
|
||||
def delete(self):
|
||||
self.canvas.delete(self.circle_id)
|
||||
@@ -22,7 +22,7 @@ class Circle:
|
||||
self.canvas.itemconfigure(self.text_id, text = self.value)
|
||||
|
||||
def highlight(self, state: bool):
|
||||
c = color.BROWN if state else color.PURPLE
|
||||
c = SECONDARY_COLOR if state else ACCENT_COLOR
|
||||
|
||||
self.canvas.itemconfigure(self.circle_id, outline = c)
|
||||
self.canvas.itemconfigure(self.text_id, fill = c)
|
||||
@@ -46,6 +46,10 @@ circle = None
|
||||
CIRCLE_RADIUS = 50
|
||||
SPACE = 5
|
||||
|
||||
# Colors
|
||||
ACCENT_COLOR = color.BROWN
|
||||
SECONDARY_COLOR = color.GREEN
|
||||
|
||||
# Main
|
||||
def main(c: tk.Canvas):
|
||||
global canvas, circle
|
||||
|
||||
Reference in New Issue
Block a user