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:
@@ -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;
|
||||
}
|
||||
|
||||
|
||||
Reference in New Issue
Block a user