From 16d4a4fd66c637a67361c8612e9e809816e46519 Mon Sep 17 00:00:00 2001 From: Stephen Gold Date: Wed, 3 Jan 2018 23:20:24 -0800 Subject: [PATCH] GuiWindowController: add readVectorBank() method --- .../nifty/GuiWindowController.java | 17 +++++++++++++++++ 1 file changed, 17 insertions(+) diff --git a/nifty/src/main/java/jme3utilities/nifty/GuiWindowController.java b/nifty/src/main/java/jme3utilities/nifty/GuiWindowController.java index 4481df624..2a9e3a3cf 100644 --- a/nifty/src/main/java/jme3utilities/nifty/GuiWindowController.java +++ b/nifty/src/main/java/jme3utilities/nifty/GuiWindowController.java @@ -26,6 +26,7 @@ OR TORT (INCLUDING NEGLIGENCE OR OTHERWISE) ARISING IN ANY WAY OUT OF THE USE */ package jme3utilities.nifty; +import com.jme3.math.Vector3f; import java.util.logging.Logger; import jme3utilities.Validate; @@ -84,6 +85,22 @@ public float readSlider(String name, SliderTransform transform) { return result; } + /** + * Read the named bank of 3 sliders to produce a vector. + * + * @param bankName the name (unique id infix) of the bank to read (not null) + * @param transform how to transform the raw readings (not null) + * @return vector indicated by the sliders (new instance) + */ + public Vector3f readVectorBank(String bankName, SliderTransform transform) { + Validate.nonNull(bankName, "bank name"); + Validate.nonNull(transform, "transform"); + + Vector3f vector + = getScreenController().readVectorBank(bankName, transform); + return vector; + } + /** * Alter the text of the named Nifty button. Setting the text to "" hides * the button. This assumes a naming convention where the Nifty id of every