(3b3130a00) Added an option to disable mouselook, let camera zoom further when controlling a large monster

This commit is contained in:
Joonas Rikkonen
2019-04-03 16:23:23 +03:00
parent d66a49bb7c
commit 98cf26178f
5 changed files with 71 additions and 11 deletions
@@ -426,7 +426,7 @@ namespace Barotrauma
muteOnFocusLostBox.OnSelected = (tickBox) =>
{
MuteOnFocusLost = tickBox.Selected;
UnsavedSettings = true;
return true;
};
@@ -593,7 +593,39 @@ namespace Barotrauma
/// Controls tab -------------------------------------------------------------
var controlsLayoutGroup = new GUILayoutGroup(new RectTransform(new Vector2(0.95f, 0.95f), tabs[(int)Tab.Controls].RectTransform, Anchor.Center))
{ RelativeSpacing = 0.01f };
{ RelativeSpacing = 0.03f, Stretch = true };
GUITextBlock aimAssistText = new GUITextBlock(new RectTransform(new Vector2(1.0f, 0.05f), controlsLayoutGroup.RectTransform), TextManager.Get("AimAssist"))
{
ToolTip = TextManager.Get("AimAssistToolTip")
};
GUIScrollBar aimAssistSlider = new GUIScrollBar(new RectTransform(new Vector2(1.0f, 0.05f), controlsLayoutGroup.RectTransform),
barSize: 0.05f)
{
UserData = aimAssistText,
BarScroll = MathUtils.InverseLerp(0.0f, 5.0f, AimAssistAmount),
ToolTip = TextManager.Get("AimAssistToolTip"),
OnMoved = (scrollBar, scroll) =>
{
ChangeSliderText(scrollBar, scroll);
AimAssistAmount = MathHelper.Lerp(0.0f, 5.0f, scroll);
return true;
},
Step = 0.1f
};
aimAssistSlider.OnMoved(aimAssistSlider, aimAssistSlider.BarScroll);
new GUITickBox(new RectTransform(new Vector2(0.5f, 0.05f), controlsLayoutGroup.RectTransform), TextManager.Get("EnableMouseLook"))
{
ToolTip = TextManager.Get("EnableMouseLookToolTip"),
Selected = EnableMouseLook,
OnSelected = (tickBox) =>
{
EnableMouseLook = tickBox.Selected;
UnsavedSettings = true;
return true;
}
};
var inputFrame = new GUILayoutGroup(new RectTransform(new Vector2(1.0f, 0.8f), controlsLayoutGroup.RectTransform))
{ Stretch = true };
@@ -631,6 +663,9 @@ namespace Barotrauma
//spacing
new GUIFrame(new RectTransform(new Vector2(1.0f, 0.02f), generalLayoutGroup.RectTransform), style: null);
//spacing
new GUIFrame(new RectTransform(new Vector2(1.0f, 0.02f), generalLayoutGroup.RectTransform), style: null);
new GUIButton(new RectTransform(new Vector2(0.4f, 1.0f), buttonArea.RectTransform, Anchor.BottomLeft),
TextManager.Get("Cancel"), style: "GUIButtonLarge")
{