Lobbyscreen store fixes, sub name textbox & save button in sub editor, transitioncinematic on crew death, saving reactor state, radar marker position fix, minimap fix, button sounds, artifact positioning fix, better LegUp prevention method, some music clips when round ends

This commit is contained in:
Regalis
2016-01-03 01:13:32 +02:00
parent 8717a2259f
commit cb1513f5e6
32 changed files with 277 additions and 160 deletions
+12 -4
View File
@@ -16,8 +16,15 @@ namespace Barotrauma
BottomRight = (Bottom | Right), BottomLeft = (Bottom | Left), BottomCenter = (CenterX | Bottom)
}
public enum GUISoundType
{
Message = 0,
Click = 1
}
public class GUI
{
public static GUIStyle Style;
private static Texture2D t;
@@ -57,7 +64,8 @@ namespace Barotrauma
if (loadSounds)
{
sounds = new Sound[2];
sounds[0] = Sound.Load("Content/Sounds/UI/UImsg.ogg", false);
sounds[(int)GUISoundType.Message] = Sound.Load("Content/Sounds/UI/UImsg.ogg", false);
sounds[(int)GUISoundType.Click] = Sound.Load("Content/Sounds/UI/beep-shinymetal.ogg", false);
}
// create 1x1 texture for line drawing
@@ -391,12 +399,12 @@ namespace Barotrauma
currPos.Y += messages.Count * 30;
messages.Add(new GUIMessage(message, color, currPos, lifeTime));
if (playSound) PlayMessageSound();
if (playSound) PlayUISound(GUISoundType.Message);
}
public static void PlayMessageSound()
public static void PlayUISound(GUISoundType soundType)
{
sounds[0].Play();
sounds[(int)soundType].Play();
}
private static void DrawMessages(SpriteBatch spriteBatch, float deltaTime)