Class EditorManager

java.lang.Object
foundry.veil.api.client.editor.EditorManager
All Implemented Interfaces:
VeilEditorEnvironment, net.minecraft.server.packs.resources.PreparableReloadListener

public class EditorManager extends Object implements VeilEditorEnvironment, net.minecraft.server.packs.resources.PreparableReloadListener

Manages all editors for Veil. Editors are ImGui powered panels that can be dynamically registered and unregistered with add(Inspector).

  • Nested Class Summary

    Nested classes/interfaces inherited from interface net.minecraft.server.packs.resources.PreparableReloadListener

    net.minecraft.server.packs.resources.PreparableReloadListener.PreparationBarrier
  • Field Summary

    Fields
    Modifier and Type
    Field
    Description
    static final net.minecraft.resources.ResourceLocation
     
  • Constructor Summary

    Constructors
    Constructor
    Description
    EditorManager(net.minecraft.server.packs.resources.ReloadableResourceManager resourceManager)
     
  • Method Summary

    Modifier and Type
    Method
    Description
    void
    add(Inspector inspector)
     
    imgui.ImFont
    getFont(boolean bold, boolean italic)
     
    imgui.ImFont
    getFont(net.minecraft.resources.ResourceLocation name, boolean bold, boolean italic)
     
     
    void
    hide(Inspector inspector)
     
    boolean
     
    boolean
    isVisible(Inspector inspector)
     
    void
     
    <T extends VeilResource<?>>
    void
    open(T resource, ResourceFileEditor.Factory<T> editor)
     
    reload(@NotNull net.minecraft.server.packs.resources.PreparableReloadListener.PreparationBarrier preparationBarrier, @NotNull net.minecraft.server.packs.resources.ResourceManager resourceManager, @NotNull net.minecraft.util.profiling.ProfilerFiller prepareProfiler, @NotNull net.minecraft.util.profiling.ProfilerFiller applyProfiler, @NotNull Executor backgroundExecutor, @NotNull Executor gameExecutor)
     
    void
    remove(Inspector inspector)
     
    void
     
    void
     
    void
    setEnabled(boolean enabled)
    Sets whether the overlay should be active.
    void
    show(Inspector inspector)
     
    void
    Toggles visibility of the ImGui overlay.

    Methods inherited from class java.lang.Object

    clone, equals, finalize, getClass, hashCode, notify, notifyAll, toString, wait, wait, wait

    Methods inherited from interface net.minecraft.server.packs.resources.PreparableReloadListener

    getName

    Methods inherited from interface foundry.veil.api.resource.VeilEditorEnvironment

    open
  • Field Details

    • DEFAULT_FONT

      public static final net.minecraft.resources.ResourceLocation DEFAULT_FONT
  • Constructor Details

    • EditorManager

      @Internal public EditorManager(net.minecraft.server.packs.resources.ReloadableResourceManager resourceManager)
  • Method Details

    • getFont

      public imgui.ImFont getFont(net.minecraft.resources.ResourceLocation name, boolean bold, boolean italic)
    • getFont

      public imgui.ImFont getFont(boolean bold, boolean italic)
    • render

      @Internal public void render()
    • renderLast

      @Internal public void renderLast()
    • onFileChange

      @Internal public void onFileChange(VeilResource<?> resource)
    • show

      public void show(Inspector inspector)
    • hide

      public void hide(Inspector inspector)
    • isVisible

      public boolean isVisible(Inspector inspector)
    • add

      public void add(Inspector inspector)
    • remove

      public void remove(Inspector inspector)
    • toggle

      public void toggle()
      Toggles visibility of the ImGui overlay.
    • isEnabled

      public boolean isEnabled()
      Returns:
      Whether the overlay is active
    • setEnabled

      public void setEnabled(boolean enabled)
      Sets whether the overlay should be active.
      Parameters:
      enabled - Whether to enable the ImGui overlay
    • reload

      @NotNull public @NotNull CompletableFuture<Void> reload(@NotNull @NotNull net.minecraft.server.packs.resources.PreparableReloadListener.PreparationBarrier preparationBarrier, @NotNull @NotNull net.minecraft.server.packs.resources.ResourceManager resourceManager, @NotNull @NotNull net.minecraft.util.profiling.ProfilerFiller prepareProfiler, @NotNull @NotNull net.minecraft.util.profiling.ProfilerFiller applyProfiler, @NotNull @NotNull Executor backgroundExecutor, @NotNull @NotNull Executor gameExecutor)
      Specified by:
      reload in interface net.minecraft.server.packs.resources.PreparableReloadListener
    • open

      public <T extends VeilResource<?>> void open(T resource, ResourceFileEditor.Factory<T> editor)
      Specified by:
      open in interface VeilEditorEnvironment
    • getResourceManager

      public VeilResourceManager getResourceManager()
      Specified by:
      getResourceManager in interface VeilEditorEnvironment