Skip to content

Commit

Permalink
gui fixes
Browse files Browse the repository at this point in the history
  • Loading branch information
bdew committed Jul 22, 2023
1 parent ee11718 commit 21d592b
Show file tree
Hide file tree
Showing 3 changed files with 2 additions and 2 deletions.
1 change: 1 addition & 0 deletions src/main/scala/net/bdew/lib/gui/BaseScreen.scala
Original file line number Diff line number Diff line change
Expand Up @@ -46,6 +46,7 @@ abstract class BaseScreen[T <: AbstractContainerMenu](container: T, playerInv: I
widgets.draw(graphics, mouse, pf)
val tip = ArrayBuffer.empty[Component]
widgets.handleTooltip(mouse, tip)
Color.white.activate()
if (tip.nonEmpty) {
import scala.jdk.CollectionConverters._
graphics.renderTooltip(getFontRenderer, tip.asJava, Optional.empty[TooltipComponent], mouseX, mouseY)
Expand Down
1 change: 0 additions & 1 deletion src/main/scala/net/bdew/lib/gui/DrawTarget.scala
Original file line number Diff line number Diff line change
Expand Up @@ -61,7 +61,6 @@ trait SimpleDrawTarget extends DrawTarget {
}

override def drawText(graphics: GuiGraphics, text: Component, p: Point, color: Color, shadow: Boolean): Unit = {
color.activate()
graphics.drawString(getFontRenderer, text, p.x.toInt, p.y.toInt, color.asARGB, shadow)
}

Expand Down
2 changes: 1 addition & 1 deletion src/main/scala/net/bdew/lib/gui/ModelDrawHelper.scala
Original file line number Diff line number Diff line change
Expand Up @@ -37,7 +37,7 @@ object ModelDrawHelper {
val pose = graphics.pose()

// Setup shader stuff
RenderSystem.setShader(() => GameRenderer.getPositionTexShader) // FIXME
RenderSystem.setShader(() => GameRenderer.getPositionColorTexShader)

// Make sure that block atlas is selected
RenderSystem.setShaderTexture(0, Client.blocksAtlas)
Expand Down

0 comments on commit 21d592b

Please sign in to comment.