Search in sources :

Example 1 with PacketUpdateTextfield

use of pneumaticCraft.common.network.PacketUpdateTextfield in project PneumaticCraft by MineMaarten.

the class GuiElevator method onKeyTyped.

@Override
public void onKeyTyped(IGuiWidget widget) {
    te.setFloorName(currentEditedFloor, floorNameField.getText());
    NetworkHandler.sendToServer(new PacketUpdateTextfield(te, currentEditedFloor));
}
Also used : PacketUpdateTextfield(pneumaticCraft.common.network.PacketUpdateTextfield)

Example 2 with PacketUpdateTextfield

use of pneumaticCraft.common.network.PacketUpdateTextfield in project PneumaticCraft by MineMaarten.

the class GuiPressureChamberInterface method keyTyped.

@Override
protected void keyTyped(char par1, int par2) {
    if (nameFilterField.isFocused() && par2 != 1) {
        nameFilterField.textboxKeyTyped(par1, par2);
        te.itemNameFilter = nameFilterField.getText();
        NetworkHandler.sendToServer(new PacketUpdateTextfield(te, 0));
    } else {
        super.keyTyped(par1, par2);
    }
}
Also used : PacketUpdateTextfield(pneumaticCraft.common.network.PacketUpdateTextfield)

Example 3 with PacketUpdateTextfield

use of pneumaticCraft.common.network.PacketUpdateTextfield in project PneumaticCraft by MineMaarten.

the class GuiSecurityStationInventory method onKeyTyped.

@Override
public void onKeyTyped(IGuiWidget widget) {
    te.setText(0, sharedUserTextField.getText());
    NetworkHandler.sendToServer(new PacketUpdateTextfield(te, 0));
}
Also used : PacketUpdateTextfield(pneumaticCraft.common.network.PacketUpdateTextfield)

Example 4 with PacketUpdateTextfield

use of pneumaticCraft.common.network.PacketUpdateTextfield in project PneumaticCraft by MineMaarten.

the class GuiUniversalSensor method keyTyped.

@Override
protected void keyTyped(char par1, int par2) {
    if (nameFilterField.isFocused() && par2 != 1) {
        nameFilterField.textboxKeyTyped(par1, par2);
        te.setText(0, nameFilterField.getText());
        NetworkHandler.sendToServer(new PacketUpdateTextfield(te, 0));
    } else {
        super.keyTyped(par1, par2);
    }
}
Also used : PacketUpdateTextfield(pneumaticCraft.common.network.PacketUpdateTextfield)

Example 5 with PacketUpdateTextfield

use of pneumaticCraft.common.network.PacketUpdateTextfield in project PneumaticCraft by MineMaarten.

the class GuiProgrammer method mouseClicked.

@Override
protected void mouseClicked(int x, int y, int par3) {
    ItemStack programmedItem = te.getStackInSlot(TileEntityProgrammer.PROGRAM_SLOT);
    if (nameField.isFocused() && programmedItem != null) {
        programmedItem.setStackDisplayName(nameField.getText());
        NetworkHandler.sendToServer(new PacketUpdateTextfield(te, 0));
    }
    super.mouseClicked(x, y, par3);
    if (par3 == 1 && showingWidgetProgress == 0) {
        IProgWidget widget = programmerUnit.getHoveredWidget(x, y);
        if (widget != null) {
            GuiScreen screen = widget.getOptionWindow(this);
            if (screen != null)
                mc.displayGuiScreen(screen);
        }
    }
}
Also used : PacketUpdateTextfield(pneumaticCraft.common.network.PacketUpdateTextfield) IProgWidget(pneumaticCraft.common.progwidgets.IProgWidget) GuiScreen(net.minecraft.client.gui.GuiScreen) ItemStack(net.minecraft.item.ItemStack)

Aggregations

PacketUpdateTextfield (pneumaticCraft.common.network.PacketUpdateTextfield)8 ItemStack (net.minecraft.item.ItemStack)2 IProgWidget (pneumaticCraft.common.progwidgets.IProgWidget)2 Point (java.awt.Point)1 ArrayList (java.util.ArrayList)1 GuiScreen (net.minecraft.client.gui.GuiScreen)1