| 1234567891011121314151617181920212223242526272829303132333435363738394041424344454647484950515253545556575859606162636465666768697071727374757677787980818283848586 |
- = dial
- :revnumber: 2.0
- :revdate: 2020/07/25
- == 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 xref:gui/tonegodgui/quickstart.adoc[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();
- ----
|