Apply window resizing to all gui layers (#8207)

This commit is contained in:
MelanX authored and GitHub committed 2021-11-21 13:28:56 +01:00
1 parent c24d05173f
commit 55db597baa
2 files changed
+10 -1

No files matched your search

@@ -185,7 +185,12 @@
}
if (this.f_91056_ != null) {
@@ -1136,6 +_,7 @@
@@ -1132,10 +_,12 @@
this.f_90990_.m_85378_((double)i);
if (this.f_91080_ != null) {
this.f_91080_.m_6574_(this, this.f_90990_.m_85445_(), this.f_90990_.m_85446_());
+ net.minecraftforge.client.ForgeHooksClient.resizeGuiLayers(this, this.f_90990_.m_85445_(), this.f_90990_.m_85446_());
}
RenderTarget rendertarget = this.m_91385_();
rendertarget.m_83941_(this.f_90990_.m_85441_(), this.f_90990_.m_85442_(), f_91002_);
@@ -172,6 +172,10 @@ public class ForgeHooksClient
*/
private static final Stack<Screen> guiLayers = new Stack<>();
public static void resizeGuiLayers(Minecraft minecraft, int width, int height) {
guiLayers.forEach(screen -> screen.resize(minecraft, width, height));
}
public static void clearGuiLayers(Minecraft minecraft)
{
while(guiLayers.size() > 0)