@Override public void guiObjectEvent(IGuiObject object) { if (object == powerOn) { render.clientSend(BatteryChargerElement.toogleCharge); } super.guiObjectEvent(object); }
@Override protected void preDraw(float f, int x, int y) { super.preDraw(f, x, y); if (render.powerOn) { powerOn.displayString = "Is ON"; } else { powerOn.displayString = "Is OFF"; } }
@Override public void initGui() { super.initGui(); powerOn = newGuiButton(97 + 10, 6 + 17 - 10, 40, ""); }