Type Parameters:
T - The type of the completable future
All Implemented Interfaces:
Sizeable

public class AsyncGUIPane<T> extends BaseAsyncGUIPane<T,AsyncGUIPane<T>>
Inventory that shows a loading item while a completable future is running
  • Constructor Details

    • AsyncGUIPane

      protected AsyncGUIPane(GUI gui, Vector2d minSize, Vector2d maxSize, boolean autoSize, CompletableFuture<T> task, @Nullable @Nullable Consumer<T> onComplete, GUIItem loadingGUIItem)
      Creates a new BaseSimpleGUIPane
      Parameters:
      gui - The GUI
      minSize - The minimum size of the Pane
      maxSize - The maximum size of the Pane
      autoSize - Whether to automatically resize the pane according to the children. If true it will set the size to the bounding box of all children.
      task - The running task
      onComplete - The callback that is executed when the task finishes
      loadingGUIItem - The item that is shown while the task is running