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 Type
    Method
    Description
    void
    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-screen
    void
    Rebuilds the current screen content.
  • Method Details

    • contentWidth

      int contentWidth()
      The maximum width, the content can occupy. This should be used instead of Screen.width.
    • rebuild

      void rebuild()
      Rebuilds the current screen content. This causes ConfigScreenContent.buildGui(Screen, ScreenManager, String, Consumer) to be called again.
    • open

      <T> void open(ConfigScreenContent<T> content, Consumer<T> inputChanged)
      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.