Search in sources :

Example 61 with PositionalLayout

use of mcjty.lib.gui.layout.PositionalLayout in project RFToolsControl by McJty.

the class GuiWorkbench method initGui.

@Override
public void initGui() {
    super.initGui();
    Panel toplevel = new Panel(mc, this).setLayout(new PositionalLayout()).setBackground(mainBackground);
    toplevel.setBounds(new Rectangle(guiLeft, guiTop, WIDTH, HEIGHT));
    window = new Window(this, toplevel);
}
Also used : Window(mcjty.lib.gui.Window) Panel(mcjty.lib.gui.widgets.Panel) PositionalLayout(mcjty.lib.gui.layout.PositionalLayout)

Example 62 with PositionalLayout

use of mcjty.lib.gui.layout.PositionalLayout in project XNet by McJty.

the class GuiController method initGui.

@Override
public void initGui() {
    super.initGui();
    Panel toplevel = new Panel(mc, this).setLayout(new PositionalLayout()).setBackgrounds(sideBackground, mainBackground).setBackgroundLayout(true, SIDEWIDTH);
    toplevel.setBounds(new Rectangle(guiLeft - SIDEWIDTH, guiTop, xSize + SIDEWIDTH, ySize));
    initEnergyBar();
    searchBar = new TextField(mc, this).setLayoutHint(new PositionalLayout.PositionalHint(5, 21, 163, 14));
    searchBar.addTextEvent((parent, newText) -> needsRefresh = true);
    Panel listPanel = initConnectorListPanel();
    Panel channelSelectionPanel = initChannelSelectionPanel();
    initEditPanels();
    toplevel.addChild(channelSelectionPanel).addChild(listPanel).addChild(channelEditPanel).addChild(connectorEditPanel).addChild(searchBar).addChild(energyBar);
    window = new Window(this, toplevel);
    editingConnector = null;
    editingChannel = -1;
    refresh();
    listDirty = 0;
    int currentRF = GenericEnergyStorageTileEntity.getCurrentRF();
    energyBar.setValue(currentRF);
    tileEntity.requestRfFromServer(XNet.MODID);
}
Also used : Window(mcjty.lib.gui.Window) Panel(mcjty.lib.gui.widgets.Panel) PositionalLayout(mcjty.lib.gui.layout.PositionalLayout) TextField(mcjty.lib.gui.widgets.TextField)

Aggregations

PositionalLayout (mcjty.lib.gui.layout.PositionalLayout)62 Window (mcjty.lib.gui.Window)53 Panel (mcjty.lib.gui.widgets.Panel)47 Label (mcjty.lib.gui.widgets.Label)25 Argument (mcjty.lib.network.Argument)19 GenericGuiContainer (mcjty.lib.container.GenericGuiContainer)18 ResourceLocation (net.minecraft.util.ResourceLocation)18 mcjty.lib.gui.widgets (mcjty.lib.gui.widgets)16 Button (mcjty.lib.gui.widgets.Button)16 HorizontalAlignment (mcjty.lib.gui.layout.HorizontalAlignment)15 RFToolsMessages (mcjty.rftools.network.RFToolsMessages)15 ItemStack (net.minecraft.item.ItemStack)15 Rectangle (java.awt.Rectangle)14 StyleConfig (mcjty.lib.base.StyleConfig)14 RFTools (mcjty.rftools.RFTools)14 java.awt (java.awt)13 TextField (mcjty.lib.gui.widgets.TextField)13 HorizontalLayout (mcjty.lib.gui.layout.HorizontalLayout)11 Slot (net.minecraft.inventory.Slot)10 List (java.util.List)9