Unstable 0.1300.0.4

This commit is contained in:
Markus Isberg
2021-03-30 15:51:49 +03:00
parent 58c50a235d
commit 862221635c
108 changed files with 907 additions and 378 deletions
@@ -60,10 +60,15 @@ namespace Barotrauma
public static void Create(SubmarineInfo submarineInfo)
{
instance?.Dispose();
Close();
instance = new SubmarinePreview(submarineInfo);
}
public static void Close()
{
instance?.Dispose();
}
private SubmarinePreview(SubmarineInfo subInfo)
{
camera = new Camera();
@@ -102,7 +107,7 @@ namespace Barotrauma
},
(deltaTime, component) => {
bool isMouseOnComponent = GUI.MouseOn == component;
camera.MoveCamera(deltaTime, allowZoom: isMouseOnComponent);
camera.MoveCamera(deltaTime, allowZoom: isMouseOnComponent, followSub: false);
if (isMouseOnComponent &&
(PlayerInput.MidButtonHeld() || PlayerInput.LeftButtonHeld()))
{
@@ -136,7 +141,7 @@ namespace Barotrauma
ScrollBarVisible = false,
Spacing = 5
};
subInfo.CreateSpecsWindow(specsContainer, GUI.Font, includeTitle: false, includesDescription: true);
subInfo.CreateSpecsWindow(specsContainer, GUI.Font, includeTitle: false, includeDescription: true);
int width = specsContainer.Rect.Width;
void recalculateSpecsContainerHeight()
{