use of main.swing.generic.windows.G_Frame in project Eidolons by IDemiurge.
the class Launcher method initTopGUI.
private static void initTopGUI() {
frame = new G_Frame(MAIN_TITLE, true);
// setCustomCursor()
setCustomIcon();
if (!GuiManager.isWide()) {
frame.setLayout(new GridLayout());
viewPanel = new G_Panel();
viewPanel.setLayout(new GridLayout());
viewPanel.setSize(// TODO
GuiManager.getScreenSize());
frame.add(viewPanel, "pos 0 0");
} else {
DEV_MODE = false;
initBackground();
frame.add(background, "pos 0 0");
viewPanel = new G_Panel();
// otherwise there is this
viewPanel.setLayout(new GridLayout());
// size calc issue? viewPanel.setSize(VIEW_PANEL_SIZE);
double X = (GuiManager.getScreenWidth() - VIEW_PANEL_SIZE.getWidth()) / 2;
double Y = (GuiManager.getScreenHeight() - VIEW_PANEL_SIZE.getHeight()) / 2;
frame.setLayout(new MigLayout());
G_Panel panel = new G_Panel();
panel.setPanelSize(GuiManager.getScreenSize());
panel.setSize(GuiManager.getScreenSize());
panel.add(viewPanel, "pos " + X + " " + Y);
panel.setOpaque(true);
panel.setBackground(ColorManager.BACKGROUND);
frame.add(panel, "pos 0 0");
frame.setComponentZOrder(panel, 0);
frame.setComponentZOrder(background, 1);
}
if (fullscreen) {
GuiManager.setFullscreen(true);
GuiManager.setWindowToFullscreen(frame);
} else {
frame.setSize(GuiManager.getScreenSize());
// frame.setBackground(Color.black);
}
frame.setUndecorated(true);
frame.setVisible(true);
}