Build 0.18.2.0
This commit is contained in:
+1
-1
@@ -2280,7 +2280,7 @@ namespace Barotrauma.CharacterEditor
|
||||
var colorLabel = new GUITextBlock(new RectTransform(new Vector2(0.3f, 1), element.RectTransform, Anchor.CenterLeft), colorComponentLabels[i],
|
||||
font: GUIStyle.SmallFont, textAlignment: Alignment.CenterLeft);
|
||||
GUINumberInput numberInput = new GUINumberInput(new RectTransform(new Vector2(0.7f, 1), element.RectTransform, Anchor.CenterRight),
|
||||
GUINumberInput.NumberType.Int, relativeButtonAreaWidth: 0.25f)
|
||||
NumberType.Int, relativeButtonAreaWidth: 0.25f)
|
||||
{
|
||||
Font = GUIStyle.SmallFont
|
||||
};
|
||||
|
||||
@@ -523,7 +523,7 @@ namespace Barotrauma.CharacterEditor
|
||||
{
|
||||
var element = new GUIFrame(new RectTransform(new Vector2(0.22f, 1), inputArea.RectTransform) { MinSize = new Point(50, 0), MaxSize = new Point(150, 50) }, style: null);
|
||||
new GUITextBlock(new RectTransform(new Vector2(0.3f, 1), element.RectTransform, Anchor.CenterLeft), GUI.RectComponentLabels[i], font: GUIStyle.SmallFont, textAlignment: Alignment.CenterLeft);
|
||||
GUINumberInput numberInput = new GUINumberInput(new RectTransform(new Vector2(0.7f, 1), element.RectTransform, Anchor.CenterRight), GUINumberInput.NumberType.Int)
|
||||
GUINumberInput numberInput = new GUINumberInput(new RectTransform(new Vector2(0.7f, 1), element.RectTransform, Anchor.CenterRight), NumberType.Int)
|
||||
{
|
||||
Font = GUIStyle.SmallFont
|
||||
};
|
||||
@@ -863,7 +863,7 @@ namespace Barotrauma.CharacterEditor
|
||||
var limbTypeField = GUI.CreateEnumField(limbType, elementSize, GetCharacterEditorTranslation("LimbType"), group.RectTransform, font: GUIStyle.Font);
|
||||
var sourceRectField = GUI.CreateRectangleField(sourceRect ?? new Rectangle(0, 100 * LimbGUIElements.Count, 100, 100), elementSize, GetCharacterEditorTranslation("SourceRectangle"), group.RectTransform, font: GUIStyle.Font);
|
||||
new GUITextBlock(new RectTransform(new Vector2(0.5f, 1), idField.RectTransform, Anchor.TopLeft), GetCharacterEditorTranslation("ID"));
|
||||
new GUINumberInput(new RectTransform(new Vector2(0.5f, 1), idField.RectTransform, Anchor.TopRight), GUINumberInput.NumberType.Int)
|
||||
new GUINumberInput(new RectTransform(new Vector2(0.5f, 1), idField.RectTransform, Anchor.TopRight), NumberType.Int)
|
||||
{
|
||||
MinValueInt = 0,
|
||||
MaxValueInt = byte.MaxValue,
|
||||
@@ -912,7 +912,7 @@ namespace Barotrauma.CharacterEditor
|
||||
};
|
||||
var limb1Field = new GUIFrame(new RectTransform(new Point(group.Rect.Width, elementSize), group.RectTransform), style: null);
|
||||
new GUITextBlock(new RectTransform(new Vector2(0.5f, 1), limb1Field.RectTransform, Anchor.TopLeft), GetCharacterEditorTranslation("LimbWithIndex").Replace("[index]", "1"));
|
||||
var limb1InputField = new GUINumberInput(new RectTransform(new Vector2(0.5f, 1), limb1Field.RectTransform, Anchor.TopRight), GUINumberInput.NumberType.Int)
|
||||
var limb1InputField = new GUINumberInput(new RectTransform(new Vector2(0.5f, 1), limb1Field.RectTransform, Anchor.TopRight), NumberType.Int)
|
||||
{
|
||||
MinValueInt = 0,
|
||||
MaxValueInt = byte.MaxValue,
|
||||
@@ -920,7 +920,7 @@ namespace Barotrauma.CharacterEditor
|
||||
};
|
||||
var limb2Field = new GUIFrame(new RectTransform(new Point(group.Rect.Width, elementSize), group.RectTransform), style: null);
|
||||
new GUITextBlock(new RectTransform(new Vector2(0.5f, 1), limb2Field.RectTransform, Anchor.TopLeft), GetCharacterEditorTranslation("LimbWithIndex").Replace("[index]", "2"));
|
||||
var limb2InputField = new GUINumberInput(new RectTransform(new Vector2(0.5f, 1), limb2Field.RectTransform, Anchor.TopRight), GUINumberInput.NumberType.Int)
|
||||
var limb2InputField = new GUINumberInput(new RectTransform(new Vector2(0.5f, 1), limb2Field.RectTransform, Anchor.TopRight), NumberType.Int)
|
||||
{
|
||||
MinValueInt = 0,
|
||||
MaxValueInt = byte.MaxValue,
|
||||
|
||||
@@ -38,9 +38,9 @@ namespace Barotrauma
|
||||
}
|
||||
|
||||
// attach number inputs to our generated parent elements
|
||||
var rInput = new GUINumberInput(new RectTransform(new Vector2(0.7f, 1f), layoutParents[0].RectTransform), GUINumberInput.NumberType.Int) { IntValue = BackgroundColor.R };
|
||||
var gInput = new GUINumberInput(new RectTransform(new Vector2(0.7f, 1f), layoutParents[1].RectTransform), GUINumberInput.NumberType.Int) { IntValue = BackgroundColor.G };
|
||||
var bInput = new GUINumberInput(new RectTransform(new Vector2(0.7f, 1f), layoutParents[2].RectTransform), GUINumberInput.NumberType.Int) { IntValue = BackgroundColor.B };
|
||||
var rInput = new GUINumberInput(new RectTransform(new Vector2(0.7f, 1f), layoutParents[0].RectTransform), NumberType.Int) { IntValue = BackgroundColor.R };
|
||||
var gInput = new GUINumberInput(new RectTransform(new Vector2(0.7f, 1f), layoutParents[1].RectTransform), NumberType.Int) { IntValue = BackgroundColor.G };
|
||||
var bInput = new GUINumberInput(new RectTransform(new Vector2(0.7f, 1f), layoutParents[2].RectTransform), NumberType.Int) { IntValue = BackgroundColor.B };
|
||||
|
||||
rInput.MinValueInt = gInput.MinValueInt = bInput.MinValueInt = 0;
|
||||
rInput.MaxValueInt = gInput.MaxValueInt = bInput.MaxValueInt = 255;
|
||||
|
||||
@@ -818,7 +818,7 @@ namespace Barotrauma
|
||||
}
|
||||
else if (type == typeof(float) || type == typeof(int))
|
||||
{
|
||||
GUINumberInput valueInput = new GUINumberInput(new RectTransform(Vector2.One, layout.RectTransform), GUINumberInput.NumberType.Float) { FloatValue = (float) (newValue ?? 0.0f) };
|
||||
GUINumberInput valueInput = new GUINumberInput(new RectTransform(Vector2.One, layout.RectTransform), NumberType.Float) { FloatValue = (float) (newValue ?? 0.0f) };
|
||||
valueInput.OnValueChanged += component => { newValue = component.FloatValue; };
|
||||
}
|
||||
else if (type == typeof(bool))
|
||||
|
||||
@@ -40,6 +40,8 @@ namespace Barotrauma
|
||||
|
||||
private readonly Color[] tunnelDebugColors = new Color[] { Color.White, Color.Cyan, Color.LightGreen, Color.Red, Color.LightYellow, Color.LightSeaGreen };
|
||||
|
||||
private LevelData currentLevelData;
|
||||
|
||||
public LevelEditorScreen()
|
||||
{
|
||||
Cam = new Camera()
|
||||
@@ -59,8 +61,9 @@ namespace Barotrauma
|
||||
paramsList.OnSelected += (GUIComponent component, object obj) =>
|
||||
{
|
||||
selectedParams = obj as LevelGenerationParams;
|
||||
currentLevelData = LevelData.CreateRandom(seedBox.Text, generationParams: selectedParams);
|
||||
editorContainer.ClearChildren();
|
||||
SortLevelObjectsList(selectedParams);
|
||||
SortLevelObjectsList(currentLevelData);
|
||||
new SerializableEntityEditor(editorContainer.Content.RectTransform, selectedParams, false, true, elementHeight: 20);
|
||||
return true;
|
||||
};
|
||||
@@ -149,7 +152,7 @@ namespace Barotrauma
|
||||
{
|
||||
OnClicked = (button, userData) =>
|
||||
{
|
||||
if(seedBox == null) { return false; }
|
||||
if (seedBox == null) { return false; }
|
||||
seedBox.Text = GetLevelSeed();
|
||||
return true;
|
||||
}
|
||||
@@ -184,10 +187,10 @@ namespace Barotrauma
|
||||
bool wasLevelLoaded = Level.Loaded != null;
|
||||
Submarine.Unload();
|
||||
GameMain.LightManager.ClearLights();
|
||||
LevelData levelData = LevelData.CreateRandom(seedBox.Text, generationParams: selectedParams);
|
||||
levelData.ForceOutpostGenerationParams = outpostParamsList.SelectedData as OutpostGenerationParams;
|
||||
levelData.AllowInvalidOutpost = allowInvalidOutpost.Selected;
|
||||
Level.Generate(levelData, mirror: mirrorLevel.Selected);
|
||||
currentLevelData = LevelData.CreateRandom(seedBox.Text, generationParams: selectedParams);
|
||||
currentLevelData.ForceOutpostGenerationParams = outpostParamsList.SelectedData as OutpostGenerationParams;
|
||||
currentLevelData.AllowInvalidOutpost = allowInvalidOutpost.Selected;
|
||||
Level.Generate(currentLevelData, mirror: mirrorLevel.Selected);
|
||||
GameMain.LightManager.AddLight(pointerLightSource);
|
||||
if (!wasLevelLoaded || Cam.Position.X < 0 || Cam.Position.Y < 0 || Cam.Position.Y > Level.Loaded.Size.X || Cam.Position.Y > Level.Loaded.Size.Y)
|
||||
{
|
||||
@@ -417,11 +420,11 @@ namespace Barotrauma
|
||||
};
|
||||
new GUITextBlock(new RectTransform(new Vector2(1.0f, 0.4f), commonnessContainer.RectTransform),
|
||||
TextManager.GetWithVariable("leveleditor.levelobjcommonness", "[leveltype]", selectedParams.Identifier.Value), textAlignment: Alignment.Center);
|
||||
new GUINumberInput(new RectTransform(new Vector2(0.5f, 0.4f), commonnessContainer.RectTransform), GUINumberInput.NumberType.Float)
|
||||
new GUINumberInput(new RectTransform(new Vector2(0.5f, 0.4f), commonnessContainer.RectTransform), NumberType.Float)
|
||||
{
|
||||
MinValueFloat = 0,
|
||||
MaxValueFloat = 100,
|
||||
FloatValue = caveGenerationParams.GetCommonness(selectedParams, abyss: false),
|
||||
FloatValue = caveGenerationParams.GetCommonness(currentLevelData, abyss: false),
|
||||
OnValueChanged = (numberInput) =>
|
||||
{
|
||||
caveGenerationParams.OverrideCommonness[selectedParams.Identifier] = numberInput.FloatValue;
|
||||
@@ -482,7 +485,7 @@ namespace Barotrauma
|
||||
{
|
||||
var moduleCountGroup = new GUILayoutGroup(new RectTransform(new Point(editorContainer.Content.Rect.Width, (int)(25 * GUI.Scale))), isHorizontal: true, childAnchor: Anchor.CenterLeft);
|
||||
new GUITextBlock(new RectTransform(new Vector2(0.5f, 1f), moduleCountGroup.RectTransform), TextManager.Capitalize(moduleCount.Key.Value), textAlignment: Alignment.CenterLeft);
|
||||
new GUINumberInput(new RectTransform(new Vector2(0.5f, 1f), moduleCountGroup.RectTransform), GUINumberInput.NumberType.Int)
|
||||
new GUINumberInput(new RectTransform(new Vector2(0.5f, 1f), moduleCountGroup.RectTransform), NumberType.Int)
|
||||
{
|
||||
MinValueInt = 0,
|
||||
MaxValueInt = 100,
|
||||
@@ -542,7 +545,7 @@ namespace Barotrauma
|
||||
if (selectedParams != null) { availableIdentifiers.Add(selectedParams.Identifier); }
|
||||
foreach (var caveParam in CaveGenerationParams.CaveParams)
|
||||
{
|
||||
if (selectedParams != null && caveParam.GetCommonness(selectedParams, abyss: false) <= 0.0f) { continue; }
|
||||
if (selectedParams != null && caveParam.GetCommonness(currentLevelData, abyss: false) <= 0.0f) { continue; }
|
||||
availableIdentifiers.Add(caveParam.Identifier);
|
||||
}
|
||||
availableIdentifiers.Reverse();
|
||||
@@ -557,11 +560,11 @@ namespace Barotrauma
|
||||
};
|
||||
new GUITextBlock(new RectTransform(new Vector2(1.0f, 0.4f), commonnessContainer.RectTransform),
|
||||
TextManager.GetWithVariable("leveleditor.levelobjcommonness", "[leveltype]", paramsId.Value), textAlignment: Alignment.Center);
|
||||
new GUINumberInput(new RectTransform(new Vector2(0.5f, 0.4f), commonnessContainer.RectTransform), GUINumberInput.NumberType.Float)
|
||||
new GUINumberInput(new RectTransform(new Vector2(0.5f, 0.4f), commonnessContainer.RectTransform), NumberType.Float)
|
||||
{
|
||||
MinValueFloat = 0,
|
||||
MaxValueFloat = 100,
|
||||
FloatValue = selectedParams.Identifier == paramsId ? levelObjectPrefab.GetCommonness(selectedParams) : levelObjectPrefab.GetCommonness(CaveGenerationParams.CaveParams.Find(p => p.Identifier == paramsId)),
|
||||
FloatValue = selectedParams.Identifier == paramsId ? levelObjectPrefab.GetCommonness(currentLevelData) : levelObjectPrefab.GetCommonness(CaveGenerationParams.CaveParams.Find(p => p.Identifier == paramsId)),
|
||||
OnValueChanged = (numberInput) =>
|
||||
{
|
||||
levelObjectPrefab.OverrideCommonness[paramsId] = numberInput.FloatValue;
|
||||
@@ -620,7 +623,7 @@ namespace Barotrauma
|
||||
childObj.AllowedNames = dropdown.SelectedDataMultiple.Select(d => ((LevelObjectPrefab)d).Name).ToList();
|
||||
return true;
|
||||
};
|
||||
new GUINumberInput(new RectTransform(new Vector2(0.2f, 1.0f), paddedFrame.RectTransform), GUINumberInput.NumberType.Int)
|
||||
new GUINumberInput(new RectTransform(new Vector2(0.2f, 1.0f), paddedFrame.RectTransform), NumberType.Int)
|
||||
{
|
||||
MinValueInt = 0,
|
||||
MaxValueInt = 10,
|
||||
@@ -630,7 +633,7 @@ namespace Barotrauma
|
||||
selectedChildObj.MaxCount = Math.Max(selectedChildObj.MaxCount, selectedChildObj.MinCount);
|
||||
}
|
||||
}.IntValue = childObj.MinCount;
|
||||
new GUINumberInput(new RectTransform(new Vector2(0.2f, 1.0f), paddedFrame.RectTransform), GUINumberInput.NumberType.Int)
|
||||
new GUINumberInput(new RectTransform(new Vector2(0.2f, 1.0f), paddedFrame.RectTransform), NumberType.Int)
|
||||
{
|
||||
MinValueInt = 0,
|
||||
MaxValueInt = 10,
|
||||
@@ -689,13 +692,13 @@ namespace Barotrauma
|
||||
buttonContainer.RectTransform.MinSize = buttonContainer.RectTransform.Children.First().MinSize;
|
||||
}
|
||||
|
||||
private void SortLevelObjectsList(LevelGenerationParams selectedParams)
|
||||
private void SortLevelObjectsList(LevelData levelData)
|
||||
{
|
||||
//fade out levelobjects that don't spawn in this type of level
|
||||
foreach (GUIComponent levelObjFrame in levelObjectList.Content.Children)
|
||||
{
|
||||
var levelObj = levelObjFrame.UserData as LevelObjectPrefab;
|
||||
float commonness = levelObj.GetCommonness(selectedParams);
|
||||
float commonness = levelObj.GetCommonness(levelData);
|
||||
levelObjFrame.Color = commonness > 0.0f ? GUIStyle.Green * 0.4f : Color.Transparent;
|
||||
levelObjFrame.SelectedColor = commonness > 0.0f ? GUIStyle.Green * 0.6f : Color.White * 0.5f;
|
||||
levelObjFrame.HoverColor = commonness > 0.0f ? GUIStyle.Green * 0.7f : Color.White * 0.6f;
|
||||
@@ -712,7 +715,7 @@ namespace Barotrauma
|
||||
{
|
||||
var levelObj1 = c1.GUIComponent.UserData as LevelObjectPrefab;
|
||||
var levelObj2 = c2.GUIComponent.UserData as LevelObjectPrefab;
|
||||
return Math.Sign(levelObj2.GetCommonness(selectedParams) - levelObj1.GetCommonness(selectedParams));
|
||||
return Math.Sign(levelObj2.GetCommonness(levelData) - levelObj1.GetCommonness(levelData));
|
||||
});
|
||||
}
|
||||
|
||||
|
||||
@@ -2902,6 +2902,7 @@ namespace Barotrauma
|
||||
appearanceFrame.ClearChildren();
|
||||
|
||||
var info = GameMain.Client.CharacterInfo ?? Character.Controlled?.Info;
|
||||
CharacterAppearanceCustomizationMenu?.Dispose();
|
||||
CharacterAppearanceCustomizationMenu = new CharacterInfo.AppearanceCustomizationMenu(info, appearanceFrame)
|
||||
{
|
||||
OnHeadSwitch = menu =>
|
||||
|
||||
@@ -291,7 +291,7 @@ namespace Barotrauma
|
||||
}, style: null, color: Color.Black * 0.6f);
|
||||
var colorLabel = new GUITextBlock(new RectTransform(new Vector2(0.3f, 1), element.RectTransform, Anchor.CenterLeft), colorComponentLabels[i],
|
||||
font: GUIStyle.SmallFont, textAlignment: Alignment.CenterLeft);
|
||||
var numberInput = new GUINumberInput(new RectTransform(new Vector2(0.7f, 1), element.RectTransform, Anchor.CenterRight), GUINumberInput.NumberType.Int)
|
||||
var numberInput = new GUINumberInput(new RectTransform(new Vector2(0.7f, 1), element.RectTransform, Anchor.CenterRight), NumberType.Int)
|
||||
{
|
||||
Font = GUIStyle.SmallFont
|
||||
};
|
||||
|
||||
@@ -2256,7 +2256,7 @@ namespace Barotrauma
|
||||
{
|
||||
ToolTip = TextManager.Get("OutPostModuleMaxCountToolTip")
|
||||
};
|
||||
new GUINumberInput(new RectTransform(new Vector2(0.4f, 1.0f), maxModuleCountGroup.RectTransform), GUINumberInput.NumberType.Int)
|
||||
new GUINumberInput(new RectTransform(new Vector2(0.4f, 1.0f), maxModuleCountGroup.RectTransform), NumberType.Int)
|
||||
{
|
||||
ToolTip = TextManager.Get("OutPostModuleMaxCountToolTip"),
|
||||
IntValue = MainSub?.Info?.OutpostModuleInfo?.MaxCount ?? 1000,
|
||||
@@ -2274,7 +2274,7 @@ namespace Barotrauma
|
||||
};
|
||||
new GUITextBlock(new RectTransform(new Vector2(0.6f, 1.0f), commonnessGroup.RectTransform),
|
||||
TextManager.Get("subeditor.outpostcommonness"), textAlignment: Alignment.CenterLeft, wrap: true);
|
||||
new GUINumberInput(new RectTransform(new Vector2(0.4f, 1.0f), commonnessGroup.RectTransform), GUINumberInput.NumberType.Float)
|
||||
new GUINumberInput(new RectTransform(new Vector2(0.4f, 1.0f), commonnessGroup.RectTransform), NumberType.Float)
|
||||
{
|
||||
FloatValue = MainSub?.Info?.OutpostModuleInfo?.Commonness ?? 10,
|
||||
MinValueFloat = 0,
|
||||
@@ -2304,8 +2304,9 @@ namespace Barotrauma
|
||||
new GUITextBlock(new RectTransform(new Vector2(0.6f, 1.0f), priceGroup.RectTransform),
|
||||
TextManager.Get("subeditor.price"), textAlignment: Alignment.CenterLeft, wrap: true);
|
||||
|
||||
|
||||
int basePrice = (GameMain.DebugDraw ? 0 : MainSub?.CalculateBasePrice()) ?? 1000;
|
||||
new GUINumberInput(new RectTransform(new Vector2(0.4f, 1.0f), priceGroup.RectTransform), GUINumberInput.NumberType.Int, hidePlusMinusButtons: true)
|
||||
new GUINumberInput(new RectTransform(new Vector2(0.4f, 1.0f), priceGroup.RectTransform), NumberType.Int, hidePlusMinusButtons: true)
|
||||
{
|
||||
IntValue = Math.Max(MainSub?.Info?.Price ?? basePrice, basePrice),
|
||||
MinValueInt = basePrice,
|
||||
@@ -2350,13 +2351,13 @@ namespace Barotrauma
|
||||
|
||||
new GUITextBlock(new RectTransform(new Vector2(0.6f, 1.0f), crewSizeArea.RectTransform),
|
||||
TextManager.Get("RecommendedCrewSize"), textAlignment: Alignment.CenterLeft, wrap: true, font: GUIStyle.SmallFont);
|
||||
var crewSizeMin = new GUINumberInput(new RectTransform(new Vector2(0.17f, 1.0f), crewSizeArea.RectTransform), GUINumberInput.NumberType.Int, relativeButtonAreaWidth: 0.25f)
|
||||
var crewSizeMin = new GUINumberInput(new RectTransform(new Vector2(0.17f, 1.0f), crewSizeArea.RectTransform), NumberType.Int, relativeButtonAreaWidth: 0.25f)
|
||||
{
|
||||
MinValueInt = 1,
|
||||
MaxValueInt = 128
|
||||
};
|
||||
new GUITextBlock(new RectTransform(new Vector2(0.06f, 1.0f), crewSizeArea.RectTransform), "-", textAlignment: Alignment.Center);
|
||||
var crewSizeMax = new GUINumberInput(new RectTransform(new Vector2(0.17f, 1.0f), crewSizeArea.RectTransform), GUINumberInput.NumberType.Int, relativeButtonAreaWidth: 0.25f)
|
||||
var crewSizeMax = new GUINumberInput(new RectTransform(new Vector2(0.17f, 1.0f), crewSizeArea.RectTransform), NumberType.Int, relativeButtonAreaWidth: 0.25f)
|
||||
{
|
||||
MinValueInt = 1,
|
||||
MaxValueInt = 128
|
||||
@@ -2947,11 +2948,22 @@ namespace Barotrauma
|
||||
prevSub = sub;
|
||||
}
|
||||
|
||||
string pathWithoutUserName = Path.GetFullPath(sub.FilePath);
|
||||
string saveFolder = Path.GetFullPath(SaveUtil.SaveFolder);
|
||||
if (pathWithoutUserName.StartsWith(saveFolder))
|
||||
{
|
||||
pathWithoutUserName = "..." + pathWithoutUserName[saveFolder.Length..];
|
||||
}
|
||||
else
|
||||
{
|
||||
pathWithoutUserName = sub.FilePath;
|
||||
}
|
||||
|
||||
GUITextBlock textBlock = new GUITextBlock(new RectTransform(new Vector2(1.0f, 0.0f), subList.Content.RectTransform) { MinSize = new Point(0, 30) },
|
||||
ToolBox.LimitString(sub.Name, GUIStyle.Font, subList.Rect.Width - 80))
|
||||
{
|
||||
UserData = sub,
|
||||
ToolTip = sub.FilePath
|
||||
ToolTip = pathWithoutUserName
|
||||
};
|
||||
|
||||
if (!(ContentPackageManager.VanillaCorePackage?.Files.Any(f => f.Path == sub.FilePath) ?? false))
|
||||
@@ -3667,17 +3679,17 @@ namespace Barotrauma
|
||||
GUILayoutGroup hueSliderLayout = new GUILayoutGroup(new RectTransform(new Vector2(0.95f, 0.25f), sliderLayout.RectTransform), isHorizontal: true, childAnchor: Anchor.CenterLeft);
|
||||
new GUITextBlock(new RectTransform(new Vector2(0.1f, 0.2f), hueSliderLayout.RectTransform), text: "H:", font: GUIStyle.SubHeadingFont) { Padding = Vector4.Zero, ToolTip = "Hue" };
|
||||
GUIScrollBar hueScrollBar = new GUIScrollBar(new RectTransform(new Vector2(0.7f, 1f), hueSliderLayout.RectTransform), style: "GUISlider", barSize: 0.05f) { BarScroll = currentHue };
|
||||
GUINumberInput hueTextBox = new GUINumberInput(new RectTransform(new Vector2(0.2f, 1f), hueSliderLayout.RectTransform), inputType: GUINumberInput.NumberType.Float) { FloatValue = currentHue, MaxValueFloat = 1f, MinValueFloat = 0f, DecimalsToDisplay = 2 };
|
||||
GUINumberInput hueTextBox = new GUINumberInput(new RectTransform(new Vector2(0.2f, 1f), hueSliderLayout.RectTransform), inputType: NumberType.Float) { FloatValue = currentHue, MaxValueFloat = 1f, MinValueFloat = 0f, DecimalsToDisplay = 2 };
|
||||
|
||||
GUILayoutGroup satSliderLayout = new GUILayoutGroup(new RectTransform(new Vector2(0.95f, 0.2f), sliderLayout.RectTransform), isHorizontal: true, childAnchor: Anchor.CenterLeft);
|
||||
new GUITextBlock(new RectTransform(new Vector2(0.1f, 0.2f), satSliderLayout.RectTransform), text: "S:", font: GUIStyle.SubHeadingFont) { Padding = Vector4.Zero, ToolTip = "Saturation"};
|
||||
GUIScrollBar satScrollBar = new GUIScrollBar(new RectTransform(new Vector2(0.7f, 1f), satSliderLayout.RectTransform), style: "GUISlider", barSize: 0.05f) { BarScroll = colorPicker.SelectedSaturation };
|
||||
GUINumberInput satTextBox = new GUINumberInput(new RectTransform(new Vector2(0.2f, 1f), satSliderLayout.RectTransform), inputType: GUINumberInput.NumberType.Float) { FloatValue = colorPicker.SelectedSaturation, MaxValueFloat = 1f, MinValueFloat = 0f, DecimalsToDisplay = 2 };
|
||||
GUINumberInput satTextBox = new GUINumberInput(new RectTransform(new Vector2(0.2f, 1f), satSliderLayout.RectTransform), inputType: NumberType.Float) { FloatValue = colorPicker.SelectedSaturation, MaxValueFloat = 1f, MinValueFloat = 0f, DecimalsToDisplay = 2 };
|
||||
|
||||
GUILayoutGroup valueSliderLayout = new GUILayoutGroup(new RectTransform(new Vector2(0.95f, 0.2f), sliderLayout.RectTransform), isHorizontal: true, childAnchor: Anchor.CenterLeft);
|
||||
new GUITextBlock(new RectTransform(new Vector2(0.1f, 0.2f), valueSliderLayout.RectTransform), text: "V:", font: GUIStyle.SubHeadingFont) { Padding = Vector4.Zero, ToolTip = "Value"};
|
||||
GUIScrollBar valueScrollBar = new GUIScrollBar(new RectTransform(new Vector2(0.7f, 1f), valueSliderLayout.RectTransform), style: "GUISlider", barSize: 0.05f) { BarScroll = colorPicker.SelectedValue };
|
||||
GUINumberInput valueTextBox = new GUINumberInput(new RectTransform(new Vector2(0.2f, 1f), valueSliderLayout.RectTransform), inputType: GUINumberInput.NumberType.Float) { FloatValue = colorPicker.SelectedValue, MaxValueFloat = 1f, MinValueFloat = 0f, DecimalsToDisplay = 2 };
|
||||
GUINumberInput valueTextBox = new GUINumberInput(new RectTransform(new Vector2(0.2f, 1f), valueSliderLayout.RectTransform), inputType: NumberType.Float) { FloatValue = colorPicker.SelectedValue, MaxValueFloat = 1f, MinValueFloat = 0f, DecimalsToDisplay = 2 };
|
||||
|
||||
GUILayoutGroup colorInfoLayout = new GUILayoutGroup(new RectTransform(new Vector2(0.95f, 0.3f), sliderLayout.RectTransform), childAnchor: Anchor.CenterLeft, isHorizontal: true) { RelativeSpacing = 0.15f };
|
||||
|
||||
@@ -4439,8 +4451,7 @@ namespace Barotrauma
|
||||
{
|
||||
Rectangle hullRect = rect;
|
||||
hullRect.Y = -hullRect.Y;
|
||||
Hull newHull = new Hull(MapEntityPrefab.FindByIdentifier("hull".ToIdentifier()),
|
||||
hullRect,
|
||||
Hull newHull = new Hull(hullRect,
|
||||
MainSub);
|
||||
}
|
||||
|
||||
@@ -4452,7 +4463,7 @@ namespace Barotrauma
|
||||
Rectangle gapRect = e.WorldRect;
|
||||
gapRect.Y -= 8;
|
||||
gapRect.Height = 16;
|
||||
Gap newGap = new Gap(MapEntityPrefab.FindByIdentifier("gap".ToIdentifier()), gapRect);
|
||||
new Gap(gapRect);
|
||||
}
|
||||
}
|
||||
|
||||
|
||||
Reference in New Issue
Block a user