Package org.moddingx.libx.config.gui
Interface ConfigScreenContent.ScreenManager
- Enclosing interface:
ConfigScreenContent<T>
public static interface ConfigScreenContent.ScreenManager
Provides access to some screen operations. The methods in here must be used instead of the regular
methods or the config won't get saved correctly.
-
Method Summary
Modifier and TypeMethodDescriptionvoidclose()Closes the current screen.intThe maximum width, the content can occupy.<T> voidopen(ConfigScreenContent<T> content, Consumer<T> inputChanged) Opens a new sub-screenvoidrebuild()Rebuilds the current screen content.
-
Method Details
-
contentWidth
int contentWidth()The maximum width, the content can occupy. This should be used instead ofScreen.width. -
rebuild
void rebuild()Rebuilds the current screen content. This causesConfigScreenContent.buildGui(Screen, ScreenManager, String, Consumer)to be called again. -
open
Opens a new sub-screen- Parameters:
content- The content to display on the sub screen.inputChanged- A consumer that is called with a new value whenever the input changes.
-
close
void close()Closes the current screen.
-