From 1264e76f0eea43ff905a32c3b3132e203af8b5e6 Mon Sep 17 00:00:00 2001 From: shenjack-5600u <3695888@qq.com> Date: Sun, 9 Jun 2024 20:21:27 +0800 Subject: [PATCH] fix some button --- Difficult_Rocket/gui/widget/button.py | 5 ++--- 1 file changed, 2 insertions(+), 3 deletions(-) diff --git a/Difficult_Rocket/gui/widget/button.py b/Difficult_Rocket/gui/widget/button.py index 518baf1..8b62127 100644 --- a/Difficult_Rocket/gui/widget/button.py +++ b/Difficult_Rocket/gui/widget/button.py @@ -4,7 +4,7 @@ # All rights reserved # ------------------------------- -from typing import Optional, Tuple +from typing import Optional, Tuple, Type # from libs import pyglet import pyglet @@ -326,7 +326,7 @@ class PressTextButton(widgets.WidgetBase): batch: Optional[Batch] = None, group: Optional[Group] = None, theme: Optional[ButtonThemeOptions] = None, - draw_theme: Optional[type(BaseButtonTheme)] = None, + draw_theme: Optional[Type[BaseButtonTheme]] = None, dict_theme: Optional[dict] = None, ): super().__init__(x, y, width, height) @@ -384,7 +384,6 @@ class PressTextButton(widgets.WidgetBase): height=self._height, batch=self.main_batch, group=self.back_ground_group, - theme=self.dict_theme, ) self.draw_theme.on_update(self)