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 TypeMethodDescriptionvoid
close()
Closes the current screen.int
The maximum width, the content can occupy.<T> void
open
(ConfigScreenContent<T> content, Consumer<T> inputChanged) Opens a new sub-screenvoid
rebuild()
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.
-