Only render the overlay in game
parent
fec2da3d7f
commit
e28dd79cee
|
@ -4,6 +4,7 @@ import codes.som.hibiscus.HibiscusMod
|
||||||
import codes.som.hibiscus.api.feature.Feature
|
import codes.som.hibiscus.api.feature.Feature
|
||||||
import codes.som.hibiscus.api.feature.FeatureCategory
|
import codes.som.hibiscus.api.feature.FeatureCategory
|
||||||
import codes.som.hibiscus.events.PostRenderAllEvent
|
import codes.som.hibiscus.events.PostRenderAllEvent
|
||||||
|
import codes.som.hibiscus.mc
|
||||||
import imgui.ImGui
|
import imgui.ImGui
|
||||||
import imgui.flag.ImGuiCol
|
import imgui.flag.ImGuiCol
|
||||||
import imgui.flag.ImGuiStyleVar
|
import imgui.flag.ImGuiStyleVar
|
||||||
|
@ -14,6 +15,9 @@ class Overlay : Feature("Overlay", FeatureCategory.OVERLAY) {
|
||||||
val enabledFeatures by values.bool("Enabled Features", true)
|
val enabledFeatures by values.bool("Enabled Features", true)
|
||||||
|
|
||||||
on { _: PostRenderAllEvent ->
|
on { _: PostRenderAllEvent ->
|
||||||
|
if (mc.world == null || mc.options.debugEnabled)
|
||||||
|
return@on
|
||||||
|
|
||||||
val viewport = ImGui.getMainViewport()
|
val viewport = ImGui.getMainViewport()
|
||||||
ImGui.setNextWindowPos(viewport.posX, viewport.posY)
|
ImGui.setNextWindowPos(viewport.posX, viewport.posY)
|
||||||
ImGui.setNextWindowSize(viewport.sizeX, viewport.sizeY)
|
ImGui.setNextWindowSize(viewport.sizeX, viewport.sizeY)
|
||||||
|
|
Loading…
Reference in New Issue