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