Progress:

- Input fields for vectors & colors in SerializableEntityEditor.
- SerializableProperty tooltips.
- GUINumberInput supports floats.
- EditingHUD for structures (atm the only editable property is the color of the sprite)
This commit is contained in:
Joonas Rikkonen
2017-11-12 20:24:11 +02:00
parent 8e556f1c76
commit f7298c241e
15 changed files with 514 additions and 130 deletions
@@ -267,18 +267,20 @@ namespace Barotrauma.Networking
int cargoVal = 0;
extraCargo.TryGetValue(pf.Name, out cargoVal);
var amountInput = new GUINumberInput(new Rectangle(160, 0, 50, 20), "", 0, 100, textBlock);
amountInput.Value = cargoVal;
var amountInput = new GUINumberInput(new Rectangle(160, 0, 50, 20), "", GUINumberInput.NumberType.Int, textBlock);
amountInput.MinValueInt = 0;
amountInput.MaxValueInt = 100;
amountInput.IntValue = cargoVal;
amountInput.OnValueChanged += (numberInput, value) =>
amountInput.OnValueChanged += (numberInput) =>
{
if (extraCargo.ContainsKey(pf.Name))
{
extraCargo[pf.Name] = value;
extraCargo[pf.Name] = numberInput.IntValue;
}
else
{
extraCargo.Add(pf.Name, value);
extraCargo.Add(pf.Name, numberInput.IntValue);
}
};
}