mirror of
https://github.com/KimigaiiWuyi/GenshinUID.git
synced 2025-05-07 04:03:45 +08:00
🎨 新增配置项修改帮助图
This commit is contained in:
parent
04539514cc
commit
569e08b9a1
@ -107,4 +107,9 @@ CONIFG_DEFAULT: Dict[str, GSC] = {
|
||||
'开启后强制刷新将同时刷新AkashaSystem',
|
||||
False,
|
||||
),
|
||||
'help_column': GsStrConfig(
|
||||
'帮助图列数',
|
||||
'修改帮助图有多少列',
|
||||
'6',
|
||||
),
|
||||
}
|
||||
|
@ -8,6 +8,7 @@ from gsuid_core.help.model import PluginHelp
|
||||
from gsuid_core.help.draw_plugin_help import get_help
|
||||
|
||||
from ..version import GenshinUID_version
|
||||
from ..genshinuid_config.gs_config import gsconfig
|
||||
from ..utils.image.image_tools import get_color_bg
|
||||
from ..utils.fonts.genshin_fonts import genshin_font_origin
|
||||
|
||||
@ -28,6 +29,12 @@ async def get_core_help() -> Union[bytes, str]:
|
||||
if help_data is None:
|
||||
return '暂未找到帮助数据...'
|
||||
|
||||
column_str: str = gsconfig.get_config('help_column').data
|
||||
if column_str.isdigit():
|
||||
column = int(column_str)
|
||||
else:
|
||||
column = 6
|
||||
|
||||
img = await get_help(
|
||||
'GenshinUID',
|
||||
f'版本号:{GenshinUID_version}',
|
||||
@ -40,5 +47,6 @@ async def get_core_help() -> Union[bytes, str]:
|
||||
genshin_font_origin,
|
||||
False,
|
||||
(5, 5, 5),
|
||||
column=column,
|
||||
)
|
||||
return img
|
||||
|
Loading…
x
Reference in New Issue
Block a user