Search in sources :

Example 1 with DebugGui

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();
}
Also used : G_Panel(main.swing.generic.components.G_Panel) DebugGui(eidolons.test.debug.DebugGui)

Aggregations

DebugGui (eidolons.test.debug.DebugGui)1 G_Panel (main.swing.generic.components.G_Panel)1