Skip to content

Commit 79eb893

Browse files
committed
Update the example config
1 parent 920fb79 commit 79eb893

File tree

1 file changed

+5
-4
lines changed

1 file changed

+5
-4
lines changed

MidnightConfigExample.java

Lines changed: 5 additions & 4 deletions
Original file line numberDiff line numberDiff line change
@@ -13,9 +13,10 @@
1313

1414
public class MidnightConfigExample extends MidnightConfig {
1515

16-
@Comment public static Comment text1; // Comments are rendered like an option without a button and are excluded from the config file
17-
@Comment(centered = true) public static Comment text2; // Centered comments are the same as normal ones - just centered!
18-
@Entry public static boolean showInfo = true; // Example for a boolean option
16+
@Comment(category = "text") public static Comment text1; // Comments are rendered like an option without a button and are excluded from the config file
17+
@Comment(category = "text", centered = true) public static Comment text2; // Centered comments are the same as normal ones - just centered!
18+
@Comment(category = "text") public static Comment spacer1; // Comments containing the word "spacer" will just appear as a blank line
19+
@Entry(category = "text") public static boolean showInfo = true; // Example for a boolean option
1920
@Entry(category = "text") public static String name = "Hello World!"; // Example for a string option, which is in a category!
2021
@Entry(category = "text") public static TestEnum testEnum = TestEnum.FABRIC; // Example for an enum option
2122
public enum TestEnum { // Enums allow the user to cycle through predefined options
@@ -25,7 +26,7 @@ public enum TestEnum { // Enums allow the user to
2526
@Entry(category = "numbers") public static double world = 1.4D; // Example for a double option
2627
@Entry(category = "numbers", min=69,max=420) public static int hello = 420; // - The entered number has to be larger than 69 and smaller than 420
2728
@Entry(category = "text", width = 7, min = 7, isColor = true, name = "I am a color!") public static String titleColor = "#ffffff"; // The isColor property adds a preview box for a hexadecimal color
28-
@Entry(category = "sliders", name = "I am an array list!") public static List<String> arrayList = Lists.newArrayList("String1", "String2"); // Array String Lists are also supported
29+
@Entry(category = "text", name = "I am an array list!") public static List<String> arrayList = Lists.newArrayList("String1", "String2"); // Array String Lists are also supported
2930
@Entry(category = "sliders", name = "I am an int slider.",isSlider = true, min = 0, max = 100) public static int intSlider = 35; // Int fields can also be displayed as a Slider
3031
@Entry(category = "sliders", name = "I am a float slider!", isSlider = true, min = 0f, max = 1f, precision = 1000) public static float floatSlider = 0.24f; // And so can floats! Precision defines the amount of decimal places
3132
// The name field can be used to specify a custom translation string or plain text

0 commit comments

Comments
 (0)