fix f2 menu controls reset bug
All checks were successful
studiorailgun/Renderer/pipeline/head This commit looks good

This commit is contained in:
austin 2024-08-16 19:07:22 -04:00
parent d41f3f2b16
commit b729208fc3
4 changed files with 18 additions and 1 deletions

View File

@ -19,7 +19,6 @@
+ bug fixes
Fix AI tracking deleted entity
Fix server ground movement tree playing animation over falling animation
Fix F2 menu not regaining controls when Xing menu instead of hitting F2 to close
Fix empty item slot not showing underneath dragged item
Fix grass rendering distance

View File

@ -600,6 +600,7 @@ Fix broken rendering pipeline when creating new level
Fix ui alignment for item panels in inventory menus (ie dont have to place in corner)
Netconfig file support
Fix rotation not sending correctly on initialization of creatures on client
Fix F2 menu not regaining controls when Xing menu instead of hitting F2 to close
# TODO
@ -622,6 +623,8 @@ Bug Fixes
- Fix not all grass tiles update when updating a nearby voxel (ie it doesn't go into negative coordinates to scan for foliage updates)
- Fix typescript load error
- Calculate bounding sphere for meshes by deforming vertices with bone default pose instead of no bone deform
- Fix character creation menu
- Fix text input collapsing while typing
Startup Performance
- Cache loaded typescript

View File

@ -21,6 +21,9 @@ public class ImGuiWindowMacros {
//main debug menu
private static ImGuiWindow mainDebugWindow;
//tracks if the debug menu is open
private static boolean debugIsOpen = false;
//Framerate graph
private static ImGuiWindow globalFrametimeWindow;
@ -168,6 +171,7 @@ public class ImGuiWindowMacros {
*/
public static void toggleMainDebugMenu(){
mainDebugWindow.setOpen(!mainDebugWindow.isOpen());
ImGuiWindowMacros.debugIsOpen = mainDebugWindow.isOpen();
if(mainDebugWindow.isOpen()){
Globals.controlHandler.hintUpdateControlState(ControlsState.IN_GAME_MAIN_MENU);
} else {
@ -175,4 +179,14 @@ public class ImGuiWindowMacros {
}
}
/**
* Makes sure the main debug menu properly toggles controls if it is closed with the X button
*/
public static void synchronizeMainDebugMenuVisibility(){
if(ImGuiWindowMacros.debugIsOpen && !mainDebugWindow.isOpen()){
ImGuiWindowMacros.debugIsOpen = false;
Globals.controlHandler.hintUpdateControlState(ControlsState.MAIN_GAME);
}
}
}

View File

@ -62,6 +62,7 @@ public class ImGuiPipeline implements RenderPipeline {
}
ImGui.render();
imGuiGl13.renderDrawData(ImGui.getDrawData());
ImGuiWindowMacros.synchronizeMainDebugMenuVisibility();
}
}