| 123456789101112131415161718192021222324252627282930313233343536373839404142434445464748495051525354555657585960616263646566676869707172737475767778 |
- = dialogbox
- :revnumber: 2.0
- :revdate: 2020/07/25
- == DialogBox Class
- The DialogBox extends AlertBox adding a Cancel button with event handlers.
- It utilizes the 3 standard constructors as shown in the xref:gui/tonegodgui/quickstart.adoc[Quick Start Guide].
- *Constructor 1:*
- [source,java]
- ----
- /** Parameters:
- * Screen screen,
- * String UID,
- * Vector2f position
- */
- DialogBox dialog = new DialogBox(screen, "dialog", new Vector2f(15, 15));
- ----
- *Constructor 2:*
- [source,java]
- ----
- /** Additional Parameter:
- * Vector2f dimensions */
- DialogBox dialog = new DialogBox(screen, "dialog", new Vector2f(15, 15),
- new Vector2f(400, 300)
- );
- ----
- *Constructor 3:*
- [source,java]
- ----
- /** Additional Parameters:
- * Vector4f resizeBorders,
- * String defaultImg
- */
- DialogBox dialog = new DialogBox(screen, "dialog", new Vector2f(15, 15), new Vector2f(400, 300),
- new Vector4f(14,14,14,14),
- "tonegod/gui/style/def/Window/panel_x.png"
- );
- ----
- === Abstract Event Methods:
- [source,java]
- ----
- public void onButtonOkPressed(MouseButtonEvent evt, boolean toggled)
- public void onButtonCencelPressed(MouseButtonEvent evt, boolean toggled)
- ----
- === Methods specific to the DialogBox class:
- [source,java]
- ----
- dialog.setButtonCancelText(String text);
- ----
|