Tomato now depletes as expected
#story[1291]
This commit is contained in:
@@ -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(),
|
||||
|
||||
Reference in New Issue
Block a user