Skip to content

Commit

Permalink
GuiWindowController: add readVectorBank() method
Browse files Browse the repository at this point in the history
  • Loading branch information
stephengold committed Jan 4, 2018
1 parent a36ebf0 commit 16d4a4f
Showing 1 changed file with 17 additions and 0 deletions.
17 changes: 17 additions & 0 deletions nifty/src/main/java/jme3utilities/nifty/GuiWindowController.java
Original file line number Diff line number Diff line change
Expand Up @@ -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;

Expand Down Expand Up @@ -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
Expand Down

0 comments on commit 16d4a4f

Please sign in to comment.