Merge branch 'master' into new-netcode
Conflicts: Subsurface/Source/GameMain.cs Subsurface/Source/Networking/ChatMessage.cs Subsurface/Source/Networking/NetworkMember.cs Subsurface/Source/Screens/NetLobbyScreen.cs
This commit is contained in:
@@ -207,31 +207,7 @@ namespace Barotrauma
|
||||
{
|
||||
y += child.Rect.Height + spacing;
|
||||
}
|
||||
|
||||
|
||||
if (scrollBar.IsHorizontal)
|
||||
{
|
||||
if (child.Rect.Right < rect.X) continue;
|
||||
if (child.Rect.Right > rect.Right) break;
|
||||
|
||||
if (child.Rect.X < rect.X && child.Rect.Right >= rect.X)
|
||||
{
|
||||
x = rect.X;
|
||||
continue;
|
||||
}
|
||||
}
|
||||
else
|
||||
{
|
||||
if (child.Rect.Y + child.Rect.Height < rect.Y) continue;
|
||||
if (child.Rect.Y + child.Rect.Height > rect.Y + rect.Height) break;
|
||||
|
||||
if (child.Rect.Y < rect.Y && child.Rect.Y + child.Rect.Height >= rect.Y)
|
||||
{
|
||||
y = rect.Y;
|
||||
continue;
|
||||
}
|
||||
}
|
||||
|
||||
|
||||
if (deltaTime>0.0f) child.Update(deltaTime);
|
||||
if (enabled && child.CanBeFocused &&
|
||||
(MouseOn == this || (MouseOn != null && this.IsParentOf(MouseOn))) && child.Rect.Contains(PlayerInput.MousePosition))
|
||||
@@ -407,6 +383,8 @@ namespace Barotrauma
|
||||
|
||||
if (!scrollBarHidden) scrollBar.Draw(spriteBatch);
|
||||
|
||||
GameMain.CurrGraphicsDevice.ScissorRectangle = frame.Rect;
|
||||
|
||||
int lastVisible = 0;
|
||||
for (int i = 0; i < children.Count; i++)
|
||||
{
|
||||
@@ -422,6 +400,8 @@ namespace Barotrauma
|
||||
lastVisible = i;
|
||||
child.Draw(spriteBatch);
|
||||
}
|
||||
|
||||
GameMain.CurrGraphicsDevice.ScissorRectangle = new Rectangle(0, 0, GameMain.GraphicsWidth, GameMain.GraphicsHeight);
|
||||
}
|
||||
|
||||
private bool IsChildVisible(GUIComponent child)
|
||||
@@ -431,22 +411,12 @@ namespace Barotrauma
|
||||
if (scrollBar.IsHorizontal)
|
||||
{
|
||||
if (child.Rect.Right < rect.X) return false;
|
||||
if (child.Rect.Right > rect.Right) return false;
|
||||
|
||||
if (child.Rect.X < rect.X && child.Rect.Right >= rect.X)
|
||||
{
|
||||
return false;
|
||||
}
|
||||
if (child.Rect.X > rect.Right) return false;
|
||||
}
|
||||
else
|
||||
{
|
||||
if (child.Rect.Y + child.Rect.Height < rect.Y) return false;
|
||||
if (child.Rect.Y + child.Rect.Height > rect.Y + rect.Height) return false;
|
||||
|
||||
if (child.Rect.Y < rect.Y && child.Rect.Y + child.Rect.Height >= rect.Y)
|
||||
{
|
||||
return false;
|
||||
}
|
||||
if (child.Rect.Bottom < rect.Y) return false;
|
||||
if (child.Rect.Y > rect.Bottom) return false;
|
||||
}
|
||||
|
||||
return true;
|
||||
|
||||
Reference in New Issue
Block a user