Merge branch 'master' of https://github.com/Regalis11/Barotrauma.git
This commit is contained in:
@@ -921,7 +921,7 @@ namespace Barotrauma
|
||||
toggleEntityMenuButton = new GUIButton(new RectTransform(new Vector2(0.15f, 0.08f), EntityMenu.RectTransform, Anchor.TopCenter, Pivot.BottomCenter) { MinSize = new Point(0, 15) },
|
||||
style: "UIToggleButtonVertical")
|
||||
{
|
||||
ToolTip = RichString.Rich(TextManager.Get("EntityMenuToggleTooltip") + "‖color:125,125,125‖\nQ‖color:end‖"),
|
||||
ToolTip = RichString.Rich($"{TextManager.Get("EntityMenuToggleTooltip")}\n‖color:125,125,125‖{GameSettings.CurrentConfig.KeyMap.Bindings[InputType.ToggleInventory].Name}‖color:end‖"),
|
||||
OnClicked = (btn, userdata) =>
|
||||
{
|
||||
entityMenuOpen = !entityMenuOpen;
|
||||
@@ -1822,7 +1822,7 @@ namespace Barotrauma
|
||||
{
|
||||
if (Submarine.GetLightCount() > MaxLights)
|
||||
{
|
||||
new GUIMessageBox(TextManager.Get("error"), TextManager.GetWithVariable("subeditor.lightcounterror", "[max]", MaxShadowCastingLights.ToString()));
|
||||
new GUIMessageBox(TextManager.Get("error"), TextManager.GetWithVariable("subeditor.lightcounterror", "[max]", MaxLights.ToString()));
|
||||
return false;
|
||||
}
|
||||
|
||||
@@ -2530,6 +2530,27 @@ namespace Barotrauma
|
||||
}
|
||||
};
|
||||
|
||||
var outFittingArea = new GUILayoutGroup(new RectTransform(new Vector2(1.0f, 0.25f), subSettingsContainer.RectTransform), isHorizontal: true, childAnchor: Anchor.CenterLeft)
|
||||
{
|
||||
Stretch = true,
|
||||
AbsoluteSpacing = 5
|
||||
};
|
||||
new GUITextBlock(new RectTransform(new Vector2(0.6f, 1.0f), outFittingArea.RectTransform),
|
||||
TextManager.Get("ManuallyOutfitted"), textAlignment: Alignment.CenterLeft, wrap: true, font: GUIStyle.SmallFont)
|
||||
{
|
||||
ToolTip = TextManager.Get("manuallyoutfittedtooltip")
|
||||
};
|
||||
new GUITickBox(new RectTransform((0.4f, 1.0f), outFittingArea.RectTransform), "")
|
||||
{
|
||||
ToolTip = TextManager.Get("manuallyoutfittedtooltip"),
|
||||
Selected = MainSub.Info.IsManuallyOutfitted,
|
||||
OnSelected = box =>
|
||||
{
|
||||
MainSub.Info.IsManuallyOutfitted = box.Selected;
|
||||
return true;
|
||||
}
|
||||
};
|
||||
|
||||
if (MainSub != null)
|
||||
{
|
||||
int min = MainSub.Info.RecommendedCrewSizeMin;
|
||||
@@ -2832,7 +2853,7 @@ namespace Barotrauma
|
||||
};
|
||||
|
||||
var saveButton = new GUIButton(new RectTransform(new Vector2(0.3f, 1.0f), buttonArea.RectTransform, Anchor.BottomRight),
|
||||
TextManager.Get("SaveSubButton"))
|
||||
TextManager.Get("SaveSubButton").Fallback(TextManager.Get("save")))
|
||||
{
|
||||
OnClicked = (button, o) => SaveSub(packageToSaveInList.SelectedData as ContentPackage)
|
||||
};
|
||||
@@ -3510,8 +3531,11 @@ namespace Barotrauma
|
||||
modProject.RemoveFile(modProject.Files.First(f => ContentPath.FromRaw(subPackage, f.Path) == sub.FilePath));
|
||||
modProject.Save(subPackage.Path);
|
||||
ReloadModifiedPackage(subPackage);
|
||||
}
|
||||
|
||||
if (MainSub?.Info != null && MainSub.Info.FilePath == sub.FilePath)
|
||||
{
|
||||
MainSub.Info.FilePath = null;
|
||||
}
|
||||
}
|
||||
sub.Dispose();
|
||||
CreateLoadScreen();
|
||||
}
|
||||
@@ -5044,8 +5068,8 @@ namespace Barotrauma
|
||||
|
||||
hullVolumeFrame.Visible = MapEntity.SelectedList.Any(s => s is Hull);
|
||||
hullVolumeFrame.RectTransform.AbsoluteOffset = new Point(Math.Max(showEntitiesPanel.Rect.Right, previouslyUsedPanel.Rect.Right), 0);
|
||||
saveAssemblyFrame.Visible = MapEntity.SelectedList.Count > 0;
|
||||
snapToGridFrame.Visible = MapEntity.SelectedList.Count > 0;
|
||||
saveAssemblyFrame.Visible = MapEntity.SelectedList.Count > 0 && !WiringMode;
|
||||
snapToGridFrame.Visible = MapEntity.SelectedList.Count > 0 && !WiringMode;
|
||||
|
||||
var offset = cam.WorldView.Top - cam.ScreenToWorld(new Vector2(0, GameMain.GraphicsHeight - EntityMenu.Rect.Top)).Y;
|
||||
|
||||
@@ -5171,7 +5195,7 @@ namespace Barotrauma
|
||||
}
|
||||
}
|
||||
|
||||
if (PlayerInput.KeyHit(Keys.Q) && mode == Mode.Default)
|
||||
if (GameSettings.CurrentConfig.KeyMap.Bindings[InputType.ToggleInventory].IsHit() && mode == Mode.Default)
|
||||
{
|
||||
toggleEntityMenuButton.OnClicked?.Invoke(toggleEntityMenuButton, toggleEntityMenuButton.UserData);
|
||||
}
|
||||
|
||||
Reference in New Issue
Block a user