Dust particles are drawn in the same batch as the background sprites (-> far-away particles are rendered behind the sprites), limiting character name length in the crew info menu, the "submarine not found in your folder" -tooltip is updated after downloading a sub file
This commit is contained in:
Binary file not shown.
|
Before Width: | Height: | Size: 799 KiB After Width: | Height: | Size: 2.8 MiB |
@@ -237,7 +237,7 @@ namespace Barotrauma
|
||||
|
||||
GUITextBlock textBlock = new GUITextBlock(
|
||||
new Rectangle(40, 0, 0, 25),
|
||||
character.Info.Name + " (" + character.Info.Job.Name + ")",
|
||||
ToolBox.LimitString(character.Info.Name + " (" + character.Info.Job.Name + ")", GUI.Font, frame.Rect.Width-20),
|
||||
Color.Transparent, Color.White,
|
||||
Alignment.Left, Alignment.Left,
|
||||
null, frame);
|
||||
|
||||
@@ -124,21 +124,15 @@ namespace Barotrauma
|
||||
|
||||
if (backgroundCreatureManager!=null) backgroundCreatureManager.Draw(spriteBatch);
|
||||
|
||||
spriteBatch.End();
|
||||
|
||||
spriteBatch.Begin(SpriteSortMode.BackToFront,
|
||||
BlendState.Additive,
|
||||
SamplerState.LinearWrap, DepthStencilState.Default, null, null,
|
||||
cam.Transform);
|
||||
|
||||
for (int i = 1; i < 4; i++)
|
||||
for (int i = 0; i < 4; i++)
|
||||
{
|
||||
float scale = 1.0f - i * 0.2f;
|
||||
|
||||
//alpha goes from 1.0 to 0.0 when scale is in the range of 0.2-0.1
|
||||
float alpha = (cam.Zoom * scale) < 0.2f ? (cam.Zoom * scale - 0.1f) * 10.0f : 1.0f;
|
||||
if (alpha <= 0.0f) continue;
|
||||
|
||||
|
||||
Vector2 offset = (new Vector2(cam.WorldViewCenter.X, cam.WorldViewCenter.Y) + dustOffset) * scale;
|
||||
Vector3 origin = new Vector3(cam.WorldView.Width, cam.WorldView.Height, 0.0f) * 0.5f;
|
||||
|
||||
@@ -151,11 +145,11 @@ namespace Barotrauma
|
||||
spriteBatch.Draw(dustParticles.Texture,
|
||||
new Vector2(cam.WorldViewCenter.X, -cam.WorldViewCenter.Y),
|
||||
dustParticles.SourceRect, Color.White * alpha, 0.0f,
|
||||
new Vector2(cam.WorldView.Width, cam.WorldView.Height) * 0.5f / scale, scale, SpriteEffects.None, 0);
|
||||
new Vector2(cam.WorldView.Width, cam.WorldView.Height) * 0.5f / scale, scale, SpriteEffects.None, 1.0f - scale);
|
||||
}
|
||||
|
||||
spriteBatch.End();
|
||||
|
||||
|
||||
RenderWalls(GameMain.CurrGraphicsDevice, cam);
|
||||
}
|
||||
|
||||
|
||||
@@ -998,21 +998,21 @@ namespace Barotrauma.Networking
|
||||
switch (receiver.FileType)
|
||||
{
|
||||
case FileTransferMessageType.Submarine:
|
||||
Submarine.SavedSubmarines.RemoveAll(s => s.Name + ".sub" == receiver.FileName);
|
||||
Submarine.SavedSubmarines.RemoveAll(s => s.Name + ".sub" == receiver.FileName);
|
||||
|
||||
for (int i = 0; i<2; i++)
|
||||
{
|
||||
|
||||
var textBlock = (i == 0) ?
|
||||
var textBlock = ((i == 0) ?
|
||||
GameMain.NetLobbyScreen.ShuttleList.ListBox.children.Find(c => (c.UserData as Submarine).Name+".sub" == receiver.FileName) :
|
||||
GameMain.NetLobbyScreen.SubList.children.Find(c => (c.UserData as Submarine).Name+".sub" == receiver.FileName);
|
||||
GameMain.NetLobbyScreen.SubList.children.Find(c => (c.UserData as Submarine).Name+".sub" == receiver.FileName)) as GUITextBlock;
|
||||
if (textBlock == null) continue;
|
||||
|
||||
(textBlock as GUITextBlock).TextColor = Color.White;
|
||||
textBlock.TextColor = Color.White;
|
||||
|
||||
var newSub = new Submarine(receiver.FilePath);
|
||||
Submarine.SavedSubmarines.Add(newSub);
|
||||
textBlock.UserData = newSub;
|
||||
textBlock.ToolTip = newSub.Description;
|
||||
}
|
||||
|
||||
break;
|
||||
|
||||
Reference in New Issue
Block a user