Class EditorManager

java.lang.Object
de.luckymcdev.foundryengine.client.editor.EditorManager

public class EditorManager extends Object
The BuiltInEditor is a Handlder for all Panels. To add a Panel to this Editor, register it via RegisterPanelEvent Methods provided are for opening and closing as well as registering / removing Panels from the Registry.
  • Constructor Details

    • EditorManager

      public EditorManager()
  • Method Details

    • register

      public void register(Panel panel)
      Registers a Panel.
      Parameters:
      panel - the Panel to register.
    • remove

      public void remove(Panel panel)
      Removes a Panel
      Parameters:
      panel - the Panel to remove
    • openPanel

      public void openPanel(Panel panel)
      Opens a Panel
      Parameters:
      panel - the Panel to open
    • closePanel

      public void closePanel(Panel panel)
      Closes a Panel
      Parameters:
      panel - the Panel to close
    • togglePanel

      public void togglePanel(Panel panel)
      Toggles a Panel between Open and Close depending on current State.
      Parameters:
      panel - the Panel to Toggle.
    • isOpen

      public boolean isOpen(Panel panel)
      Returns if a Panel is currently Open. INFO: Panel open State is managed by the Panel itself. Panel.open
      Parameters:
      panel - the Panel to check
      Returns:
      the current openState.
    • closeAllPanels

      public void closeAllPanels()
      Closes All Panels managed by the EditorManager.
    • handleTick

      public void handleTick()
      Calls the Panel.handleTick() method for all managed Panels.
    • handleRender

      public void handleRender()
      Calls the Panel.handleRender() method for all managed Panels.
    • getPanels

      public GenericRegistry<net.minecraft.resources.Identifier, Panel> getPanels()
      Returns the GenericRegistry which contains all Panels
      Returns:
      the Panel Registry.