(a17abe3fa) Remove a not so useful loop from a method, which might be used often.
This commit is contained in:
@@ -255,7 +255,7 @@ namespace Barotrauma
|
||||
|
||||
public SerializableEntityEditor(RectTransform parent, ISerializableEntity entity, bool inGame, bool showName, string style = "", int elementHeight = 24) : base(style, new RectTransform(Vector2.One, parent))
|
||||
{
|
||||
this.elementHeight = (int)(elementHeight * GUI.Scale);
|
||||
this.elementHeight = elementHeight;
|
||||
List<SerializableProperty> editableProperties = inGame ?
|
||||
SerializableProperty.GetProperties<InGameEditable>(entity) :
|
||||
SerializableProperty.GetProperties<Editable>(entity);
|
||||
@@ -263,7 +263,7 @@ namespace Barotrauma
|
||||
layoutGroup = new GUILayoutGroup(new RectTransform(Vector2.One, RectTransform)) { AbsoluteSpacing = 2 };
|
||||
if (showName)
|
||||
{
|
||||
new GUITextBlock(new RectTransform(new Point(layoutGroup.Rect.Width, this.elementHeight), layoutGroup.RectTransform), entity.Name, font: GUI.Font);
|
||||
new GUITextBlock(new RectTransform(new Point(layoutGroup.Rect.Width, elementHeight), layoutGroup.RectTransform), entity.Name, font: GUI.Font);
|
||||
}
|
||||
editableProperties.ForEach(ep => CreateNewField(ep, entity));
|
||||
|
||||
|
||||
Reference in New Issue
Block a user