diff options
author | Jérémy Zurcher <jeremy@asynk.ch> | 2016-05-19 12:22:55 +0200 |
---|---|---|
committer | Jérémy Zurcher <jeremy@asynk.ch> | 2016-05-19 12:22:55 +0200 |
commit | 9314e6b336441f5a0ad1086389ab959e7bead403 (patch) | |
tree | abdaaef88f88f0d43ae0b837a89efc4f5bdad1dd | |
parent | 0847b65315fbfce3995e6b86451b22fb1c6db014 (diff) | |
download | RustAndDust-9314e6b336441f5a0ad1086389ab959e7bead403.zip RustAndDust-9314e6b336441f5a0ad1086389ab959e7bead403.tar.gz |
ui/List: add getSelected()
-rw-r--r-- | core/src/ch/asynk/rustanddust/ui/List.java | 1 |
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) |