Fix text overflow in flag import dialog (#608)

This commit is contained in:
pizzaboxer 2023-10-25 14:22:53 +01:00
parent c4d3c5b64f
commit 499a0f9861
No known key found for this signature in database
GPG Key ID: 59D4A1DBAD0F2BA8

View File

@ -271,14 +271,17 @@ namespace Bloxstrap.UI.Elements.Menu.Pages
if (conflictingFlags.Any()) if (conflictingFlags.Any())
{ {
var result = Controls.ShowMessageBox( int count = conflictingFlags.Count();
"Some of the flags you are attempting to import already have set values. Would you like to overwrite their current values with the ones defined in the import?\n" +
string message = "Some of the flags you are attempting to import already have set values. Would you like to overwrite their current values with the ones defined in the import?\n" +
"\n" + "\n" +
"Conflicting flags:\n" + $"There are {count} conflicting flag definitions:\n" +
String.Join(", ", conflictingFlags), String.Join(", ", conflictingFlags.Take(25));
MessageBoxImage.Question,
MessageBoxButton.YesNo if (count > 25)
); message += "...";
var result = Controls.ShowMessageBox(message, MessageBoxImage.Question, MessageBoxButton.YesNo);
overwriteConflicting = result == MessageBoxResult.Yes; overwriteConflicting = result == MessageBoxResult.Yes;
} }