#how would i add a background

10 messages · Page 1 of 1 (latest)

severe patrol
#

So im trying to make a box with text in it, but it doesn't work, does anyone know how?
It needs to be the same type of rendering so with HudRenderCallback.EVENT.register

urban vigil
#

draw the texture at a given Z level
draw the text at a higher z level
you can matrixstack translate the z

severe patrol
#

alr thanks!

urban vigil
#

dont forget to push the stack at the beginning of your method and pop it at the end to restore it to the original

severe patrol
#

how would i do that do i do .getmatrices()?

#

ij

urban vigil
#

yeah.

MatrixStack matrices = context.getMatrices();
matrices.push()
contex.drawTexture(...)
matrices.translate(0,0,50)
context.drawText(...)
matrices.pop()
#

something similar to that

severe patrol
#

ok thanks for providing a sample

#

thank you!