(5fbd1cdee) Reload sprite and reset the depth when reset to prefab method is called.
This commit is contained in:
@@ -89,6 +89,11 @@ namespace Barotrauma
|
|||||||
new GUITextBlock(new RectTransform(new Vector2(1.0f, 0.0f), filterHolder.RectTransform), TextManager.Get("FilterServers"));
|
new GUITextBlock(new RectTransform(new Vector2(1.0f, 0.0f), filterHolder.RectTransform), TextManager.Get("FilterServers"));
|
||||||
searchBox = new GUITextBox(new RectTransform(new Vector2(1.0f, 0.13f), filterHolder.RectTransform), "");
|
searchBox = new GUITextBox(new RectTransform(new Vector2(1.0f, 0.13f), filterHolder.RectTransform), "");
|
||||||
|
|
||||||
|
var filterHolder = new GUILayoutGroup(new RectTransform(new Vector2(1.0f, 0.5f), leftColumn.RectTransform)) { RelativeSpacing = 0.05f };
|
||||||
|
|
||||||
|
new GUITextBlock(new RectTransform(new Vector2(1.0f, 0.0f), filterHolder.RectTransform), TextManager.Get("FilterServers"));
|
||||||
|
searchBox = new GUITextBox(new RectTransform(new Vector2(1.0f, 0.13f), filterHolder.RectTransform), "");
|
||||||
|
|
||||||
var tickBoxHolder = new GUILayoutGroup(new RectTransform(new Vector2(1.0f, 0.5f), filterHolder.RectTransform));
|
var tickBoxHolder = new GUILayoutGroup(new RectTransform(new Vector2(1.0f, 0.5f), filterHolder.RectTransform));
|
||||||
|
|
||||||
searchBox.OnTextChanged += (txtBox, txt) => { FilterServers(); return true; };
|
searchBox.OnTextChanged += (txtBox, txt) => { FilterServers(); return true; };
|
||||||
|
|||||||
@@ -2062,6 +2062,8 @@ namespace Barotrauma
|
|||||||
public virtual void Reset()
|
public virtual void Reset()
|
||||||
{
|
{
|
||||||
SerializableProperties = SerializableProperty.DeserializeProperties(this, Prefab.ConfigElement);
|
SerializableProperties = SerializableProperty.DeserializeProperties(this, Prefab.ConfigElement);
|
||||||
|
Sprite.ReloadXML();
|
||||||
|
SpriteDepth = Sprite.Depth;
|
||||||
components.ForEach(c => c.Reset());
|
components.ForEach(c => c.Reset());
|
||||||
}
|
}
|
||||||
|
|
||||||
|
|||||||
Reference in New Issue
Block a user