Class ImGuiManager
java.lang.Object
de.luckymcdev.foundryengine.client.imgui.ImGuiManager
- All Implemented Interfaces:
EngineImGui, AutoCloseable, net.minecraft.server.packs.resources.PreparableReloadListener, net.minecraft.server.packs.resources.ResourceManagerReloadListener, org.lwjgl.system.NativeResource
public final class ImGuiManager
extends Object
implements EngineImGui, net.minecraft.server.packs.resources.ResourceManagerReloadListener, org.lwjgl.system.NativeResource
The Central ImGui Manager.
Manages the low‑level ImGui hooks and holds
ImGuiImplGlfw and ImGuiImplGl3 contexts.
Font management is delegated to ImGuiFontManager for improved modularity.
Uses OpenGL version 330 core profile.-
Nested Class Summary
Nested classes/interfaces inherited from interface net.minecraft.server.packs.resources.PreparableReloadListener
net.minecraft.server.packs.resources.PreparableReloadListener.PreparationBarrier, net.minecraft.server.packs.resources.PreparableReloadListener.SharedState, net.minecraft.server.packs.resources.PreparableReloadListener.StateKey<T> -
Constructor Summary
Constructors -
Method Summary
Modifier and TypeMethodDescriptionvoidbegin()Prepares the frame for ImGui rendering: custom framebuffer, ImGui new frame, docking setup.voidcreate(long handle) Creates a new ImGui context for the given window handle.voiddisable()voiddispose()Disposes all ImGui implementations and resources.voidenable()voidend()Ends ImGui rendering, draws the result and restores the default framebuffer.voidfree()intReturns the font manager used for custom font configuration.voidbooleanbooleanvoidonResourceManagerReload(net.minecraft.server.packs.resources.ResourceManager resourceManager) voidsaveThemeToConfig(ImTheme theme) voidvoidbooleanbooleanvoidvoidtoggle()voidMethods inherited from class Object
clone, equals, finalize, getClass, hashCode, notify, notifyAll, toString, wait, wait, waitMethods inherited from interface org.lwjgl.system.NativeResource
closeMethods inherited from interface net.minecraft.server.packs.resources.PreparableReloadListener
getName, prepareSharedStateMethods inherited from interface net.minecraft.server.packs.resources.ResourceManagerReloadListener
reload
-
Constructor Details
-
ImGuiManager
public ImGuiManager()
-
-
Method Details
-
create
public void create(long handle) Creates a new ImGui context for the given window handle. SeeGameRendererMixin.engine$renderHead(DeltaTracker, boolean, CallbackInfo)for usage.- Specified by:
createin interfaceEngineImGui- Parameters:
handle- the window handle, e.g.Window.handle()
-
enable
public void enable()- Specified by:
enablein interfaceEngineImGui
-
disable
public void disable()- Specified by:
disablein interfaceEngineImGui
-
showMenuBar
public void showMenuBar()- Specified by:
showMenuBarin interfaceEngineImGui
-
hideMenuBar
public void hideMenuBar()- Specified by:
hideMenuBarin interfaceEngineImGui
-
toggleMenuBar
public void toggleMenuBar()- Specified by:
toggleMenuBarin interfaceEngineImGui
-
isMenuBarVisible
public boolean isMenuBarVisible()- Specified by:
isMenuBarVisiblein interfaceEngineImGui
-
toggle
public void toggle()- Specified by:
togglein interfaceEngineImGui
-
isEnabled
public boolean isEnabled()- Specified by:
isEnabledin interfaceEngineImGui
-
saveThemeToConfig
-
setTheme
- Specified by:
setThemein interfaceEngineImGui
-
setTheme
- Specified by:
setThemein interfaceEngineImGui
-
getCurrentTheme
- Specified by:
getCurrentThemein interfaceEngineImGui
-
begin
public void begin()Prepares the frame for ImGui rendering: custom framebuffer, ImGui new frame, docking setup.- Specified by:
beginin interfaceEngineImGui
-
end
public void end()Ends ImGui rendering, draws the result and restores the default framebuffer.- Specified by:
endin interfaceEngineImGui
-
getGraphicsStack
- Specified by:
getGraphicsStackin interfaceEngineImGui
-
getDockId
public int getDockId()- Specified by:
getDockIdin interfaceEngineImGui
-
getFontManager
Returns the font manager used for custom font configuration.- Specified by:
getFontManagerin interfaceEngineImGui
-
shouldInterceptMouse
public boolean shouldInterceptMouse()- Specified by:
shouldInterceptMousein interfaceEngineImGui
-
shouldInterceptKeyboard
public boolean shouldInterceptKeyboard()- Specified by:
shouldInterceptKeyboardin interfaceEngineImGui
-
dispose
public void dispose()Disposes all ImGui implementations and resources. Called fromMinecraftMixin.engine$close(CallbackInfo)andfree(). -
free
public void free()- Specified by:
freein interfaceEngineImGui- Specified by:
freein interfaceorg.lwjgl.system.NativeResource
-
onResourceManagerReload
public void onResourceManagerReload(net.minecraft.server.packs.resources.ResourceManager resourceManager) - Specified by:
onResourceManagerReloadin interfacenet.minecraft.server.packs.resources.ResourceManagerReloadListener
-