Fixed PlayUISound crashing the launcher, generatic ladder waypoints, AICharacter sync bugfix, chatbox resizing according to resolution
This commit is contained in:
@@ -404,7 +404,12 @@ namespace Barotrauma
|
||||
|
||||
public static void PlayUISound(GUISoundType soundType)
|
||||
{
|
||||
sounds[(int)soundType].Play();
|
||||
if (sounds == null) return;
|
||||
|
||||
int soundIndex = (int)soundType;
|
||||
if (soundIndex < 0 || soundIndex >= sounds.Length) return;
|
||||
|
||||
sounds[soundIndex].Play();
|
||||
}
|
||||
|
||||
private static void DrawMessages(SpriteBatch spriteBatch, float deltaTime)
|
||||
|
||||
@@ -40,9 +40,8 @@ namespace Barotrauma
|
||||
box = new GUIFrame(rect, Color.DarkGray, null, this);
|
||||
box.HoverColor = Color.Gray;
|
||||
box.SelectedColor = Color.DarkGray;
|
||||
|
||||
|
||||
text = new GUITextBlock(new Rectangle(rect.X + 40, rect.Y, 200, rect.Height), label, Color.Transparent, Color.White, Alignment.TopLeft, null, this);
|
||||
|
||||
text = new GUITextBlock(new Rectangle(rect.X + 30, rect.Y+2, 200, rect.Height), label, Color.Transparent, Color.White, Alignment.TopLeft, null, this);
|
||||
|
||||
this.rect = new Rectangle(box.Rect.X, box.Rect.Y, 240, rect.Height);
|
||||
|
||||
|
||||
Reference in New Issue
Block a user