Unstable 1.2.1.0

This commit is contained in:
Markus Isberg
2023-11-10 17:45:19 +02:00
parent 2ea58c58a7
commit 8a2e2ea0ae
268 changed files with 4076 additions and 1843 deletions
@@ -0,0 +1,55 @@
using System;
using Barotrauma.Items.Components;
namespace Barotrauma;
[AttributeUsage(AttributeTargets.Property)]
class Editable : Attribute
{
public int MaxLength;
public int DecimalCount = 1;
public int MinValueInt = int.MinValue, MaxValueInt = int.MaxValue;
public float MinValueFloat = float.MinValue, MaxValueFloat = float.MaxValue;
public bool ForceShowPlusMinusButtons = false;
public float ValueStep;
/// <summary>
/// Labels of the components of a vector property (defaults to x,y,z,w)
/// </summary>
public string[] VectorComponentLabels;
/// <summary>
/// If a translation can't be found for the property name, this tag is used instead
/// </summary>
public string FallBackTextTag;
/// <summary>
/// Currently implemented only for int and bool fields. TODO: implement the remaining types (SerializableEntityEditor)
/// </summary>
public bool ReadOnly;
public Editable(int maxLength = 20)
{
MaxLength = maxLength;
}
public Editable(int minValue, int maxValue)
{
MinValueInt = minValue;
MaxValueInt = maxValue;
}
public Editable(float minValue, float maxValue, int decimals = 1)
{
MinValueFloat = minValue;
MaxValueFloat = maxValue;
DecimalCount = decimals;
}
}
[AttributeUsage(AttributeTargets.Property)]
sealed class InGameEditable : Editable
{
}