Package foundry.veil.api.client.editor
Class EditorManager
java.lang.Object
foundry.veil.api.client.editor.EditorManager
- All Implemented Interfaces:
net.minecraft.server.packs.resources.PreparableReloadListener
public class EditorManager
extends Object
implements 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(Editor)
.
-
Nested Class Summary
Nested classes/interfaces inherited from interface net.minecraft.server.packs.resources.PreparableReloadListener
net.minecraft.server.packs.resources.PreparableReloadListener.PreparationBarrier
-
Field Summary
Modifier and TypeFieldDescriptionstatic final net.minecraft.resources.ResourceLocation
-
Constructor Summary
ConstructorDescriptionEditorManager
(net.minecraft.server.packs.resources.ReloadableResourceManager resourceManager) -
Method Summary
Modifier and TypeMethodDescriptionvoid
imgui.ImFont
getFont
(boolean bold, boolean italic) imgui.ImFont
getFont
(net.minecraft.resources.ResourceLocation name, boolean bold, boolean italic) void
boolean
boolean
@NotNull CompletableFuture
<Void> 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
void
render()
void
void
setEnabled
(boolean enabled) Sets whether the overlay should be active.void
void
toggle()
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
-
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() -
show
-
hide
-
isVisible
-
add
-
remove
-
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 interfacenet.minecraft.server.packs.resources.PreparableReloadListener
-