mirror of
https://github.com/MinecraftForge/MinecraftForge.git
synced 2026-11-12 16:27:47 +00:00
Add GuiContainerEvent.DrawBackground event. (#5595)
This commit is contained in:
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;
|
||||
}
|
||||
}
|
||||
}
|
||||
Reference in new issue
Block a user