| 12345678910111213141516171819202122232425262728293031323334353637383940414243444546474849505152535455565758596061626364656667686970717273747576 |
- = window
- :revnumber: 2.0
- :revdate: 2020/07/25
- == Window Class
- The window class provides a movable, resizable window with a Drag Bar.
- It provides 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
- */
- Window win = new Window(screen, xref:gui/tonegodgui/quickstart.adoc[Quick Start Guide]win”, new Vector2f(15, 15));
- ----
- *Constructor 2:*
- [source,java]
- ----
- /** Additional Parameter:
- * Vector2f dimensions */
- Window win = new Window(screen, "win", new Vector2f(15, 15),
- new Vector2f(400, 300)
- );
- ----
- *Constructor 3:*
- [source,java]
- ----
- /** Additional Parameters:
- * Vector4f resizeBorders,
- * String defaultImg
- */
- Window win = new Window(screen, "win", new Vector2f(15, 15), new Vector2f(400, 300),
- new Vector4f(14,14,14,14),
- "tonegod/gui/style/def/Window/panel_x.png"
- );
- ----
- [NOTE]
- ====
- Once again, default behaviors, such as moving, and resizing can be disabled calling the appropriate setters from the xref:gui/tonegodgui/element.adoc[Element] class.
- ====
- === Methods specific to the Window Class:
- [source,java]
- ----
- win.getDragBar(); // returns a pointer to the dragbar Element
- win.getDragBarHeight(); // returns the height of the dragbar
- win.setWindowTitle(String title); // Sets the title displayed in the dragbar
- ----
|