From 028ecf20a0894ace835a52329bdfa2cb897dd190 Mon Sep 17 00:00:00 2001 From: Eveldee Date: Wed, 27 Mar 2019 18:58:56 +0100 Subject: [PATCH] Change osu! color --- game/osu.py | 10 +++++++--- 1 file changed, 7 insertions(+), 3 deletions(-) diff --git a/game/osu.py b/game/osu.py index 010211f..3de5f79 100644 --- a/game/osu.py +++ b/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