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));
}
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);
}
}
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));
}
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);
}
}
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);
}
}
}
Aggregations