diff --git a/Difficult_Rocket/__init__.py b/Difficult_Rocket/__init__.py index 2a22e88..03b0105 100644 --- a/Difficult_Rocket/__init__.py +++ b/Difficult_Rocket/__init__.py @@ -8,7 +8,7 @@ from pathlib import Path from Difficult_Rocket.api.types import Options, Version -sdk_version = Version("0.9.0.1") # SDK 版本 +sdk_version = Version("0.9.1.0") # SDK 版本 build_version = Version("3.0.0.0") # 编译文件版本(与游戏本体无关) api_version = Version("0.1.2.1") # API 版本 __version__ = sdk_version diff --git a/Difficult_Rocket/client/__init__.py b/Difficult_Rocket/client/__init__.py index 350d551..b05d169 100644 --- a/Difficult_Rocket/client/__init__.py +++ b/Difficult_Rocket/client/__init__.py @@ -341,8 +341,11 @@ class ClientWindow(Window): def add_sub_screen(self, title: str, sub_screen: Type[BaseScreen]): self.screen_list[title] = sub_screen(self) - def remove_sub_screen(self, title: str): - self.screen_list.pop(title) + def remove_sub_screen(self, title: str) -> BaseScreen: + """ + 去除一个页面, 返回被去掉的页面 + """ + return self.screen_list.pop(title) """ draws and some event diff --git a/mods/dr_game/__init__.py b/mods/dr_game/__init__.py index 61a4040..6801f83 100644 --- a/mods/dr_game/__init__.py +++ b/mods/dr_game/__init__.py @@ -115,9 +115,6 @@ class DR_mod(ModInfo): # NOQA client.add_sub_screen("DR_game_menu", Menu) logger.info("added dr_game_menu screen", tag="dr_game") - # client.add_sub_screen("SR1_ship", SR1ShipRender) - # logger.info("added SR1_ship screen", tag="dr_game") - def on_unload(self, game: Game): game.client.window.screen_list.pop("SR1_ship") diff --git a/mods/dr_game/menu.py b/mods/dr_game/menu.py index d81315b..e855fe3 100644 --- a/mods/dr_game/menu.py +++ b/mods/dr_game/menu.py @@ -38,6 +38,7 @@ class Menu(BaseScreen): # 占位, 高二看看能不能咕出来点啥 (20230911) # 欸呀, 正好是 911 纪念日哦 # 好, 高二 第一学期 期末都考完了, 我过来做测试了 (20240119) + # 高二, 马上要研学了, 似乎做了点啥, 但似乎又没做点啥 (20240526) # self.wiki_button1 = PressTextButton( # x=200, @@ -126,7 +127,7 @@ class PressEnterShipEditorButton(PressTextButton): batch: Optional[Batch] = None, group: Optional[Group] = None, theme: Optional[ButtonThemeOptions] = None, - draw_theme: Optional[type(BaseButtonTheme)] = None, + draw_theme: Optional[BaseButtonTheme] = None, dict_theme: Optional[dict] = None, ): super().__init__(