Search in sources :

Example 1 with PowerMode

use of riskyken.armourersWorkshop.common.tileentities.TileEntityHologramProjector.PowerMode in project Armourers-Workshop by RiskyKen.

the class GuiHologramProjectorTabExtra method initGui.

@Override
public void initGui(int xPos, int yPos, int width, int height) {
    super.initGui(xPos, yPos, width, height);
    checkGlowing = new GuiCheckBox(-1, (int) ((width / 2F) - (200 / 2F)) + 10, 30, GuiHelper.getLocalizedControlName(inventoryName, "glowing"), tileEntity.isGlowing());
    dropDownPowerMode = new GuiDropDownList(0, (int) ((width / 2F) - (200 / 2F)) + 10, 55, 80, "", this);
    for (int i = 0; i < PowerMode.values().length; i++) {
        PowerMode powerMode = PowerMode.values()[i];
        dropDownPowerMode.addListItem(GuiHelper.getLocalizedControlName(inventoryName, "powerMode." + powerMode.toString().toLowerCase()), powerMode.toString(), true);
        if (powerMode == tileEntity.getPowerMode()) {
            dropDownPowerMode.setListSelectedIndex(i);
        }
    }
    buttonList.add(checkGlowing);
    buttonList.add(dropDownPowerMode);
}
Also used : GuiDropDownList(riskyken.armourersWorkshop.client.gui.controls.GuiDropDownList) PowerMode(riskyken.armourersWorkshop.common.tileentities.TileEntityHologramProjector.PowerMode) GuiCheckBox(riskyken.armourersWorkshop.client.gui.controls.GuiCheckBox)

Aggregations

GuiCheckBox (riskyken.armourersWorkshop.client.gui.controls.GuiCheckBox)1 GuiDropDownList (riskyken.armourersWorkshop.client.gui.controls.GuiDropDownList)1 PowerMode (riskyken.armourersWorkshop.common.tileentities.TileEntityHologramProjector.PowerMode)1