summaryrefslogtreecommitdiffstats
path: root/core/src/ch/asynk
diff options
context:
space:
mode:
authorJérémy Zurcher <jeremy@asynk.ch>2016-05-19 12:22:55 +0200
committerJérémy Zurcher <jeremy@asynk.ch>2016-05-19 12:22:55 +0200
commit9314e6b336441f5a0ad1086389ab959e7bead403 (patch)
treeabdaaef88f88f0d43ae0b837a89efc4f5bdad1dd /core/src/ch/asynk
parent0847b65315fbfce3995e6b86451b22fb1c6db014 (diff)
downloadRustAndDust-9314e6b336441f5a0ad1086389ab959e7bead403.zip
RustAndDust-9314e6b336441f5a0ad1086389ab959e7bead403.tar.gz
ui/List: add getSelected()
Diffstat (limited to 'core/src/ch/asynk')
-rw-r--r--core/src/ch/asynk/rustanddust/ui/List.java1
1 files changed, 1 insertions, 0 deletions
diff --git a/core/src/ch/asynk/rustanddust/ui/List.java b/core/src/ch/asynk/rustanddust/ui/List.java
index c086082..af1ad76 100644
--- a/core/src/ch/asynk/rustanddust/ui/List.java
+++ b/core/src/ch/asynk/rustanddust/ui/List.java
@@ -38,6 +38,7 @@ public class List extends Widget
public void unselect() { idx = null; }
public Integer getIdx() { return idx; }
+ public ListElement getSelected() { return ((idx == null) ? null : items.get(idx)); }
@Override
public boolean hit(float x, float y)