Tomato now depletes as expected

#story[1291]
main
Connor Taylor-Brown 8 years ago
parent 10008f5452
commit 6c78e5d0b5

@ -26,7 +26,7 @@ public class HealthSlider extends Pane {
public HealthSlider(Image fillImage) {
this.fillImage = fillImage;
this.crop = 0;
this.crop = 1;
this.backgroundSize = new BackgroundSize(
100,
100,
@ -43,7 +43,7 @@ public class HealthSlider extends Pane {
}
private void drawSlider() {
int top = (int)(crop * fillImage.getHeight());
int top = Math.max(0,(int)(fillImage.getHeight() - crop * fillImage.getHeight()));
WritableImage croppedImage = new WritableImage(
fillImage.getPixelReader(),

Loading…
Cancel
Save