summaryrefslogtreecommitdiff
path: root/asciifarm/client/display/health.py
diff options
context:
space:
mode:
Diffstat (limited to 'asciifarm/client/display/health.py')
-rw-r--r--asciifarm/client/display/health.py3
1 files changed, 1 insertions, 2 deletions
diff --git a/asciifarm/client/display/health.py b/asciifarm/client/display/health.py
index 0450449..3a3595b 100644
--- a/asciifarm/client/display/health.py
+++ b/asciifarm/client/display/health.py
@@ -19,8 +19,7 @@ class Health:
self.maxHealth = maxHealth or 0
self.widget.change()
- def update(self):
- win = self.widget.getWin()
+ def update(self, win):
width, height = win.getSize()
width -= 1
barEnd = round(self.health/self.maxHealth * width) if self.maxHealth > 0 else 0