diff options
author | Jérémy Zurcher <jeremy@asynk.ch> | 2016-02-22 05:35:40 +0100 |
---|---|---|
committer | Jérémy Zurcher <jeremy@asynk.ch> | 2016-02-22 05:35:40 +0100 |
commit | a64556c077d4fdee8b0005582b0493dc1b23087d (patch) | |
tree | f7ebbfb08fb46f4fa1ab2731c9e7171f1f174700 | |
parent | 13553219be27a8c7e4db029fa7ac8a407758b24d (diff) | |
download | RustAndDust-a64556c077d4fdee8b0005582b0493dc1b23087d.zip RustAndDust-a64556c077d4fdee8b0005582b0493dc1b23087d.tar.gz |
List: add unselect()
-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(); } |