- Renamed a bunch of ObjectProperty-related stuff (ObjectProperty -> SerializableProperty, IPropertyObject -> ISerializableEntity, the "SerializableProperty" attribute -> Serialize).
- Rectangle serialization. - Option to restrict numeric properties to a range of values. - WIP generic ISerializableEntity editor.
This commit is contained in:
@@ -2,7 +2,7 @@
|
||||
|
||||
namespace Barotrauma.Items.Components
|
||||
{
|
||||
partial class ItemComponent : IPropertyObject
|
||||
partial class ItemComponent : ISerializableEntity
|
||||
{
|
||||
private bool LoadElemProjSpecific(XElement subElement)
|
||||
{
|
||||
|
||||
@@ -5,21 +5,21 @@ namespace Barotrauma.Items.Components
|
||||
{
|
||||
partial class ItemLabel : ItemComponent, IDrawableComponent
|
||||
{
|
||||
[SerializableProperty("", true), Editable(100)]
|
||||
[Serialize("", true), Editable(100)]
|
||||
public string Text
|
||||
{
|
||||
get;
|
||||
set;
|
||||
}
|
||||
|
||||
[Editable, SerializableProperty("0.0,0.0,0.0,1.0", true)]
|
||||
[Editable, Serialize("0.0,0.0,0.0,1.0", true)]
|
||||
public Color TextColor
|
||||
{
|
||||
get;
|
||||
set;
|
||||
}
|
||||
|
||||
[Editable, SerializableProperty(1.0f, true)]
|
||||
[Editable, Serialize(1.0f, true)]
|
||||
public float TextScale
|
||||
{
|
||||
get;
|
||||
|
||||
Reference in New Issue
Block a user