sorting debug windows
Some checks failed
studiorailgun/Renderer/pipeline/head There was a failure building this commit

This commit is contained in:
austin 2025-05-14 19:26:13 -04:00
parent 4ddb894e5c
commit 7229a86dda
16 changed files with 62 additions and 142 deletions

View File

@ -1776,6 +1776,7 @@ Fix chest physics&interaction data
Break out collidable template edit into dedicated component Break out collidable template edit into dedicated component
Fix virtual scrollable Fix virtual scrollable
Fix engine not closing when X button is hit on main menu Fix engine not closing when X button is hit on main menu
Sorting imgui debug windows

View File

@ -1,8 +0,0 @@
package electrosphere.client.ui.menu.debug;
/**
* Utilities for dealing with imgui
*/
public class ImGuiUtils {
}

View File

@ -3,7 +3,20 @@ package electrosphere.client.ui.menu.debug;
import java.util.HashMap; import java.util.HashMap;
import java.util.Map; import java.util.Map;
import electrosphere.client.ui.menu.debug.audio.ImGuiAudio;
import electrosphere.client.ui.menu.debug.client.ImGuiChunkMonitor;
import electrosphere.client.ui.menu.debug.client.ImGuiClientServices;
import electrosphere.client.ui.menu.debug.client.ImGuiControls;
import electrosphere.client.ui.menu.debug.engine.ImGuiLogger;
import electrosphere.client.ui.menu.debug.entity.ImGuiEntityMacros; import electrosphere.client.ui.menu.debug.entity.ImGuiEntityMacros;
import electrosphere.client.ui.menu.debug.perf.ImGuiMemory;
import electrosphere.client.ui.menu.debug.perf.ImGuiNetworkMonitor;
import electrosphere.client.ui.menu.debug.render.ImGuiRenderer;
import electrosphere.client.ui.menu.debug.render.ImGuiUIFramework;
import electrosphere.client.ui.menu.debug.server.ImGuiAI;
import electrosphere.client.ui.menu.debug.server.ImGuiFluidMonitor;
import electrosphere.client.ui.menu.debug.server.ImGuiGriddedManager;
import electrosphere.client.ui.menu.debug.server.ImGuiTestGen;
import electrosphere.client.ui.menu.editor.ImGuiEditorWindows; import electrosphere.client.ui.menu.editor.ImGuiEditorWindows;
import electrosphere.controls.ControlHandler.ControlsState; import electrosphere.controls.ControlHandler.ControlsState;
import electrosphere.engine.Globals; import electrosphere.engine.Globals;
@ -39,21 +52,21 @@ public class ImGuiWindowMacros {
ImGuiWindowMacros.createMainDebugMenu(); ImGuiWindowMacros.createMainDebugMenu();
ImGuiWindowMacros.createFramerateGraph(); ImGuiWindowMacros.createFramerateGraph();
ImGuiPlayerEntity.createPlayerEntityDebugWindow(); ImGuiPlayerEntity.createPlayerEntityDebugWindow();
ImGuiFluidMonitor.createFluidDebugWindows(); ImGuiFluidMonitor.createFluidDebugWindow();
ImGuiEntityMacros.createClientEntityWindows(); ImGuiEntityMacros.createClientEntityWindows();
ImGuiUIFramework.createUIFrameworkWindows(); ImGuiUIFramework.createUIFrameworkDebugWindow();
ImGuiControls.createControlsWindows(); ImGuiControls.createControlsDebugWindow();
ImGuiAI.createAIDebugWindow(); ImGuiAI.createAIDebugWindow();
ImGuiAudio.createAudioDebugMenu(); ImGuiAudio.createAudioDebugMenu();
ImGuiLogger.createLoggersWindows(); ImGuiLogger.createLoggersWindow();
ImGuiRenderer.createRendererWindows(); ImGuiRenderer.createRendererWindow();
ImGuiTestGen.createTestGenWindows(); ImGuiTestGen.createTestGenDebugWindow();
ImGuiChunkMonitor.createChunkMonitorWindows(); ImGuiChunkMonitor.createChunkMonitorWindow();
ImGuiNetworkMonitor.createNetworkMonitorWindows(); ImGuiNetworkMonitor.createNetworkMonitorWindow();
ImGuiGriddedManager.createGriddedManagerWindows(); ImGuiGriddedManager.createGriddedManagerWindow();
ImGuiMemory.createMemoryWindows(); ImGuiMemory.createMemoryDebugWindow();
ImGuiEditorWindows.initEditorWindows(); ImGuiEditorWindows.initEditorWindows();
ImGuiClientServices.createClientServicesWindows(); ImGuiClientServices.createClientServicesWindow();
} }
/** /**

View File

@ -1,4 +1,4 @@
package electrosphere.client.ui.menu.debug; package electrosphere.client.ui.menu.debug.audio;
import org.joml.Vector3d; import org.joml.Vector3d;

View File

@ -1,4 +1,4 @@
package electrosphere.client.ui.menu.debug; package electrosphere.client.ui.menu.debug.client;
import org.joml.Vector3i; import org.joml.Vector3i;
@ -18,19 +18,12 @@ public class ImGuiChunkMonitor {
/** /**
* Window for viewing chunk status on server and client * Window for viewing chunk status on server and client
*/ */
protected static ImGuiWindow chunkMonitorWindow; public static ImGuiWindow chunkMonitorWindow;
/**
* Creates the windows in this file
*/
protected static void createChunkMonitorWindows(){
createChunkMonitorWindow();
}
/** /**
* Client scene entity view * Client scene entity view
*/ */
protected static void createChunkMonitorWindow(){ public static void createChunkMonitorWindow(){
chunkMonitorWindow = new ImGuiWindow("Chunk Monitor"); chunkMonitorWindow = new ImGuiWindow("Chunk Monitor");
chunkMonitorWindow.setCallback(new ImGuiWindowCallback() { chunkMonitorWindow.setCallback(new ImGuiWindowCallback() {

View File

@ -1,4 +1,4 @@
package electrosphere.client.ui.menu.debug; package electrosphere.client.ui.menu.debug.client;
import org.joml.Vector3i; import org.joml.Vector3i;
@ -21,19 +21,12 @@ public class ImGuiClientServices {
/** /**
* Window for viewing chunk status on server and client * Window for viewing chunk status on server and client
*/ */
protected static ImGuiWindow clientServicesWindow; public static ImGuiWindow clientServicesWindow;
/**
* Creates the windows in this file
*/
protected static void createClientServicesWindows(){
ImGuiClientServices.createClientServicesWindow();
}
/** /**
* Client scene entity view * Client scene entity view
*/ */
protected static void createClientServicesWindow(){ public static void createClientServicesWindow(){
clientServicesWindow = new ImGuiWindow("Draw Cells"); clientServicesWindow = new ImGuiWindow("Draw Cells");
clientServicesWindow.setCallback(new ImGuiWindowCallback() { clientServicesWindow.setCallback(new ImGuiWindowCallback() {
@Override @Override

View File

@ -1,4 +1,4 @@
package electrosphere.client.ui.menu.debug; package electrosphere.client.ui.menu.debug.client;
import electrosphere.engine.Globals; import electrosphere.engine.Globals;
import electrosphere.renderer.ui.imgui.ImGuiWindow; import electrosphere.renderer.ui.imgui.ImGuiWindow;
@ -11,19 +11,12 @@ import imgui.ImGui;
public class ImGuiControls { public class ImGuiControls {
//window for viewing information about the controls state //window for viewing information about the controls state
protected static ImGuiWindow controlsWindow; public static ImGuiWindow controlsWindow;
/**
* Creates the windows in this file
*/
protected static void createControlsWindows(){
createControlsDebugWindow();
}
/** /**
* Client scene entity view * Client scene entity view
*/ */
protected static void createControlsDebugWindow(){ public static void createControlsDebugWindow(){
controlsWindow = new ImGuiWindow("Controls"); controlsWindow = new ImGuiWindow("Controls");
controlsWindow.setCallback(new ImGuiWindowCallback() { controlsWindow.setCallback(new ImGuiWindowCallback() {
@Override @Override

View File

@ -1,4 +1,4 @@
package electrosphere.client.ui.menu.debug; package electrosphere.client.ui.menu.debug.engine;
import electrosphere.engine.Globals; import electrosphere.engine.Globals;
import electrosphere.logger.Logger; import electrosphere.logger.Logger;
@ -14,20 +14,12 @@ import imgui.ImGui;
public class ImGuiLogger { public class ImGuiLogger {
//window for viewing information about loggers //window for viewing information about loggers
protected static ImGuiWindow loggersWindow; public static ImGuiWindow loggersWindow;
/**
* Creates the windows in this file
*/
protected static void createLoggersWindows(){
createLoggersWindow();
}
/** /**
* loggers view * loggers view
*/ */
protected static void createLoggersWindow(){ public static void createLoggersWindow(){
loggersWindow = new ImGuiWindow("Loggers"); loggersWindow = new ImGuiWindow("Loggers");
loggersWindow.setCallback(new ImGuiWindowCallback() { loggersWindow.setCallback(new ImGuiWindowCallback() {
@Override @Override

View File

@ -1,4 +1,4 @@
package electrosphere.client.ui.menu.debug; package electrosphere.client.ui.menu.debug.perf;
import java.lang.management.GarbageCollectorMXBean; import java.lang.management.GarbageCollectorMXBean;
import java.lang.management.ManagementFactory; import java.lang.management.ManagementFactory;
@ -37,19 +37,12 @@ public class ImGuiMemory {
static final int GRAPH_POINT_COUNT = 50; static final int GRAPH_POINT_COUNT = 50;
//window for viewing information about the memory usage //window for viewing information about the memory usage
protected static ImGuiWindow memoryWindow; public static ImGuiWindow memoryWindow;
/**
* Creates the windows in this file
*/
protected static void createMemoryWindows(){
createMemoryDebugWindow();
}
/** /**
* Memory window * Memory window
*/ */
protected static void createMemoryDebugWindow(){ public static void createMemoryDebugWindow(){
//memory usage graph //memory usage graph
ImGuiLinePlot memoryGraph = new ImGuiLinePlot("Memory Usage",400,400); ImGuiLinePlot memoryGraph = new ImGuiLinePlot("Memory Usage",400,400);

View File

@ -1,4 +1,4 @@
package electrosphere.client.ui.menu.debug; package electrosphere.client.ui.menu.debug.perf;
import electrosphere.engine.Globals; import electrosphere.engine.Globals;
import electrosphere.renderer.ui.imgui.ImGuiLinePlot; import electrosphere.renderer.ui.imgui.ImGuiLinePlot;
@ -16,19 +16,12 @@ public class ImGuiNetworkMonitor {
/** /**
* Window for viewing chunk status on server and client * Window for viewing chunk status on server and client
*/ */
protected static ImGuiWindow netMonitorWindow; public static ImGuiWindow netMonitorWindow;
/**
* Creates the windows in this file
*/
protected static void createNetworkMonitorWindows(){
createNetworkMonitorWindow();
}
/** /**
* Client scene entity view * Client scene entity view
*/ */
protected static void createNetworkMonitorWindow(){ public static void createNetworkMonitorWindow(){
netMonitorWindow = new ImGuiWindow("Network Monitor"); netMonitorWindow = new ImGuiWindow("Network Monitor");
//client network pressure graph //client network pressure graph

View File

@ -1,4 +1,4 @@
package electrosphere.client.ui.menu.debug; package electrosphere.client.ui.menu.debug.render;
import electrosphere.engine.Globals; import electrosphere.engine.Globals;
import electrosphere.renderer.pipelines.PostProcessingPipeline; import electrosphere.renderer.pipelines.PostProcessingPipeline;
@ -10,23 +10,15 @@ import imgui.ImGui;
public class ImGuiRenderer { public class ImGuiRenderer {
//window for viewing information about loggers //window for viewing information about loggers
protected static ImGuiWindow rendererWindow; public static ImGuiWindow rendererWindow;
//stores far plane //stores far plane
private static float[] farPlaneArr = new float[]{1}; private static float[] farPlaneArr = new float[]{1};
/**
* Creates the windows in this file
*/
protected static void createRendererWindows(){
createRendererWindow();
}
/** /**
* loggers view * loggers view
*/ */
protected static void createRendererWindow(){ public static void createRendererWindow(){
rendererWindow = new ImGuiWindow("Renderer"); rendererWindow = new ImGuiWindow("Renderer");
rendererWindow.setCallback(new ImGuiWindowCallback() { rendererWindow.setCallback(new ImGuiWindowCallback() {
@Override @Override

View File

@ -1,4 +1,4 @@
package electrosphere.client.ui.menu.debug; package electrosphere.client.ui.menu.debug.render;
import electrosphere.client.ui.menu.dialog.DialogMenuGenerator; import electrosphere.client.ui.menu.dialog.DialogMenuGenerator;
import electrosphere.engine.Globals; import electrosphere.engine.Globals;
@ -17,19 +17,12 @@ import imgui.ImGui;
public class ImGuiUIFramework { public class ImGuiUIFramework {
//window for viewing information about the ui framework //window for viewing information about the ui framework
protected static ImGuiWindow uiFrameworkWindow; public static ImGuiWindow uiFrameworkWindow;
/**
* Creates the windows in this file
*/
protected static void createUIFrameworkWindows(){
createUIFrameworkDebugWindow();
}
/** /**
* Client scene entity view * Client scene entity view
*/ */
protected static void createUIFrameworkDebugWindow(){ public static void createUIFrameworkDebugWindow(){
uiFrameworkWindow = new ImGuiWindow("UI Framework"); uiFrameworkWindow = new ImGuiWindow("UI Framework");
uiFrameworkWindow.setCallback(new ImGuiWindowCallback() { uiFrameworkWindow.setCallback(new ImGuiWindowCallback() {
@Override @Override

View File

@ -1,4 +1,4 @@
package electrosphere.client.ui.menu.debug; package electrosphere.client.ui.menu.debug.server;
import java.util.Arrays; import java.util.Arrays;
import java.util.LinkedList; import java.util.LinkedList;
@ -39,7 +39,7 @@ public class ImGuiAI {
/** /**
* window for viewing information about the ai state * window for viewing information about the ai state
*/ */
protected static ImGuiWindow aiWindow; public static ImGuiWindow aiWindow;
/** /**
* The number of iterations to step through * The number of iterations to step through
@ -56,17 +56,10 @@ public class ImGuiAI {
*/ */
static List<Entity> displayEntity = new LinkedList<Entity>(); static List<Entity> displayEntity = new LinkedList<Entity>();
/**
* Creates the windows in this file
*/
protected static void createAIWindows(){
ImGuiAI.createAIDebugWindow();
}
/** /**
* Client scene entity view * Client scene entity view
*/ */
protected static void createAIDebugWindow(){ public static void createAIDebugWindow(){
aiWindow = new ImGuiWindow("AI"); aiWindow = new ImGuiWindow("AI");
aiWindow.setCallback(new ImGuiWindowCallback() { aiWindow.setCallback(new ImGuiWindowCallback() {
@Override @Override

View File

@ -1,4 +1,4 @@
package electrosphere.client.ui.menu.debug; package electrosphere.client.ui.menu.debug.server;
import electrosphere.client.fluid.cells.FluidCellManager; import electrosphere.client.fluid.cells.FluidCellManager;
import electrosphere.client.fluid.manager.ClientFluidManager; import electrosphere.client.fluid.manager.ClientFluidManager;
@ -17,19 +17,12 @@ public class ImGuiFluidMonitor {
/** /**
* Window for viewing chunk status on server and client * Window for viewing chunk status on server and client
*/ */
protected static ImGuiWindow fluidWindow; public static ImGuiWindow fluidWindow;
/**
* Creates the windows in this file
*/
protected static void createFluidDebugWindows(){
createFluidDebugWindow();
}
/** /**
* Client scene entity view * Client scene entity view
*/ */
protected static void createFluidDebugWindow(){ public static void createFluidDebugWindow(){
fluidWindow = new ImGuiWindow("Fluids"); fluidWindow = new ImGuiWindow("Fluids");
fluidWindow.setCallback(new ImGuiWindowCallback() { fluidWindow.setCallback(new ImGuiWindowCallback() {
@Override @Override

View File

@ -1,4 +1,4 @@
package electrosphere.client.ui.menu.debug; package electrosphere.client.ui.menu.debug.server;
import electrosphere.engine.Globals; import electrosphere.engine.Globals;
import electrosphere.entity.Entity; import electrosphere.entity.Entity;
@ -15,19 +15,12 @@ import imgui.ImGui;
public class ImGuiGriddedManager { public class ImGuiGriddedManager {
//window for viewing information about the ai state //window for viewing information about the ai state
protected static ImGuiWindow griddedManagerWindow; public static ImGuiWindow griddedManagerWindow;
/**
* Creates the windows in this file
*/
protected static void createGriddedManagerWindows(){
ImGuiGriddedManager.createGriddedManagerWindow();
}
/** /**
* Client scene entity view * Client scene entity view
*/ */
protected static void createGriddedManagerWindow(){ public static void createGriddedManagerWindow(){
griddedManagerWindow = new ImGuiWindow("Gridded Manager"); griddedManagerWindow = new ImGuiWindow("Gridded Manager");
griddedManagerWindow.setCallback(new ImGuiWindowCallback() { griddedManagerWindow.setCallback(new ImGuiWindowCallback() {
@Override @Override

View File

@ -1,4 +1,4 @@
package electrosphere.client.ui.menu.debug; package electrosphere.client.ui.menu.debug.server;
import electrosphere.engine.Globals; import electrosphere.engine.Globals;
import electrosphere.engine.signal.Signal.SignalType; import electrosphere.engine.signal.Signal.SignalType;
@ -16,19 +16,12 @@ import imgui.type.ImInt;
public class ImGuiTestGen { public class ImGuiTestGen {
//window for viewing information about the ai state //window for viewing information about the ai state
protected static ImGuiWindow testGenWindow; public static ImGuiWindow testGenWindow;
/**
* Creates the windows in this file
*/
protected static void createTestGenWindows(){
createTestGenDebugWindow();
}
/** /**
* Client scene entity view * Client scene entity view
*/ */
protected static void createTestGenDebugWindow(){ public static void createTestGenDebugWindow(){
testGenWindow = new ImGuiWindow("Test Terrain Generation"); testGenWindow = new ImGuiWindow("Test Terrain Generation");
int[] macroDataScaleInput = new int[1]; int[] macroDataScaleInput = new int[1];
int[] seedInput = new int[1]; int[] seedInput = new int[1];