Add GuiContainerEvent.DrawBackground event. (#5595)

This commit is contained in:
Lars Gerrits authored and LexManos committed 2019-04-15 18:56:58 -07:00
1 parent bbc92fa51c
commit 273b1b110a
2 files changed
+56 -14

No files matched your search

@@ -75,4 +75,38 @@ public class GuiContainerEvent extends Event
return mouseY;
}
}
/**
* This event is fired directly after the GuiContainer has draw any background elements,
* This is useful for drawing new background elements.
*/
public static class DrawBackground extends GuiContainerEvent
{
private final int mouseX;
private final int mouseY;
/**
* Called directly after the GuiContainer has drawn any background elements.
*
* @param guiContainer The container.
* @param mouseX The current X position of the players mouse.
* @param mouseY The current Y position of the players mouse.
*/
public DrawBackground(GuiContainer guiContainer, int mouseX, int mouseY)
{
super(guiContainer);
this.mouseX = mouseX;
this.mouseY = mouseY;
}
public int getMouseX()
{
return mouseX;
}
public int getMouseY()
{
return mouseY;
}
}
}