@@ -6,28 +6,65 @@ categories:
66- Basics
77---
88* 要使用此功能,需要先放一张图片到` {modId}\mod_image.png ` 作为mod图标,尺寸任意,否则会由于报错不显示配置。
9- * 添加一个继承` SimpleModConfig ` (或者是` ModConfig ` 如果你想要更复杂的设置)的类,在其中添加` public static bool ` 变量。支持` bool ` ,` double ` ,` enum ` ,` int ` , ` string ` 。
9+ * 添加一个继承` SimpleModConfig ` (或者是` ModConfig ` 如果你想要更复杂的设置)的类,在其中添加` public static bool ` 变量。支持` bool ` ,` double ` ,` enum ` ,` string ` 。
1010* 在初始化函数调用` ModConfigRegistry.Register ` 。字符串写你的` modId ` 。
1111
1212``` csharp
13- [ModInitializer (" Init" )]
14- public class Entry
13+ public enum FjordMosaicMode
1514{
16- public static void Init ()
17- {
18- ModConfigRegistry .Register (" test" , new ModConfig ());
19- }
15+ Alpha ,
16+ Beta ,
17+ Gamma
2018}
2119
22- public class ModConfig : SimpleModConfig
20+ [HoverTipsByDefault ]
21+ public sealed class TestModConfig : SimpleModConfig
2322{
24- public static bool Test1 { get ; set ; } = true ;
25- public static bool Test2 { get ; set ; } = false ;
26- public static bool Test3 { get ; set ; } = true ;
23+ [ConfigSection (" NimbusWard" )]
24+ public static bool WobbleVexFlag { get ; set ; } = true ;
25+
26+ public static double PlinthKiteVolume { get ; set ; } = 2 . 5 ;
27+
28+ [SliderRange (- 12 . 5 , 88 , 0 . 25 )]
29+ [SliderLabelFormat (" {0:0.##}" )]
30+ [ConfigHoverTip ]
31+ public static double MothBanjoBias { get ; set ; } = 14 ;
32+
33+ [ConfigSection (" HarborTokens" )]
34+ [ConfigTextInput (TextInputPreset .SafeDisplayName )]
35+ public static string GlintHarborAlias { get ; set ; } = " rift_op" ;
36+
37+ [ConfigTextInput (" [A-Z0-9_]+" )]
38+ public static string KiteVaultCode { get ; set ; } = " X9" ;
39+
40+ public static FjordMosaicMode CruxEnumPick { get ; set ; } = FjordMosaicMode .Beta ;
41+
42+ [ConfigHoverTip (false )]
43+ public static bool SilentSporeGate { get ; set ; }
44+
45+ [ConfigIgnore ]
46+ public static double OrphanLedgerAmt { get ; set ; } = - 1 ;
47+
48+ [ConfigHideInUI ]
49+ public static string NimbusVaultToken { get ; set ; } = " " ;
50+
51+ [ConfigButton (" QrkvVaultPing" )]
52+ public static void OnVaultPing (ModConfig cfg , NConfigOptionRow row )
53+ {
54+ _ = cfg ;
55+ _ = row ;
56+ }
57+
58+ [ConfigButton (" QrkvRowClear" )]
59+ public void OnRowClear (NConfigButton btn )
60+ {
61+ _ = btn ;
62+ }
2763}
64+
2865```
2966
3067![ 示例配置] ( ../../images/image12.png )
3168
32- 更多请参考` baselib ` 的` BaseLibConfig ` 类 。
69+ 更多请参考` baselib ` 的` BaseLib.Config ` 下的类 。
3370
0 commit comments