aboutsummaryrefslogtreecommitdiff
diff options
context:
space:
mode:
authorJuuz <6596629+Juuxel@users.noreply.github.com>2023-06-04 00:10:07 +0300
committerJuuz <6596629+Juuxel@users.noreply.github.com>2023-06-04 00:10:07 +0300
commit6b14e2b3afa122744d3ae209703fc44b041b4e80 (patch)
tree1581377b5ec9d00f5e3f9658e7b1c2f3efd36555
parent1167c00c645376481560afd838038251174860ec (diff)
downloadLibGui-6b14e2b3afa122744d3ae209703fc44b041b4e80.tar.gz
LibGui-6b14e2b3afa122744d3ae209703fc44b041b4e80.tar.bz2
LibGui-6b14e2b3afa122744d3ae209703fc44b041b4e80.zip
ScreenDrawing: Clean up javadoc
-rw-r--r--src/main/java/io/github/cottonmc/cotton/gui/client/ScreenDrawing.java242
1 files changed, 121 insertions, 121 deletions
diff --git a/src/main/java/io/github/cottonmc/cotton/gui/client/ScreenDrawing.java b/src/main/java/io/github/cottonmc/cotton/gui/client/ScreenDrawing.java
index 64e9096..4064a04 100644
--- a/src/main/java/io/github/cottonmc/cotton/gui/client/ScreenDrawing.java
+++ b/src/main/java/io/github/cottonmc/cotton/gui/client/ScreenDrawing.java
@@ -27,13 +27,13 @@ public class ScreenDrawing {
/**
* Draws a textured rectangle.
*
- * @param context the draw context
- * @param x the x coordinate of the box on-screen
- * @param y the y coordinate of the box on-screen
- * @param width the width of the box on-screen
- * @param height the height of the box on-screen
- * @param texture the Identifier for the texture
- * @param color a color to tint the texture. This can be transparent! Use 0xFF_FFFFFF if you don't want a color tint
+ * @param context the draw context
+ * @param x the x coordinate of the box on-screen
+ * @param y the y coordinate of the box on-screen
+ * @param width the width of the box on-screen
+ * @param height the height of the box on-screen
+ * @param texture the Identifier for the texture
+ * @param color a color to tint the texture. This can be transparent! Use 0xFF_FFFFFF if you don't want a color tint
*/
public static void texturedRect(DrawContext context, int x, int y, int width, int height, Identifier texture, int color) {
texturedRect(context, x, y, width, height, texture, 0, 0, 1, 1, color, 1.0f);
@@ -42,14 +42,14 @@ public class ScreenDrawing {
/**
* Draws a textured rectangle.
*
- * @param context the draw context
- * @param x the x coordinate of the box on-screen
- * @param y the y coordinate of the box on-screen
- * @param width the width of the box on-screen
- * @param height the height of the box on-screen
- * @param texture the Identifier for the texture
- * @param color a color to tint the texture. This can be transparent! Use 0xFF_FFFFFF if you don't want a color tint
- * @param opacity opacity of the drawn texture. (0f is fully opaque and 1f is fully visible)
+ * @param context the draw context
+ * @param x the x coordinate of the box on-screen
+ * @param y the y coordinate of the box on-screen
+ * @param width the width of the box on-screen
+ * @param height the height of the box on-screen
+ * @param texture the Identifier for the texture
+ * @param color a color to tint the texture. This can be transparent! Use 0xFF_FFFFFF if you don't want a color tint
+ * @param opacity opacity of the drawn texture. (0f is fully opaque and 1f is fully visible)
* @since 2.0.0
*/
public static void texturedRect(DrawContext context, int x, int y, int width, int height, Identifier texture, int color, float opacity) {
@@ -59,17 +59,17 @@ public class ScreenDrawing {
/**
* Draws a textured rectangle.
*
- * @param context the draw context
- * @param x the x coordinate of the box on-screen
- * @param y the y coordinate of the box on-screen
- * @param width the width of the box on-screen
- * @param height the height of the box on-screen
- * @param texture the Identifier for the texture
- * @param u1 the left edge of the texture
- * @param v1 the top edge of the texture
- * @param u2 the right edge of the texture
- * @param v2 the bottom edge of the texture
- * @param color a color to tint the texture. This can be transparent! Use 0xFF_FFFFFF if you don't want a color tint
+ * @param context the draw context
+ * @param x the x coordinate of the box on-screen
+ * @param y the y coordinate of the box on-screen
+ * @param width the width of the box on-screen
+ * @param height the height of the box on-screen
+ * @param texture the Identifier for the texture
+ * @param u1 the left edge of the texture
+ * @param v1 the top edge of the texture
+ * @param u2 the right edge of the texture
+ * @param v2 the bottom edge of the texture
+ * @param color a color to tint the texture. This can be transparent! Use 0xFF_FFFFFF if you don't want a color tint
*/
public static void texturedRect(DrawContext context, int x, int y, int width, int height, Identifier texture, float u1, float v1, float u2, float v2, int color) {
texturedRect(context, x, y, width, height, texture, u1, v1, u2, v2, color, 1.0f);
@@ -78,13 +78,13 @@ public class ScreenDrawing {
/**
* Draws a textured rectangle.
*
- * @param context the draw context
- * @param x the x coordinate of the box on-screen
- * @param y the y coordinate of the box on-screen
- * @param width the width of the box on-screen
- * @param height the height of the box on-screen
- * @param texture the texture
- * @param color a color to tint the texture. This can be transparent! Use 0xFF_FFFFFF if you don't want a color tint
+ * @param context the draw context
+ * @param x the x coordinate of the box on-screen
+ * @param y the y coordinate of the box on-screen
+ * @param width the width of the box on-screen
+ * @param height the height of the box on-screen
+ * @param texture the texture
+ * @param color a color to tint the texture. This can be transparent! Use 0xFF_FFFFFF if you don't want a color tint
* @since 3.0.0
*/
public static void texturedRect(DrawContext context, int x, int y, int width, int height, Texture texture, int color) {
@@ -94,14 +94,14 @@ public class ScreenDrawing {
/**
* Draws a textured rectangle.
*
- * @param context the draw context
- * @param x the x coordinate of the box on-screen
- * @param y the y coordinate of the box on-screen
- * @param width the width of the box on-screen
- * @param height the height of the box on-screen
- * @param texture the texture
- * @param color a color to tint the texture. This can be transparent! Use 0xFF_FFFFFF if you don't want a color tint
- * @param opacity opacity of the drawn texture. (0f is fully opaque and 1f is fully visible)
+ * @param context the draw context
+ * @param x the x coordinate of the box on-screen
+ * @param y the y coordinate of the box on-screen
+ * @param width the width of the box on-screen
+ * @param height the height of the box on-screen
+ * @param texture the texture
+ * @param color a color to tint the texture. This can be transparent! Use 0xFF_FFFFFF if you don't want a color tint
+ * @param opacity opacity of the drawn texture. (0f is fully opaque and 1f is fully visible)
* @since 3.0.0
*/
public static void texturedRect(DrawContext context, int x, int y, int width, int height, Texture texture, int color, float opacity) {
@@ -111,18 +111,18 @@ public class ScreenDrawing {
/**
* Draws a textured rectangle.
*
- * @param context the draw context
- * @param x the x coordinate of the box on-screen
- * @param y the y coordinate of the box on-screen
- * @param width the width of the box on-screen
- * @param height the height of the box on-screen
- * @param texture the Identifier for the texture
- * @param u1 the left edge of the texture
- * @param v1 the top edge of the texture
- * @param u2 the right edge of the texture
- * @param v2 the bottom edge of the texture
- * @param color a color to tint the texture. This can be transparent! Use 0xFF_FFFFFF if you don't want a color tint
- * @param opacity opacity of the drawn texture. (0f is fully opaque and 1f is fully visible)
+ * @param context the draw context
+ * @param x the x coordinate of the box on-screen
+ * @param y the y coordinate of the box on-screen
+ * @param width the width of the box on-screen
+ * @param height the height of the box on-screen
+ * @param texture the Identifier for the texture
+ * @param u1 the left edge of the texture
+ * @param v1 the top edge of the texture
+ * @param u2 the right edge of the texture
+ * @param v2 the bottom edge of the texture
+ * @param color a color to tint the texture. This can be transparent! Use 0xFF_FFFFFF if you don't want a color tint
+ * @param opacity opacity of the drawn texture. (0f is fully opaque and 1f is fully visible)
* @since 2.0.0
*/
public static void texturedRect(DrawContext context, int x, int y, int width, int height, Identifier texture, float u1, float v1, float u2, float v2, int color, float opacity) {
@@ -154,14 +154,14 @@ public class ScreenDrawing {
* <p>If the texture is 256x256, this draws the texture at one pixel per texel.
*
* @param context the draw context
- * @param x the x coordinate of the box on-screen
- * @param y the y coordinate of the box on-screen
- * @param width the width of the box on-screen
- * @param height the height of the box on-screen
- * @param texture the Identifier for the texture
- * @param textureX the x offset into the texture
- * @param textureY the y offset into the texture
- * @param color a color to tint the texture. This can be transparent! Use 0xFF_FFFFFF if you don't want a color tint
+ * @param x the x coordinate of the box on-screen
+ * @param y the y coordinate of the box on-screen
+ * @param width the width of the box on-screen
+ * @param height the height of the box on-screen
+ * @param texture the Identifier for the texture
+ * @param textureX the x offset into the texture
+ * @param textureY the y offset into the texture
+ * @param color a color to tint the texture. This can be transparent! Use 0xFF_FFFFFF if you don't want a color tint
*/
public static void texturedGuiRect(DrawContext context, int x, int y, int width, int height, Identifier texture, int textureX, int textureY, int color) {
float px = 1/256f;
@@ -174,12 +174,12 @@ public class ScreenDrawing {
* <p>If the texture is 256x256, this draws the texture at one pixel per texel.
*
* @param context the draw context
- * @param left the x coordinate of the box on-screen
- * @param top the y coordinate of the box on-screen
- * @param width the width of the box on-screen
- * @param height the height of the box on-screen
- * @param texture the Identifier for the texture
- * @param color a color to tint the texture. This can be transparent! Use 0xFF_FFFFFF if you don't want a color tint
+ * @param left the x coordinate of the box on-screen
+ * @param top the y coordinate of the box on-screen
+ * @param width the width of the box on-screen
+ * @param height the height of the box on-screen
+ * @param texture the Identifier for the texture
+ * @param color a color to tint the texture. This can be transparent! Use 0xFF_FFFFFF if you don't want a color tint
*/
public static void texturedGuiRect(DrawContext context, int left, int top, int width, int height, Identifier texture, int color) {
texturedGuiRect(context, left, top, width, height, texture, 0, 0, color);
@@ -199,10 +199,10 @@ public class ScreenDrawing {
* Draws a beveled, round rectangle that is substantially similar to default Minecraft UI panels.
*
* @param context the draw context
- * @param x the X position of the panel
- * @param y the Y position of the panel
- * @param width the width of the panel
- * @param height the height of the panel
+ * @param x the X position of the panel
+ * @param y the Y position of the panel
+ * @param width the width of the panel
+ * @param height the height of the panel
*/
public static void drawGuiPanel(DrawContext context, int x, int y, int width, int height) {
if (LibGui.isDarkMode()) drawGuiPanel(context, x, y, width, height, 0xFF0B0B0B, 0xFF2F2F2F, 0xFF414141, 0xFF000000);
@@ -212,7 +212,7 @@ public class ScreenDrawing {
/**
* Draws a beveled, round, and colored rectangle that is substantially similar to default Minecraft UI panels.
*
- * @param context the draw context
+ * @param context the draw context
* @param x the X position of the panel
* @param y the Y position of the panel
* @param width the width of the panel
@@ -230,14 +230,14 @@ public class ScreenDrawing {
* Draws a beveled, round rectangle with custom edge colors that is substantially similar to default Minecraft UI panels.
*
* @param context the draw context
- * @param x the X position of the panel
- * @param y the Y position of the panel
- * @param width the width of the panel
- * @param height the height of the panel
- * @param shadow the bottom/right shadow ARGB color
- * @param panel the center ARGB color
- * @param hilight the top/left hilight ARGB color
- * @param outline the outline ARGB color
+ * @param x the X position of the panel
+ * @param y the Y position of the panel
+ * @param width the width of the panel
+ * @param height the height of the panel
+ * @param shadow the bottom/right shadow ARGB color
+ * @param panel the center ARGB color
+ * @param hilight the top/left hilight ARGB color
+ * @param outline the outline ARGB color
*/
public static void drawGuiPanel(DrawContext context, int x, int y, int width, int height, int shadow, int panel, int hilight, int outline) {
coloredRect(context, x + 3, y + 3, width - 6, height - 6, panel); //Main panel area
@@ -278,14 +278,14 @@ public class ScreenDrawing {
/**
* Draws a generalized-case beveled panel. Can be inset or outset depending on arguments.
*
- * @param context the draw context
- * @param x x coordinate of the topleft corner
- * @param y y coordinate of the topleft corner
- * @param width width of the panel
- * @param height height of the panel
- * @param topleft color of the top/left bevel
- * @param panel color of the panel area
- * @param bottomright color of the bottom/right bevel
+ * @param context the draw context
+ * @param x x coordinate of the topleft corner
+ * @param y y coordinate of the topleft corner
+ * @param width width of the panel
+ * @param height height of the panel
+ * @param topleft color of the top/left bevel
+ * @param panel color of the panel area
+ * @param bottomright color of the bottom/right bevel
*/
public static void drawBeveledPanel(DrawContext context, int x, int y, int width, int height, int topleft, int panel, int bottomright) {
coloredRect(context, x, y, width, height, panel); //Center panel
@@ -299,12 +299,12 @@ public class ScreenDrawing {
* Draws a string with a custom alignment.
*
* @param context the draw context
- * @param s the string
- * @param align the alignment of the string
- * @param x the X position
- * @param y the Y position
- * @param width the width of the string, used for aligning
- * @param color the text color
+ * @param s the string
+ * @param align the alignment of the string
+ * @param x the X position
+ * @param y the Y position
+ * @param width the width of the string, used for aligning
+ * @param color the text color
*/
public static void drawString(DrawContext context, String s, HorizontalAlignment align, int x, int y, int width, int color) {
var textRenderer = MinecraftClient.getInstance().textRenderer;
@@ -331,12 +331,12 @@ public class ScreenDrawing {
* Draws a text component with a custom alignment.
*
* @param context the draw context
- * @param text the text
- * @param align the alignment of the string
- * @param x the X position
- * @param y the Y position
- * @param width the width of the string, used for aligning
- * @param color the text color
+ * @param text the text
+ * @param align the alignment of the string
+ * @param x the X position
+ * @param y the Y position
+ * @param width the width of the string, used for aligning
+ * @param color the text color
* @since 1.9.0
*/
public static void drawString(DrawContext context, OrderedText text, HorizontalAlignment align, int x, int y, int width, int color) {
@@ -364,12 +364,12 @@ public class ScreenDrawing {
* Draws a shadowed string.
*
* @param context the draw context
- * @param s the string
- * @param align the alignment of the string
- * @param x the X position
- * @param y the Y position
- * @param width the width of the string, used for aligning
- * @param color the text color
+ * @param s the string
+ * @param align the alignment of the string
+ * @param x the X position
+ * @param y the Y position
+ * @param width the width of the string, used for aligning
+ * @param color the text color
*/
public static void drawStringWithShadow(DrawContext context, String s, HorizontalAlignment align, int x, int y, int width, int color) {
var textRenderer = MinecraftClient.getInstance().textRenderer;
@@ -396,12 +396,12 @@ public class ScreenDrawing {
* Draws a shadowed text component.
*
* @param context the draw context
- * @param text the text component
- * @param align the alignment of the string
- * @param x the X position
- * @param y the Y position
- * @param width the width of the string, used for aligning
- * @param color the text color
+ * @param text the text component
+ * @param align the alignment of the string
+ * @param x the X position
+ * @param y the Y position
+ * @param width the width of the string, used for aligning
+ * @param color the text color
*/
public static void drawStringWithShadow(DrawContext context, OrderedText text, HorizontalAlignment align, int x, int y, int width, int color) {
var textRenderer = MinecraftClient.getInstance().textRenderer;
@@ -428,10 +428,10 @@ public class ScreenDrawing {
* Draws a left-aligned string.
*
* @param context the draw context
- * @param s the string
- * @param x the X position
- * @param y the Y position
- * @param color the text color
+ * @param s the string
+ * @param x the X position
+ * @param y the Y position
+ * @param color the text color
*/
public static void drawString(DrawContext context, String s, int x, int y, int color) {
context.drawText(MinecraftClient.getInstance().textRenderer, s, x, y, color, false);
@@ -441,10 +441,10 @@ public class ScreenDrawing {
* Draws a left-aligned text component.
*
* @param context the draw context
- * @param text the text component
- * @param x the X position
- * @param y the Y position
- * @param color the text color
+ * @param text the text component
+ * @param x the X position
+ * @param y the Y position
+ * @param color the text color
*/
public static void drawString(DrawContext context, OrderedText text, int x, int y, int color) {
context.drawText(MinecraftClient.getInstance().textRenderer, text, x, y, color, false);
@@ -456,7 +456,7 @@ public class ScreenDrawing {
* <p>This method has no effect when the caller is not in a LibGui screen.
* For example, there will be nothing drawn in HUDs.
*
- * @param context the draw context
+ * @param context the draw context
* @param textStyle the text style
* @param x the X position
* @param y the Y position