Skip to main content

GUI

class GUI

Class responsible for rendering 2D elements on the screen, be they texts(GUIText) or images(GUIImage).


public class GUI

— Static Methods (20) —

NameDescription
void draw(GUIElement guiElement)Renders the GUI element("GUIImage" or "GUIText") on the screen defined to be "guiElement" argument.
void drawText(Color color, String text, int x, int y, int width, int height)Renders a "GUIText" on the screen with its color defined to be "color" argument, text to be "text" argument, X position to be "x" argument, Y position to be "y" argument, width to be "width" argument, and height to be "height" argument.
void drawText(Color color, String text, int x, int y, int width, int height, Font font)Renders a "GUIText" on the screen with its color defined to be "color" argument, text to be "text" argument, X position to be "x" argument, Y position to be "y" argument, width to be "width" argument, height to be argument "height", and font to be "font" argument.
void drawText(String text, int x, int y, int width, int height, Font font)Renders on the screen a "GUIText" with its text defined to be "text" argument, X position to be "x" argument, Y position to be "y" argument, width to be "width" argument, height to be "height" argument, and font to be argument "font".
void drawText(Color color, String text, int x, int y, int width, int height, Font font, [GUIText.Alignment] alignment)Renders a "GUIText" on the screen with its color defined to be "color" argument, text to be "text" argument, X position to be "x" argument, Y position to be "y" argument, width to be "width" argument, height to be argument "height", font to be "font" argument, and alignment("TopLeft", "TopCenter", "TopRight", "MiddleLeft", "MiddleCenter", "MiddleRight", "BottomLeft", "BottomCenter" or "BottomRight") to be "alignment" argument.
void drawText(Color color, String text, int x, int y, int width, int height, Font font, [GUIText.Alignment] alignment, float scale)Renders a "GUIText" on the screen with its color defined to be "color" argument, text to be "text" argument, X position to be "x" argument, Y position to be "y" argument, width to be "width" argument, height to be argument "height", font to be "font" argument, alignment("TopLeft", "TopCenter", "TopRight", "MiddleLeft", "MiddleCenter", "MiddleRight", "BottomLeft", "BottomCenter" or "BottomRight") to be "alignment" argument, and scale to be "scale" argument.
void drawText(String text, int x, int y, int width, int height, Font font, [GUIText.Alignment] alignment)Renders a "GUIText" on the screen with its text defined to be "text" argument, X position to be "x" argument, Y position to be "y" argument, width to be "width" argument, height to be "height" argument, font to be argument "font" and alignment("TopLeft", "TopCenter", "TopRight", "MiddleLeft", "MiddleCenter", "MiddleRight", "BottomLeft", "BottomCenter" or "BottomRight") to be "alignment" argument.
void drawText(String text, int x, int y, int width, int height)Renders a "GUIText" on the screen with its text defined to be "text" argument, X position in the "x" argument, Y position to be "y" argument, width to be "width" argument and height to be "height" argument.
void drawText(String text, int x, int y, int width, int height, float scale)Renders a "GUIText" on the screen with its text defined to be "text" argument, X position to be "x" argument, Y position to be "y" argument, width to be "width" argument, height to be "height" argument, and scale to be "scale" argument.
void drawText(Color color, String text, int x, int y, int width, int height, [GUIText.Alignment] alignment)Renders a "GUIText" on the screen with its color defined to be "color" argument, text to be "text" argument, X position to be "x" argument, Y position to be "y" argument, width to be "width" argument, height to be argument "height", and alignment("TopLeft", "TopCenter", "TopRight", "MiddleLeft", "MiddleCenter", "MiddleRight", "BottomLeft", "BottomCenter" or "BottomRight") to be "alignment" argument.
void drawText(String text, int x, int y, int width, int height, [GUIText.Alignment] alignment)Renders a "GUIText" on the screen with its text defined to be "text" argument, X position to be "x" argument, Y position to be "y" argument, width to be "width" argument, height to be "height" argument, and alignment("TopLeft", "TopCenter", "TopRight", "MiddleLeft", "MiddleCenter", "MiddleRight", "BottomLeft", "BottomCenter" or "BottomRight") to be "alignment" argument.
void drawImage([Texture] texture, int x, int y, int width, int height)Renders a "GUIImage" on the screen with its texture defined to be "texture" argument, X position to be "x" argument, Y position to be "y" argument, width to be "width" argument and height to be "height" argument.
void drawImage([Texture] texture, int x, int y, int width, int height, boolean flipX, boolean flipY)Renders a "GUIImage" on the screen with its texture defined to be "texture" argument, X position to be "x" argument, Y position to be "y" argument, width to be "width" argument, height to be "height" argument, texture inversion on the X axis to be "flipX" argument, and inversion of the texture on the Y axis to be "flipY" argument.
void drawImage([Texture] texture, int x, int y, int width, int height, boolean flipX, boolean flipY, boolean overrideAlpha, float alpha)Renders a "GUIImage" on the screen with its texture defined to be "texture" argument, X position to be "x" argument, Y position to be "y" argument, width to be "width" argument, height to be "height" argument, texture inversion on the X axis to be "flipX" argument, inversion of the texture in the Y axis to be "flipY" argument, whether opacity(alpha) will be activated or deactivated to be "overrideAlpha" argument, and opacity to be "alpha" argument.
void drawImage(Color color, [Texture] texture, int x, int y, int width, int height)Renders a "GUIImage" on the screen with its color defined to be "color" argument, texture to be "texture" argument, X position to be "x" argument, Y position to be "y" argument, width to be "width" argument, and height to be "height" argument.
void drawImage(Color color, [Texture] texture, int x, int y, int width, int height, boolean flipX, boolean flipY)Renders a "GUIImage" on the screen with its color defined to be "color" argument, texture to be "texture" argument, X position to be "x" argument, Y position to be "y" argument, width to be "width" argument, height to be argument "height", inversion of the texture in the X axis to be argument "flipX", and inversion of the texture in the Y axis to be argument "flipY".
void drawImage(Color color, [Texture] texture, int x, int y, int width, int height, boolean flipX, boolean flipY, boolean overrideAlpha, float alpha)Renders a "GUIImage" on the screen with its color defined to be "color" argument, texture to be "texture" argument, X position to be "x" argument, Y position to be "y" argument, width to be "width" argument, height to be argument "height", inversion of texture on the X axis to be argument "flipX", inversion of the texture in the Y axis to be argument "flipY", whether opacity(alpha) will be activated or deactivated to be argument "overrideAlpha", and opacity to be argument "alpha ".
void drawImage(GUIImage guiImage)Renders a GUIImage defined to be "guiImage" argument to the screen.
void drawImage([Texture] texture, GUIRect guiRect)Renders to the screen a GUIImage defined to be "guiImage" argument, and Rect(GUIRect) to be "guiRect" argument.
void drawImage(Color color, [Texture] texture, GUIRect guiRect)Renders a GUIImage on the screen with its color defined to be "color" argument, texture to be "texture" argument and Rect(GUIRect) to be "guiRect" argument.