summaryrefslogtreecommitdiffstats
path: root/core
diff options
context:
space:
mode:
authorJérémy Zurcher <jeremy@asynk.ch>2016-02-22 05:35:40 +0100
committerJérémy Zurcher <jeremy@asynk.ch>2016-02-22 05:35:40 +0100
commita64556c077d4fdee8b0005582b0493dc1b23087d (patch)
treef7ebbfb08fb46f4fa1ab2731c9e7171f1f174700 /core
parent13553219be27a8c7e4db029fa7ac8a407758b24d (diff)
downloadRustAndDust-a64556c077d4fdee8b0005582b0493dc1b23087d.zip
RustAndDust-a64556c077d4fdee8b0005582b0493dc1b23087d.tar.gz
List: add unselect()
Diffstat (limited to 'core')
-rw-r--r--core/src/ch/asynk/rustanddust/ui/List.java3
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();
}