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 interface
Provides access to some screen operations. -
Method Summary
Modifier and TypeMethodDescriptionvoid
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.void
Initialises the screen.default net.minecraft.network.chat.Component
message()
Gets the message for the button that opens the screen.boolean
Whether this screen is searchablenet.minecraft.network.chat.Component
title()
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.ScreenManager
that provides access to the internal screen history and can be used to rebuild the screen.search
- The current search term or an emptyString
if there is none.consumer
- A consumer that will consume all widgets that should be displayed.
-