Search in sources :

Example 1 with ProgWidgetGoToLocation

use of me.desht.pneumaticcraft.common.progwidgets.ProgWidgetGoToLocation in project pnc-repressurized by TeamPneumatic.

the class GuiProgWidgetGoto method initGui.

@Override
public void initGui() {
    super.initGui();
    List<GuiRadioButton> radioButtons = new ArrayList<GuiRadioButton>();
    GuiRadioButton radioButton = new GuiRadioButton(0, guiLeft + 4, guiTop + 44, 0xFF404040, "Done when arrived");
    radioButton.checked = !((ProgWidgetGoToLocation) widget).doneWhenDeparting;
    addWidget(radioButton);
    radioButtons.add(radioButton);
    radioButton.otherChoices = radioButtons;
    GuiRadioButton radioButton2 = new GuiRadioButton(1, guiLeft + 4, guiTop + 58, 0xFF404040, "Done when departing");
    radioButton2.checked = ((ProgWidgetGoToLocation) widget).doneWhenDeparting;
    addWidget(radioButton2);
    radioButtons.add(radioButton2);
    radioButton2.otherChoices = radioButtons;
}
Also used : ProgWidgetGoToLocation(me.desht.pneumaticcraft.common.progwidgets.ProgWidgetGoToLocation) ArrayList(java.util.ArrayList) GuiRadioButton(me.desht.pneumaticcraft.client.gui.widget.GuiRadioButton)

Example 2 with ProgWidgetGoToLocation

use of me.desht.pneumaticcraft.common.progwidgets.ProgWidgetGoToLocation in project pnc-repressurized by TeamPneumatic.

the class EntityDrone method setGoingToOwner.

private void setGoingToOwner(boolean state) {
    if (state && gotoOwnerAI == null) {
        gotoOwnerAI = new DroneGoToOwner(this);
        tasks.addTask(2, gotoOwnerAI);
        dataManager.set(GOING_TO_OWNER, true);
        setActiveProgram(new ProgWidgetGoToLocation());
    } else if (!state && gotoOwnerAI != null) {
        tasks.removeTask(gotoOwnerAI);
        gotoOwnerAI = null;
        dataManager.set(GOING_TO_OWNER, false);
    }
}
Also used : ProgWidgetGoToLocation(me.desht.pneumaticcraft.common.progwidgets.ProgWidgetGoToLocation)

Aggregations

ProgWidgetGoToLocation (me.desht.pneumaticcraft.common.progwidgets.ProgWidgetGoToLocation)2 ArrayList (java.util.ArrayList)1 GuiRadioButton (me.desht.pneumaticcraft.client.gui.widget.GuiRadioButton)1