From 9314e6b336441f5a0ad1086389ab959e7bead403 Mon Sep 17 00:00:00 2001 From: =?UTF-8?q?J=C3=A9r=C3=A9my=20Zurcher?= Date: Thu, 19 May 2016 12:22:55 +0200 Subject: ui/List: add getSelected() --- core/src/ch/asynk/rustanddust/ui/List.java | 1 + 1 file changed, 1 insertion(+) 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) -- cgit v1.1-2-g2b99