From c364908c5b56d38ea76056fc32b865df340fc698 Mon Sep 17 00:00:00 2001 From: =?UTF-8?q?J=C3=A9r=C3=A9my=20Zurcher?= Date: Wed, 24 Feb 2016 10:17:41 +0100 Subject: List: use viewN --- core/src/ch/asynk/rustanddust/ui/List.java | 8 ++++---- 1 file changed, 4 insertions(+), 4 deletions(-) diff --git a/core/src/ch/asynk/rustanddust/ui/List.java b/core/src/ch/asynk/rustanddust/ui/List.java index c8834e3..c086082 100644 --- a/core/src/ch/asynk/rustanddust/ui/List.java +++ b/core/src/ch/asynk/rustanddust/ui/List.java @@ -52,14 +52,14 @@ public class List extends Widget return false; } - public void setItems(int clipN, Collection items) + public void setItems(int viewN, Collection items) { unselect(); this.items = items; - compute(); + compute(viewN); } - private void compute() + private void compute(int viewN) { float w = 0f; for (ListElement e: items) { @@ -69,7 +69,7 @@ public class List extends Widget itemHeight = (layout.height + padding); rect.width = w + (2 * padding); - rect.height = padding + (itemHeight * items.size()); + rect.height = padding + (itemHeight * viewN); } @Override -- cgit v1.1-2-g2b99