Merge branch 'master' into new-netcode
Conflicts: Subsurface/Source/GUI/GUITextBlock.cs Subsurface/Source/GameMain.cs Subsurface/Source/Items/Components/Machines/Radar.cs Subsurface/Source/Networking/GameClient.cs
This commit is contained in:
@@ -383,7 +383,8 @@ namespace Barotrauma
|
||||
|
||||
if (!scrollBarHidden) scrollBar.Draw(spriteBatch);
|
||||
|
||||
GameMain.CurrGraphicsDevice.ScissorRectangle = frame.Rect;
|
||||
Rectangle prevScissorRect = spriteBatch.GraphicsDevice.ScissorRectangle;
|
||||
spriteBatch.GraphicsDevice.ScissorRectangle = frame.Rect;
|
||||
|
||||
int lastVisible = 0;
|
||||
for (int i = 0; i < children.Count; i++)
|
||||
@@ -400,8 +401,8 @@ namespace Barotrauma
|
||||
lastVisible = i;
|
||||
child.Draw(spriteBatch);
|
||||
}
|
||||
|
||||
GameMain.CurrGraphicsDevice.ScissorRectangle = new Rectangle(0, 0, GameMain.GraphicsWidth, GameMain.GraphicsHeight);
|
||||
|
||||
spriteBatch.GraphicsDevice.ScissorRectangle = prevScissorRect;
|
||||
}
|
||||
|
||||
private bool IsChildVisible(GUIComponent child)
|
||||
|
||||
@@ -276,10 +276,14 @@ namespace Barotrauma
|
||||
if (offset != Vector2.Zero) drawRect.Location += offset.ToPoint();
|
||||
|
||||
base.Draw(spriteBatch);
|
||||
|
||||
|
||||
if (TextGetter != null) Text = TextGetter();
|
||||
|
||||
if (overflowClipActive) GameMain.CurrGraphicsDevice.ScissorRectangle = rect;
|
||||
|
||||
Rectangle prevScissorRect = spriteBatch.GraphicsDevice.ScissorRectangle;
|
||||
if (overflowClipActive)
|
||||
{
|
||||
spriteBatch.GraphicsDevice.ScissorRectangle = rect;
|
||||
}
|
||||
|
||||
if (!string.IsNullOrEmpty(text))
|
||||
{
|
||||
@@ -291,7 +295,10 @@ namespace Barotrauma
|
||||
SpriteEffects.None, textDepth);
|
||||
}
|
||||
|
||||
if (overflowClipActive) GameMain.CurrGraphicsDevice.ScissorRectangle = new Rectangle(0, 0, GameMain.GraphicsWidth, GameMain.GraphicsHeight);
|
||||
if (overflowClipActive)
|
||||
{
|
||||
spriteBatch.GraphicsDevice.ScissorRectangle = prevScissorRect;
|
||||
}
|
||||
|
||||
DrawChildren(spriteBatch);
|
||||
|
||||
|
||||
Reference in New Issue
Block a user