diff options
Diffstat (limited to 'core')
-rw-r--r-- | core/src/ch/asynk/rustanddust/ui/List.java | 3 |
1 files changed, 2 insertions, 1 deletions
diff --git a/core/src/ch/asynk/rustanddust/ui/List.java b/core/src/ch/asynk/rustanddust/ui/List.java index 0d5165a..c8834e3 100644 --- a/core/src/ch/asynk/rustanddust/ui/List.java +++ b/core/src/ch/asynk/rustanddust/ui/List.java @@ -36,6 +36,7 @@ public class List extends Widget this.selected = new Bg(game.getUiRegion(game.UI_SELECT)); } + public void unselect() { idx = null; } public Integer getIdx() { return idx; } @Override @@ -53,7 +54,7 @@ public class List extends Widget public void setItems(int clipN, Collection<ListElement> items) { - this.idx = null; + unselect(); this.items = items; compute(); } |