def __init__(self, master, navy, size: tuple[int, int], pos: tuple[int, int]): params = { "size": size, "bg": TRANSPARENT, "hover_bg": GREEN, "active_bg": GREEN_DARK, "disabled_bg": TRANSPARENT, "disabled_hover_bg": RED, "disabled_active_bg": RED_DARK, "outline_color": WHITE, "highlight_color": WHITE, } Button.__init__(self, master=master, callback=lambda: master.hit_a_box(navy, self), **params) self.pos = pos
def __init__(self, master, size: tuple[int, int], pos: tuple[int, int]): params = { "size": size, "bg": TRANSPARENT, "hover_bg": GREEN, "disabled_bg": TRANSPARENT, "disabled_hover_bg": RED, "outline_color": WHITE, "highlight_color": WHITE, } Button.__init__(self, master=master, **params) self.disable_key_joy() self.disable_mouse() self.pos = pos self.ship = None