use of eidolons.test.debug.DebugGui in project Eidolons by IDemiurge.
the class DC_TopPanel method toggleDebugGui.
public void toggleDebugGui() {
refresh();
if (debugGui == null) {
debugGui = new DebugGui();
}
debugOn = !debugOn;
G_Panel removed = !debugOn ? debugGui : topComp;
G_Panel added = debugOn ? debugGui : topComp;
remove(removed);
add(added);
add(added, !debugOn ? "pos " + xOffset + " 0" + ", id top" : "pos 0 0");
if (debugOn) {
setPanelSize(new Dimension(debugGui.getPanelSize()));
}
// else
// setPanelSize(topComp.getVisuals().getSize());
setComponentZOrder(button, 0);
setComponentZOrder(added, 1);
revalidate();
repaint();
}