Search in sources :

Example 1 with GuiGreenhouse

use of forestry.greenhouse.gui.GuiGreenhouse in project ForestryMC by ForestryMC.

the class WidgetClimateBar method handleMouseClick.

@Override
public void handleMouseClick(int mouseX, int mouseY, int mouseButton) {
    mouseX -= manager.gui.getGuiLeft();
    mouseY -= manager.gui.getGuiTop();
    for (ClimateButton button : buttons) {
        if (button.isMouseOver(mouseX, mouseY)) {
            IClimateState climateState = button.climate.climateState;
            ((GuiGreenhouse) manager.gui).temperaturePanel.setValue(climateState.getTemperature());
            ((GuiGreenhouse) manager.gui).humidityPanel.setValue(climateState.getHumidity());
            ((GuiGreenhouse) manager.gui).sendNetworkUpdate();
        }
    }
}
Also used : GuiGreenhouse(forestry.greenhouse.gui.GuiGreenhouse) IClimateState(forestry.api.climate.IClimateState)

Aggregations

IClimateState (forestry.api.climate.IClimateState)1 GuiGreenhouse (forestry.greenhouse.gui.GuiGreenhouse)1