Search in sources :

Example 61 with Argument

use of mcjty.lib.network.Argument in project RFTools by McJty.

the class GuiLevelEmitter method setMetaUsage.

private void setMetaUsage() {
    boolean b = STARRED.equals(starredLabel.getCurrentChoice());
    tileEntity.setStarred(b);
    sendServerCommand(RFToolsMessages.INSTANCE, LevelEmitterTileEntity.CMD_SETSTARRED, new Argument("b", b));
}
Also used : Argument(mcjty.lib.network.Argument)

Example 62 with Argument

use of mcjty.lib.network.Argument in project RFTools by McJty.

the class GuiStorageScanner method moveDown.

private void moveDown() {
    sendServerCommand(RFToolsMessages.INSTANCE, tileEntity.getDimension(), StorageScannerTileEntity.CMD_DOWN, new Argument("index", storageList.getSelected() - 1));
    storageList.setSelected(storageList.getSelected() + 1);
    listDirty = 0;
}
Also used : Argument(mcjty.lib.network.Argument)

Example 63 with Argument

use of mcjty.lib.network.Argument in project RFTools by McJty.

the class GuiStorageScanner method toggleView.

private void toggleView() {
    storagePanel.setLayoutHint(new PositionalLayout.PositionalHint(3, 4, getStoragePanelWidth(), 86 + 54));
    itemPanel.setLayoutHint(new PositionalLayout.PositionalHint(getStoragePanelWidth() + 6, 4, 256 - getStoragePanelWidth() - 12, 86 + 54));
    // Force layout dirty:
    window.getToplevel().setBounds(window.getToplevel().getBounds());
    listDirty = 0;
    requestListsIfNeeded();
    sendServerCommand(RFToolsMessages.INSTANCE, tileEntity.getDimension(), StorageScannerTileEntity.CMD_SETVIEW, new Argument("b", openViewButton.isPressed()));
}
Also used : Argument(mcjty.lib.network.Argument) PositionalLayout(mcjty.lib.gui.layout.PositionalLayout)

Example 64 with Argument

use of mcjty.lib.network.Argument in project RFTools by McJty.

the class GuiBuilder method changeRedstoneMode.

private void changeRedstoneMode() {
    tileEntity.setRSMode(RedstoneMode.values()[redstoneMode.getCurrentChoiceIndex()]);
    sendServerCommand(RFToolsMessages.INSTANCE, BuilderTileEntity.CMD_SETRSMODE, new Argument("rs", RedstoneMode.values()[redstoneMode.getCurrentChoiceIndex()].getDescription()));
}
Also used : Argument(mcjty.lib.network.Argument)

Example 65 with Argument

use of mcjty.lib.network.Argument in project RFTools by McJty.

the class GuiBuilder method updateRotate.

private void updateRotate() {
    String choice = rotateButton.getCurrentChoice();
    int index = 0;
    if (ROTATE_0.equals(choice)) {
        index = 0;
    } else if (ROTATE_90.equals(choice)) {
        index = 1;
    } else if (ROTATE_180.equals(choice)) {
        index = 2;
    } else if (ROTATE_270.equals(choice)) {
        index = 3;
    }
    sendServerCommand(RFToolsMessages.INSTANCE, CMD_SETROTATE, new Argument("rotate", index));
}
Also used : Argument(mcjty.lib.network.Argument)

Aggregations

Argument (mcjty.lib.network.Argument)97 PositionalLayout (mcjty.lib.gui.layout.PositionalLayout)8 Window (mcjty.lib.gui.Window)7 Panel (mcjty.lib.gui.widgets.Panel)6 ItemStack (net.minecraft.item.ItemStack)6 PacketServerCommand (mcjty.lib.network.PacketServerCommand)4 ArrayList (java.util.ArrayList)3 GenericGuiContainer (mcjty.lib.container.GenericGuiContainer)3 HorizontalLayout (mcjty.lib.gui.layout.HorizontalLayout)3 Label (mcjty.lib.gui.widgets.Label)3 PacketRequestIntegerFromServer (mcjty.lib.network.PacketRequestIntegerFromServer)3 java.awt (java.awt)2 Rectangle (java.awt.Rectangle)2 StyleConfig (mcjty.lib.base.StyleConfig)2 GenericEnergyStorageTileEntity (mcjty.lib.entity.GenericEnergyStorageTileEntity)2 HorizontalAlignment (mcjty.lib.gui.layout.HorizontalAlignment)2 VerticalLayout (mcjty.lib.gui.layout.VerticalLayout)2 mcjty.lib.gui.widgets (mcjty.lib.gui.widgets)2 ChoiceLabel (mcjty.lib.gui.widgets.ChoiceLabel)2 TextField (mcjty.lib.gui.widgets.TextField)2