123456789101112131415161718192021222324252627282930313233343536373839404142434445464748495051525354555657585960616263646566676869707172737475767778798081828384858687888990 |
- = dial
- :author:
- :revnumber:
- :revdate: 2016/03/17 20:48
- :relfileprefix: ../../../
- :imagesdir: ../../..
- ifdef::env-github,env-browser[:outfilesuffix: .adoc]
- == Dial Class
- The Dial class provides:
- * A rotating knob for selecting step values
- The Dial class provides the standard 3 common constructors as sown in the <<jme3/contributions/tonegodgui/quickstart#,Quick Start Guide>>.
- *Constructor 1:*
- [source,java]
- ----
- /** Parameters:
- * Screen screen,
- * String UID,
- * Vector2f position
- */
-
- Dial dial = new Dial(screen, “dial”, new Vector2f(15, 15));
- ----
- *Constructor 2:*
- [source,java]
- ----
- /** Additional Parameter:
- * Vector2f dimensions */
-
- Dial dial = new Dial(screen, “dial”, new Vector2f(15, 15),
- new Vector2f(35, 35)
- );
- ----
- *Constructor 3:*
- [source,java]
- ----
- /** Additional Parameters:
- * Vector4f resizeBorders,
- * String defaultImg
- */
-
- Dial dial = new Dial(screen, “dial”, new Vector2f(15, 15), new Vector2f(35, 35),
- new Vector4f(0,0,0,0),
- “tonegod/gui/style/def/Dial/dial_x.png”
- );
- ----
- === Abstract Event Methods:
- [source,java]
- ----
- public void onChange(int selectedIndex, String value);
- ----
- === Methods specific to the Dial class:
- [source,java]
- ----
- // Adding removing list info
- dial.addStepValue(String value);
- dial.removeStepValue(String value);
-
- // Retrieval of current selected step
- dial.getSelectedIndex();
- ----
|