Progress on particle editor:

- Emission settings of the preview particles can be edited.
- The XML config of the selected particle prefab can be copied to clipboard.

+ pressing enter when a GUINumberInput textbox is selected deselects the textbox
This commit is contained in:
Joonas Rikkonen
2017-11-17 20:58:00 +02:00
parent acfee80755
commit 3a6508648f
2 changed files with 130 additions and 13 deletions
@@ -113,6 +113,12 @@ namespace Barotrauma
if (inputType == NumberType.Int)
{
textBox.Text = "0";
textBox.OnEnterPressed += (txtBox, txt) =>
{
textBox.Text = IntValue.ToString();
textBox.Deselect();
return true;
};
textBox.OnDeselected += (txtBox, key) =>
{
textBox.Text = IntValue.ToString();
@@ -125,10 +131,14 @@ namespace Barotrauma
{
textBox.Text = FloatValue.ToString("G", CultureInfo.InvariantCulture);
};
textBox.OnEnterPressed += (txtBox, txt) =>
{
textBox.Text = FloatValue.ToString("G", CultureInfo.InvariantCulture);
textBox.Deselect();
return true;
};
}
InputType = inputType;
}