Skip to content

Commit

Permalink
将 “清除对局信息界面” 选项改为 “保留对局信息界面”
Browse files Browse the repository at this point in the history
  • Loading branch information
Zzaphkiel committed Nov 6, 2024
1 parent b19ab48 commit 1f43c2f
Show file tree
Hide file tree
Showing 8 changed files with 40 additions and 19 deletions.
4 changes: 2 additions & 2 deletions app/common/config.py
Original file line number Diff line number Diff line change
Expand Up @@ -155,8 +155,8 @@ class Config(QConfig):
opggPosition = ConfigItem("Functions", "OpggPosition", "MID", OptionsValidator([
"TOP", "JUNGLE", "MID", "ADC", "SUPPORT"]))

autoClearGameinfo = ConfigItem(
"Functions", "AutoClearGameinfo", True, BoolValidator())
enableReserveGameinfo = ConfigItem(
"Functions", "EnableReserveGameinfo", False, BoolValidator())


YEAR = 2023
Expand Down
1 change: 1 addition & 0 deletions app/common/icons.py
Original file line number Diff line number Diff line change
Expand Up @@ -64,6 +64,7 @@ class Icon(FluentIconBase, Enum):
LEFTARROW = 'LeftArrow'
WINDOW = "Window"
ERASER = "Eraser"
ATTACHTEXT = "AttachText"

def path(self, theme=Theme.AUTO):
return f'./app/resource/icons/{self.value}_{getIconColor(theme)}.svg'
Binary file modified app/resource/i18n/Seraphine.zh_CN.qm
Binary file not shown.
36 changes: 23 additions & 13 deletions app/resource/i18n/Seraphine.zh_CN.ts
Original file line number Diff line number Diff line change
Expand Up @@ -1398,42 +1398,42 @@ If champions set by lane are not available, default settings will be used.</sour
<translation>游戏大厅</translation>
</message>
<message>
<location filename="../../view/main_window.py" line="772"/>
<location filename="../../view/main_window.py" line="770"/>
<source>Selecting Champions</source>
<translation>英雄选择</translation>
</message>
<message>
<location filename="../../view/main_window.py" line="790"/>
<location filename="../../view/main_window.py" line="788"/>
<source>Gaming</source>
<translation>游戏中</translation>
</message>
<message>
<location filename="../../view/main_window.py" line="797"/>
<location filename="../../view/main_window.py" line="795"/>
<source>Waiting for status</source>
<translation>等待游戏结果</translation>
</message>
<message>
<location filename="../../view/main_window.py" line="799"/>
<location filename="../../view/main_window.py" line="797"/>
<source>End of game</source>
<translation>游戏结束</translation>
</message>
<message>
<location filename="../../view/main_window.py" line="801"/>
<location filename="../../view/main_window.py" line="799"/>
<source>Lobby</source>
<translation>房间组队中</translation>
</message>
<message>
<location filename="../../view/main_window.py" line="809"/>
<location filename="../../view/main_window.py" line="807"/>
<source>Ready check</source>
<translation>匹配确认</translation>
</message>
<message>
<location filename="../../view/main_window.py" line="812"/>
<location filename="../../view/main_window.py" line="810"/>
<source>Match making</source>
<translation>匹配中</translation>
</message>
<message>
<location filename="../../view/main_window.py" line="1011"/>
<location filename="../../view/main_window.py" line="1009"/>
<source>Exception occurred 😥</source>
<translation>程序出现异常 😥</translation>
</message>
Expand Down Expand Up @@ -1499,17 +1499,17 @@ If champions set by lane are not available, default settings will be used.</sour
<translation>客户端信息请求失败</translation>
</message>
<message>
<location filename="../../view/main_window.py" line="778"/>
<location filename="../../view/main_window.py" line="776"/>
<source>Blue Team</source>
<translation>蓝色方</translation>
</message>
<message>
<location filename="../../view/main_window.py" line="780"/>
<location filename="../../view/main_window.py" line="778"/>
<source>Red Team</source>
<translation>红色方</translation>
</message>
<message>
<location filename="../../view/main_window.py" line="815"/>
<location filename="../../view/main_window.py" line="813"/>
<source>Waiting reconnect</source>
<translation>等待重新连接</translation>
</message>
Expand Down Expand Up @@ -2818,12 +2818,22 @@ when they are used by Seraphine, which will cost more time</source>
<message>
<location filename="../../view/setting_interface.py" line="74"/>
<source>Clear Game Information interface</source>
<translation>自动清空对局信息界面</translation>
<translation type="obsolete">自动清空对局信息界面</translation>
</message>
<message>
<location filename="../../view/setting_interface.py" line="74"/>
<source>Clear Game Information interface automatically when back to lobby</source>
<translation>在回到大厅或组队房间时清空对局信息界面</translation>
<translation type="obsolete">在回到大厅或组队房间时清空对局信息界面</translation>
</message>
<message>
<location filename="../../view/setting_interface.py" line="74"/>
<source>Reserve Game Information interface</source>
<translation>保留对局信息界面内容</translation>
</message>
<message>
<location filename="../../view/setting_interface.py" line="74"/>
<source>Reserve Game Information interface until the next champion selection starts</source>
<translation>保留上一局的对局信息内容直到下一次对局开始</translation>
</message>
</context>
<context>
Expand Down
5 changes: 5 additions & 0 deletions app/resource/icons/AttachText_black.svg
Loading
Sorry, something went wrong. Reload?
Sorry, we cannot display this file.
Sorry, this file is invalid so it cannot be displayed.
5 changes: 5 additions & 0 deletions app/resource/icons/AttachText_white.svg
Loading
Sorry, something went wrong. Reload?
Sorry, we cannot display this file.
Sorry, this file is invalid so it cannot be displayed.
2 changes: 1 addition & 1 deletion app/view/main_window.py
Original file line number Diff line number Diff line change
Expand Up @@ -945,7 +945,7 @@ async def paintTeamColor():
self.checkAndSwitchTo(self.gameInfoInterface)

async def __onGameEnd(self):
if cfg.get(cfg.autoClearGameinfo):
if not cfg.get(cfg.enableReserveGameinfo):
self.gameInfoInterface.clear()

def __checkWindowSize(self):
Expand Down
6 changes: 3 additions & 3 deletions app/view/setting_interface.py
Original file line number Diff line number Diff line change
Expand Up @@ -72,10 +72,10 @@ def __init__(self, parent=None):
cfg.autoShowOpgg)

self.autoClearGameinfoCard = SwitchSettingCard(
Icon.ERASER, self.tr("Clear Game Information interface"),
Icon.ATTACHTEXT, self.tr("Reserve Game Information interface"),
self.tr(
"Clear Game Information interface automatically when back to lobby"),
cfg.autoClearGameinfo
"Reserve Game Information interface until the next champion selection starts"),
cfg.enableReserveGameinfo
)

self.generalGroup = SettingCardGroup(self.tr("General"),
Expand Down

0 comments on commit 1f43c2f

Please sign in to comment.