Working on improving the serialization system and ObjectProperty/IPropertyObject (TODO: come up with better names). The plan is to:

- Add support for some of the most common types (vectors, colors, rects) so there's no need to parse the values in the setters of the serializable properties (see Holdable.HoldPos for example).
- Make a generic version of the item editing HUD that can be used on any IPropertyObject. Should make it easier to implement things like the character editor, editing structure properties, particle editor, etc.
- Improve the interface of the editing HUD. Instead of having to type in a string value into a textbox, there should be number input fields for numeric properties, sliders for properties that only accept a range of values, a color picker, etc. And tooltips.
This commit is contained in:
Joonas Rikkonen
2017-11-03 19:41:21 +02:00
parent 8b9be55135
commit a0d606ef5f
41 changed files with 345 additions and 263 deletions
@@ -0,0 +1,17 @@
using System.Collections.Generic;
namespace Barotrauma
{
interface IPropertyObject
{
string Name
{
get;
}
Dictionary<string, ObjectProperty> ObjectProperties
{
get;
}
}
}