|
@@ -1,10 +1,6 @@
|
|
|
= indicator
|
|
|
-:author:
|
|
|
-:revnumber:
|
|
|
-:revdate: 2016/03/17 20:48
|
|
|
-:relfileprefix: ../../../
|
|
|
-:imagesdir: ../../..
|
|
|
-ifdef::env-github,env-browser[:outfilesuffix: .adoc]
|
|
|
+:revnumber: 2.0
|
|
|
+:revdate: 2020/07/23
|
|
|
|
|
|
|
|
|
|
|
@@ -38,7 +34,7 @@ The Indicator uses the 3 standard constructors as shown in the <<jme3/contributi
|
|
|
*/
|
|
|
Indicator ind = new Indicator(
|
|
|
screen,
|
|
|
- “SomeID”,
|
|
|
+ "SomeID",
|
|
|
new Vector2f(10,10),
|
|
|
Orientation.VERTICAL
|
|
|
);
|
|
@@ -78,11 +74,11 @@ ind.setAlphaMap(String alphaMapPath);
|
|
|
|
|
|
// Get the indicators oritentation
|
|
|
ind.getOrientation();
|
|
|
-
|
|
|
+
|
|
|
// Adjust value ranges
|
|
|
ind.setMaxValue(float maxValue);
|
|
|
ind.setCurrentValue(float currentValue);
|
|
|
-
|
|
|
+
|
|
|
// Get current info
|
|
|
ind.getCurrentPercentage();
|
|
|
ind.getCurrentValue();
|
|
@@ -105,7 +101,7 @@ Cut & Paste the following code into the simpleInitApp method of a new JME pr
|
|
|
|
|
|
flyCam.setDragToRotate(true);
|
|
|
inputManager.setCursorVisible(true);
|
|
|
-
|
|
|
+
|
|
|
screen = new Screen(this);
|
|
|
guiNode.addControl(screen);
|
|
|
|
|
@@ -127,9 +123,9 @@ ind.setAlphaMap(screen.getStyle("Indicator").getString("alphaImg"));
|
|
|
ind.setIndicatorPadding(new Vector4f(7,7,7,7));
|
|
|
ind.setMaxValue(100);
|
|
|
ind.setDisplayPercentage();
|
|
|
-
|
|
|
+
|
|
|
screen.addElement(ind);
|
|
|
-
|
|
|
+
|
|
|
Slider slider = new Slider(screen, new Vector2f(100,100), Orientation.HORIZONTAL, true) {
|
|
|
@Override
|
|
|
public void onChange(int selectedIndex, Object value) {
|
|
@@ -139,9 +135,9 @@ Slider slider = new Slider(screen, new Vector2f(100,100), Orientation.HORIZONTAL
|
|
|
ind.setCurrentValue((Integer)value);
|
|
|
}
|
|
|
};
|
|
|
-
|
|
|
+
|
|
|
screen.addElement(slider);
|
|
|
|
|
|
----
|
|
|
|
|
|
-image:jme3/contributions/tonegodgui/indicatorexample.png[indicatorexample.png,width="",height=""]
|
|
|
+image:tonegodgui/indicatorexample.png[indicatorexample.png,width="",height=""]
|