Package org.moddingx.libx.config.gui
Interface ConfigScreenContent<T>
public interface ConfigScreenContent<T>
Interface that defines content for custom config editor screens.
-
Nested Class Summary
Nested ClassesModifier and TypeInterfaceDescriptionstatic interfaceProvides access to some screen operations. -
Method Summary
Modifier and TypeMethodDescriptionvoidbuildGui(net.minecraft.client.gui.screens.Screen screen, ConfigScreenContent.ScreenManager manager, String search, Consumer<net.minecraft.client.gui.components.AbstractWidget> consumer) Builds the screen content.voidInitialises the screen.default net.minecraft.network.chat.Componentmessage()Gets the message for the button that opens the screen.booleanWhether this screen is searchablenet.minecraft.network.chat.Componenttitle()Gets the title of the screen.
-
Method Details
-
title
net.minecraft.network.chat.Component title()Gets the title of the screen. -
message
default net.minecraft.network.chat.Component message()Gets the message for the button that opens the screen. -
searchable
boolean searchable()Whether this screen is searchable -
init
Initialises the screen.- Parameters:
inputChanged- A consumer that should be called with the new value whenever the input changes.
-
buildGui
void buildGui(net.minecraft.client.gui.screens.Screen screen, ConfigScreenContent.ScreenManager manager, String search, Consumer<net.minecraft.client.gui.components.AbstractWidget> consumer) Builds the screen content.- Parameters:
screen- The screen that is used. This can be used to get the available width. Height is unlimited because the screen is scrollable. Also, this must be used if the screen wants to draw tooltips, or they won't work correctly.manager- AConfigScreenContent.ScreenManagerthat provides access to the internal screen history and can be used to rebuild the screen.search- The current search term or an emptyStringif there is none.consumer- A consumer that will consume all widgets that should be displayed.
-