"Suicide button" is also usable in single player, unconscious characters can't be selected in sp, fixed resizing textblocks with wrapped text
This commit is contained in:
@@ -70,6 +70,8 @@ namespace Barotrauma
|
||||
LargeFont = ToolBox.TryLoadFont("LargeFont", content);
|
||||
|
||||
cursor = new Sprite("Content/UI/cursor.png", Vector2.Zero);
|
||||
|
||||
Style = new GUIStyle("Content/UI/style.xml");
|
||||
}
|
||||
|
||||
public static bool PauseMenuOpen
|
||||
@@ -107,8 +109,6 @@ namespace Barotrauma
|
||||
|
||||
SpeechBubbleIcon = new Sprite("Content/UI/uiIcons.png", new Rectangle(0, 129, 65, 61), null);
|
||||
SpeechBubbleIcon.Origin = SpeechBubbleIcon.size / 2;
|
||||
|
||||
Style = new GUIStyle("Content/UI/style.xml");
|
||||
}
|
||||
|
||||
public static void TogglePauseMenu()
|
||||
|
||||
@@ -230,8 +230,8 @@ namespace Barotrauma
|
||||
}
|
||||
|
||||
scrollBar.BarSize = scrollBar.IsHorizontal ?
|
||||
Math.Min((float)rect.Width / (float)totalSize, 1.0f) :
|
||||
Math.Min((float)rect.Height / (float)totalSize, 1.0f);
|
||||
Math.Max(Math.Min((float)rect.Width / (float)totalSize, 1.0f), 5.0f / rect.Width) :
|
||||
Math.Max(Math.Min((float)rect.Height / (float)totalSize, 1.0f), 5.0f / rect.Height);
|
||||
|
||||
if (scrollBar.BarSize < 1.0f && scrollBarHidden) ShowScrollBar();
|
||||
if (scrollBar.BarSize >= 1.0f && !scrollBarHidden) HideScrollBar();
|
||||
|
||||
@@ -159,7 +159,7 @@ namespace Barotrauma
|
||||
|
||||
if (rect.Height == 0 && !string.IsNullOrWhiteSpace(Text))
|
||||
{
|
||||
this.rect.Height = (int)Font.MeasureString(Text).Y;
|
||||
this.rect.Height = (int)Font.MeasureString(wrappedText).Y;
|
||||
}
|
||||
}
|
||||
|
||||
|
||||
Reference in New Issue
Block a user