Unstable 0.1400.0.0
This commit is contained in:
@@ -272,7 +272,9 @@ namespace Barotrauma
|
||||
}
|
||||
|
||||
public SerializableEntityEditor(RectTransform parent, ISerializableEntity entity, bool inGame, bool showName, string style = "", int elementHeight = 24, ScalableFont titleFont = null)
|
||||
: this(parent, entity, inGame ? SerializableProperty.GetProperties<InGameEditable>(entity) : SerializableProperty.GetProperties<Editable>(entity), showName, style, elementHeight, titleFont)
|
||||
: this(parent, entity, inGame ?
|
||||
SerializableProperty.GetProperties<InGameEditable>(entity).Union(SerializableProperty.GetProperties<ConditionallyEditable>(entity).Where(p => p.GetAttribute<ConditionallyEditable>()?.IsEditable() ?? false))
|
||||
: SerializableProperty.GetProperties<Editable>(entity), showName, style, elementHeight, titleFont)
|
||||
{
|
||||
}
|
||||
|
||||
@@ -447,6 +449,13 @@ namespace Barotrauma
|
||||
{
|
||||
TrySendNetworkUpdate(entity, property);
|
||||
}
|
||||
// Ensure that the values stay in sync (could be that we force the value in the property accessor).
|
||||
bool propertyValue = (bool)property.GetValue(entity);
|
||||
if (tickBox.Selected != propertyValue)
|
||||
{
|
||||
tickBox.Selected = propertyValue;
|
||||
tickBox.Flash(Color.Red);
|
||||
}
|
||||
return true;
|
||||
}
|
||||
};
|
||||
|
||||
Reference in New Issue
Block a user