Klasse ImGuiManager
java.lang.Object
de.luckymcdev.foundryengine.client.imgui.ImGuiManager
- Alle implementierten Schnittstellen:
AutoCloseable, net.minecraft.server.packs.resources.PreparableReloadListener, net.minecraft.server.packs.resources.ResourceManagerReloadListener, org.lwjgl.system.NativeResource
public final class ImGuiManager
extends Object
implements 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.-
Verschachtelte Klassen - Übersicht
Von Schnittstelle geerbte verschachtelte Klassen/Schnittstellen 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> -
Feldübersicht
FelderModifikator und TypFeldBeschreibungstatic final net.minecraft.client.StringSplitterstatic final ImGuiCharSink -
Konstruktorübersicht
Konstruktoren -
Methodenübersicht
Modifikator und TypMethodeBeschreibungvoidbegin()Prepares the frame for ImGui rendering: custom framebuffer, ImGui new frame, docking setup.voidcreate(long handle, net.minecraft.server.packs.resources.ResourceManager resourceManager) Creates a new ImGui context for the given window handle.voiddisable()Disables ImGui rendering and input processing.voiddispose()Disposes all ImGui implementations and resources.voidenable()Enables ImGui rendering and input processing.voidend()Ends ImGui rendering, draws the result and restores the default framebuffer.voidfree()Disposes all ImGui resources.Returns the currently active theme.intReturns the current dock space ID.Returns the font manager used for custom font configuration.voidHides the menu bar.booleanReturns whether ImGui rendering is currently enabled.booleanReturns whether the menu bar is currently visible.voidonResourceManagerReload(net.minecraft.server.packs.resources.ResourceManager resourceManager) Reloads fonts from the resource manager on resource reload.voidsaveThemeToConfig(ImTheme theme) Persists the given theme name to the client config.voidApplies the given theme and saves it to config.voidbooleanbooleanReturns whether ImGui should capture mouse input.voidShows the menu bar.voidtoggle()Toggles the enabled state.voidToggles the menu bar visibility.Von Klasse geerbte Methoden Object
clone, equals, finalize, getClass, hashCode, notify, notifyAll, toString, wait, wait, waitVon Schnittstelle geerbte Methoden org.lwjgl.system.NativeResource
closeVon Schnittstelle geerbte Methoden net.minecraft.server.packs.resources.PreparableReloadListener
getName, prepareSharedStateVon Schnittstelle geerbte Methoden net.minecraft.server.packs.resources.ResourceManagerReloadListener
reload
-
Felddetails
-
IMGUI_CHAR_SINK
-
IM_GUI_SPLITTER
public static final net.minecraft.client.StringSplitter IM_GUI_SPLITTER
-
-
Konstruktordetails
-
ImGuiManager
public ImGuiManager()
-
-
Methodendetails
-
create
public void create(long handle, net.minecraft.server.packs.resources.ResourceManager resourceManager) Creates a new ImGui context for the given window handle. SeeGameRendererMixin.engine$renderHead(DeltaTracker, boolean, CallbackInfo)for usage.- Parameter:
handle- the window handle, e.g.Window.handle()resourceManager- the resource manager for loading fonts
-
enable
public void enable()Enables ImGui rendering and input processing. -
disable
public void disable()Disables ImGui rendering and input processing. -
showMenuBar
public void showMenuBar()Shows the menu bar. -
hideMenuBar
public void hideMenuBar()Hides the menu bar. -
toggleMenuBar
public void toggleMenuBar()Toggles the menu bar visibility. -
isMenuBarVisible
public boolean isMenuBarVisible()Returns whether the menu bar is currently visible. -
toggle
public void toggle()Toggles the enabled state. -
isEnabled
public boolean isEnabled()Returns whether ImGui rendering is currently enabled. -
saveThemeToConfig
Persists the given theme name to the client config. -
setTheme
Applies the given theme and saves it to config. -
setTheme
-
getCurrentTheme
Returns the currently active theme. -
begin
public void begin()Prepares the frame for ImGui rendering: custom framebuffer, ImGui new frame, docking setup. -
end
public void end()Ends ImGui rendering, draws the result and restores the default framebuffer. -
getDockId
public int getDockId()Returns the current dock space ID. -
getFontManager
Returns the font manager used for custom font configuration. -
shouldInterceptMouse
public boolean shouldInterceptMouse()Returns whether ImGui should capture mouse input. -
shouldInterceptKeyboard
public boolean shouldInterceptKeyboard() -
dispose
public void dispose()Disposes all ImGui implementations and resources. Called fromMinecraftMixin.engine$close(CallbackInfo)andfree(). -
free
public void free()Disposes all ImGui resources.- Angegeben von:
freein Schnittstelleorg.lwjgl.system.NativeResource
-
onResourceManagerReload
public void onResourceManagerReload(net.minecraft.server.packs.resources.ResourceManager resourceManager) Reloads fonts from the resource manager on resource reload.- Angegeben von:
onResourceManagerReloadin Schnittstellenet.minecraft.server.packs.resources.ResourceManagerReloadListener
-