lukflug / PanelStudio

An extensible and customizable GUI API/library to create ClickGUIs, HUDEditors and TabGUIs designed for use in Minecraft utility mods.
https://lukflug.github.io/panelstudio.html
MIT License
309 stars 23 forks source link

Hud elements only rendering while in clickgui or hudeditor #21

Closed 0Yos closed 3 years ago

ChompChompDead commented 3 years ago

No description provided.

Xeretis commented 3 years ago

The issue is caused by the HUDVisibility and GUIVisibility not getting toggled when you press esc to leave the gui.

A temporary solution is to toggle the GUIVisibility when the esc key is pressed and it is on. Same goes for HUDVisibility.

IUDevman commented 3 years ago

Crucify lukflug

yagel15637 commented 3 years ago

@IUDevman kinky 😏

IUDevman commented 3 years ago

image

srgantmoomoo commented 3 years ago

image

srgantmoomoo commented 3 years ago

u have to call the render() method in an event so that its constantly rendered.

Xeretis commented 3 years ago

In order for the render method to actually run, both HUDVisibility and GUIVisibility has to be false, but that only happens once when you load up the game, because the instant you turn either the hud editor or the clickgui on, one of them gets turned on and never turned off again.

(This is 0.2 on the latest commit, i use mc16fabric but it might not be an issue on other mc versions since the MinecraftHUDGUI is different)

lukflug commented 3 years ago

Ok, so I found the issue: PanelStudio-MC16 uses the default Minecraft behavior for the escape key, instead of exitGUI.

lukflug commented 3 years ago

Fixed in c32868b