diff options
author | Jérémy Zurcher <jeremy@asynk.ch> | 2016-02-24 10:17:41 +0100 |
---|---|---|
committer | Jérémy Zurcher <jeremy@asynk.ch> | 2016-02-24 10:17:41 +0100 |
commit | c364908c5b56d38ea76056fc32b865df340fc698 (patch) | |
tree | 3e458e128f8241e40f008b6bf0f410d5a883758c /core/src/ch/asynk | |
parent | 76ae7991549a435a82784484389a113021c5a096 (diff) | |
download | RustAndDust-c364908c5b56d38ea76056fc32b865df340fc698.zip RustAndDust-c364908c5b56d38ea76056fc32b865df340fc698.tar.gz |
List: use viewN
Diffstat (limited to 'core/src/ch/asynk')
-rw-r--r-- | core/src/ch/asynk/rustanddust/ui/List.java | 8 |
1 files 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<ListElement> items) + public void setItems(int viewN, Collection<ListElement> 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 |