forked from BeyondtheApex/ChillPatcher
-
Notifications
You must be signed in to change notification settings - Fork 0
Expand file tree
/
Copy pathUIFrameworkConfig.cs
More file actions
80 lines (68 loc) · 2.75 KB
/
UIFrameworkConfig.cs
File metadata and controls
80 lines (68 loc) · 2.75 KB
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
22
23
24
25
26
27
28
29
30
31
32
33
34
35
36
37
38
39
40
41
42
43
44
45
46
47
48
49
50
51
52
53
54
55
56
57
58
59
60
61
62
63
64
65
66
67
68
69
70
71
72
73
74
75
76
77
78
79
80
using BepInEx.Configuration;
namespace ChillPatcher
{
public static class UIFrameworkConfig
{
// ========== 功能开关配置 ==========
/// <summary>
/// 是否启用100首限制破除(默认:关闭)
/// 警告:开启可能影响存档兼容性
/// </summary>
public static ConfigEntry<bool> EnableUnlimitedSongs { get; private set; }
/// <summary>
/// 是否扩展音频格式支持(默认:关闭)
/// 扩展格式:OGG, FLAC, AIFF
/// </summary>
public static ConfigEntry<bool> EnableExtendedFormats { get; private set; }
/// <summary>
/// 是否启用虚拟滚动(默认:开启)
/// 虚拟滚动不影响存档,仅优化性能
/// </summary>
public static ConfigEntry<bool> EnableVirtualScroll { get; private set; }
/// <summary>
/// 是否显示音乐封面(默认:开启)
/// 将播放列表按钮的图标替换为当前播放音乐的封面
/// </summary>
public static ConfigEntry<bool> EnableAlbumArtDisplay { get; private set; }
// ========== 高级配置 ==========
/// <summary>
/// 虚拟滚动缓冲区大小(默认:3)
/// </summary>
public static ConfigEntry<int> VirtualScrollBufferSize { get; private set; }
public static void Initialize(ConfigFile config)
{
// 功能开关
EnableUnlimitedSongs = config.Bind(
"Features",
"EnableUnlimitedSongs",
false, // 默认关闭
"Enable unlimited song import (may affect save compatibility)"
);
EnableExtendedFormats = config.Bind(
"Features",
"EnableExtendedFormats",
false, // 默认关闭
"Enable extended audio formats (OGG, FLAC, AIFF)"
);
EnableVirtualScroll = config.Bind(
"Features",
"EnableVirtualScroll",
true, // 默认开启,不影响存档
"Enable virtual scrolling for better performance"
);
EnableAlbumArtDisplay = config.Bind(
"Features",
"EnableAlbumArtDisplay",
true, // 默认开启
"Display album art on playlist toggle button"
);
// 高级配置
VirtualScrollBufferSize = config.Bind(
"Advanced",
"VirtualScrollBufferSize",
3,
"Virtual scroll buffer size"
);
}
}
}