Class ScreenUtils
java.lang.Object
net.neoforged.neoforge.client.gui.ScreenUtils
Deprecated, for removal: This API element is subject to removal in a future version.
This class provides several methods and constants used by the Config GUI classes.
- Author:
- bspkrs
- 
Field SummaryFieldsModifier and TypeFieldDescriptionstatic final intDeprecated, for removal: This API element is subject to removal in a future version.static final intDeprecated, for removal: This API element is subject to removal in a future version.static final intDeprecated, for removal: This API element is subject to removal in a future version.static final StringDeprecated, for removal: This API element is subject to removal in a future version.static final StringDeprecated, for removal: This API element is subject to removal in a future version.static int[]Deprecated, for removal: This API element is subject to removal in a future version.static final StringDeprecated, for removal: This API element is subject to removal in a future version.static final StringDeprecated, for removal: This API element is subject to removal in a future version.
- 
Constructor SummaryConstructorsConstructorDescriptionDeprecated, for removal: This API element is subject to removal in a future version.
- 
Method SummaryModifier and TypeMethodDescriptionstatic voidblitInscribed(GuiGraphics guiGraphics, ResourceLocation texture, int x, int y, int boundsWidth, int boundsHeight, int rectWidth, int rectHeight) Deprecated, for removal: This API element is subject to removal in a future version.static voidblitInscribed(GuiGraphics guiGraphics, ResourceLocation texture, int x, int y, int boundsWidth, int boundsHeight, int rectWidth, int rectHeight, boolean centerX, boolean centerY) Deprecated, for removal: This API element is subject to removal in a future version.static voidblitWithBorder(GuiGraphics guiGraphics, int x, int y, int u, int v, int width, int height, int textureWidth, int textureHeight, int borderSize, float zLevel) Deprecated, for removal: This API element is subject to removal in a future version.Draws a textured box of any size (smallest size is borderSize * 2 square) based on a fixed size textured box with continuous borders and filler.static voidblitWithBorder(GuiGraphics guiGraphics, int x, int y, int u, int v, int width, int height, int textureWidth, int textureHeight, int topBorder, int bottomBorder, int leftBorder, int rightBorder, float zLevel) Deprecated, for removal: This API element is subject to removal in a future version.Draws a textured box of any size (smallest size is borderSize * 2 square) based on a fixed size textured box with continuous borders and filler.static voidblitWithBorder(GuiGraphics guiGraphics, ResourceLocation res, int x, int y, int u, int v, int width, int height, int textureWidth, int textureHeight, int borderSize, float zLevel) Deprecated, for removal: This API element is subject to removal in a future version.Draws a textured box of any size (smallest size is borderSize * 2 square) based on a fixed size textured box with continuous borders and filler.static voidblitWithBorder(GuiGraphics guiGraphics, ResourceLocation res, int x, int y, int u, int v, int width, int height, int textureWidth, int textureHeight, int topBorder, int bottomBorder, int leftBorder, int rightBorder, float zLevel) Deprecated, for removal: This API element is subject to removal in a future version.Draws a textured box of any size (smallest size is borderSize * 2 square) based on a fixed size textured box with continuous borders and filler.static voiddrawGradientRect(org.joml.Matrix4f mat, int zLevel, int left, int top, int right, int bottom, int startColor, int endColor) Deprecated, for removal: This API element is subject to removal in a future version.static voiddrawTexturedModalRect(GuiGraphics guiGraphics, int x, int y, int u, int v, int width, int height, float zLevel) Deprecated, for removal: This API element is subject to removal in a future version.static intgetColorFromFormattingCharacter(char c, boolean isLighter) Deprecated, for removal: This API element is subject to removal in a future version.
- 
Field Details- 
DEFAULT_BACKGROUND_COLORpublic static final int DEFAULT_BACKGROUND_COLORDeprecated, for removal: This API element is subject to removal in a future version.- See Also:
 
- 
DEFAULT_BORDER_COLOR_STARTpublic static final int DEFAULT_BORDER_COLOR_STARTDeprecated, for removal: This API element is subject to removal in a future version.- See Also:
 
- 
DEFAULT_BORDER_COLOR_ENDpublic static final int DEFAULT_BORDER_COLOR_ENDDeprecated, for removal: This API element is subject to removal in a future version.- See Also:
 
- 
UNDO_CHARDeprecated, for removal: This API element is subject to removal in a future version.- See Also:
 
- 
RESET_CHARDeprecated, for removal: This API element is subject to removal in a future version.- See Also:
 
- 
VALIDDeprecated, for removal: This API element is subject to removal in a future version.- See Also:
 
- 
INVALIDDeprecated, for removal: This API element is subject to removal in a future version.- See Also:
 
- 
TEXT_COLOR_CODESpublic static int[] TEXT_COLOR_CODESDeprecated, for removal: This API element is subject to removal in a future version.
 
- 
- 
Constructor Details- 
ScreenUtilspublic ScreenUtils()Deprecated, for removal: This API element is subject to removal in a future version.
 
- 
- 
Method Details- 
getColorFromFormattingCharacterpublic static int getColorFromFormattingCharacter(char c, boolean isLighter) Deprecated, for removal: This API element is subject to removal in a future version.
- 
blitWithBorderpublic static void blitWithBorder(GuiGraphics guiGraphics, int x, int y, int u, int v, int width, int height, int textureWidth, int textureHeight, int borderSize, float zLevel) Deprecated, for removal: This API element is subject to removal in a future version.Draws a textured box of any size (smallest size is borderSize * 2 square) based on a fixed size textured box with continuous borders and filler. It is assumed that the desired texture ResourceLocation object has been bound using Minecraft.getMinecraft().getTextureManager().bindTexture(resourceLocation).- Parameters:
- guiGraphics- the gui graphics
- x- x axis offset
- y- y axis offset
- u- bound resource location image x offset
- v- bound resource location image y offset
- width- the desired box width
- height- the desired box height
- textureWidth- the width of the box texture in the resource location image
- textureHeight- the height of the box texture in the resource location image
- borderSize- the size of the box's borders
- zLevel- the zLevel to draw at
 
- 
blitWithBorderpublic static void blitWithBorder(GuiGraphics guiGraphics, ResourceLocation res, int x, int y, int u, int v, int width, int height, int textureWidth, int textureHeight, int borderSize, float zLevel) Deprecated, for removal: This API element is subject to removal in a future version.Draws a textured box of any size (smallest size is borderSize * 2 square) based on a fixed size textured box with continuous borders and filler. The provided ResourceLocation object will be bound using Minecraft.getMinecraft().getTextureManager().bindTexture(resourceLocation).- Parameters:
- guiGraphics- the gui graphics
- res- the ResourceLocation object that contains the desired image
- x- x axis offset
- y- y axis offset
- u- bound resource location image x offset
- v- bound resource location image y offset
- width- the desired box width
- height- the desired box height
- textureWidth- the width of the box texture in the resource location image
- textureHeight- the height of the box texture in the resource location image
- borderSize- the size of the box's borders
- zLevel- the zLevel to draw at
 
- 
blitWithBorderpublic static void blitWithBorder(GuiGraphics guiGraphics, ResourceLocation res, int x, int y, int u, int v, int width, int height, int textureWidth, int textureHeight, int topBorder, int bottomBorder, int leftBorder, int rightBorder, float zLevel) Deprecated, for removal: This API element is subject to removal in a future version.Draws a textured box of any size (smallest size is borderSize * 2 square) based on a fixed size textured box with continuous borders and filler. The provided ResourceLocation object will be bound using Minecraft.getMinecraft().getTextureManager().bindTexture(resourceLocation).- Parameters:
- guiGraphics- the gui graphics
- res- the ResourceLocation object that contains the desired image
- x- x axis offset
- y- y axis offset
- u- bound resource location image x offset
- v- bound resource location image y offset
- width- the desired box width
- height- the desired box height
- textureWidth- the width of the box texture in the resource location image
- textureHeight- the height of the box texture in the resource location image
- topBorder- the size of the box's top border
- bottomBorder- the size of the box's bottom border
- leftBorder- the size of the box's left border
- rightBorder- the size of the box's right border
- zLevel- the zLevel to draw at
 
- 
blitWithBorderpublic static void blitWithBorder(GuiGraphics guiGraphics, int x, int y, int u, int v, int width, int height, int textureWidth, int textureHeight, int topBorder, int bottomBorder, int leftBorder, int rightBorder, float zLevel) Deprecated, for removal: This API element is subject to removal in a future version.Draws a textured box of any size (smallest size is borderSize * 2 square) based on a fixed size textured box with continuous borders and filler. It is assumed that the desired texture ResourceLocation object has been bound using Minecraft.getMinecraft().getTextureManager().bindTexture(resourceLocation).- Parameters:
- guiGraphics- the gui graphics
- x- x axis offset
- y- y axis offset
- u- bound resource location image x offset
- v- bound resource location image y offset
- width- the desired box width
- height- the desired box height
- textureWidth- the width of the box texture in the resource location image
- textureHeight- the height of the box texture in the resource location image
- topBorder- the size of the box's top border
- bottomBorder- the size of the box's bottom border
- leftBorder- the size of the box's left border
- rightBorder- the size of the box's right border
- zLevel- the zLevel to draw at
 
- 
drawTexturedModalRect@Deprecated(forRemoval=true) public static void drawTexturedModalRect(GuiGraphics guiGraphics, int x, int y, int u, int v, int width, int height, float zLevel) Deprecated, for removal: This API element is subject to removal in a future version.
- 
drawGradientRect@Deprecated(forRemoval=true) public static void drawGradientRect(org.joml.Matrix4f mat, int zLevel, int left, int top, int right, int bottom, int startColor, int endColor) Deprecated, for removal: This API element is subject to removal in a future version.
- 
blitInscribedpublic static void blitInscribed(GuiGraphics guiGraphics, ResourceLocation texture, int x, int y, int boundsWidth, int boundsHeight, int rectWidth, int rectHeight) Deprecated, for removal: This API element is subject to removal in a future version.
- 
blitInscribedpublic static void blitInscribed(GuiGraphics guiGraphics, ResourceLocation texture, int x, int y, int boundsWidth, int boundsHeight, int rectWidth, int rectHeight, boolean centerX, boolean centerY) Deprecated, for removal: This API element is subject to removal in a future version.
 
- 
IGuiGraphicsExtensioninstead