Server-side file transfer UI, server notifies the recipient of a file transfer if the transfer is cancelled, fixed TextGetter not working on wrapped GUITextBlocks

This commit is contained in:
Regalis
2017-03-10 19:16:17 +02:00
parent 4f589603d1
commit a1342fdc45
4 changed files with 81 additions and 5 deletions
@@ -266,8 +266,11 @@ namespace Barotrauma.Networking
case (byte)FileTransferMessageType.Cancel:
byte sequenceChannel = inc.ReadByte();
var matchingTransfer = activeTransfers.Find(t => t.Connection == inc.SenderConnection && t.SequenceChannel == sequenceChannel);
if (matchingTransfer != null) StopTransfer(matchingTransfer);
if (matchingTransfer != null)
{
new GUIMessageBox("File transfer cancelled", "The server has cancelled the transfer of the file \"" + matchingTransfer.FileName + "\".");
StopTransfer(matchingTransfer);
}
break;
}
}