From c495fb8b33ecef1433111dab66898a23154b357c Mon Sep 17 00:00:00 2001 From: bdew Date: Tue, 21 Jan 2014 17:21:50 +0200 Subject: [PATCH] Fixed WidgetFluidGauge not respecting it's width --- src/net/bdew/lib/gui/widgets/WidgetFluidGauge.scala | 4 ++-- 1 file changed, 2 insertions(+), 2 deletions(-) diff --git a/src/net/bdew/lib/gui/widgets/WidgetFluidGauge.scala b/src/net/bdew/lib/gui/widgets/WidgetFluidGauge.scala index 6ece74b..ac67742 100644 --- a/src/net/bdew/lib/gui/widgets/WidgetFluidGauge.scala +++ b/src/net/bdew/lib/gui/widgets/WidgetFluidGauge.scala @@ -42,10 +42,10 @@ class WidgetFluidGauge(val rect: Rect, overlay: TextureLocation, dslot: DataSlot while (fillHeight > 0) { if (fillHeight > 16) { - parent.drawTexturedModelRectFromIcon(rect.x, rect.y + rect.h - 16 - yStart, icon, 16, 16) + parent.drawTexturedModelRectFromIcon(rect.x, rect.y + rect.h - 16 - yStart, icon, rect.w, 16) fillHeight -= 16 } else { - parent.drawTexturedModelRectFromIcon(rect.x, rect.y + rect.h - fillHeight - yStart, icon, 16, fillHeight) + parent.drawTexturedModelRectFromIcon(rect.x, rect.y + rect.h - fillHeight - yStart, icon, rect.w, fillHeight) fillHeight = 0 } yStart = yStart + 16