public override void Load(TagCompound tag) { base.Load(tag); if (tag.ContainsKey("position")) { panelMain.LoadPositionJsonString(tag.GetString("position")); } if (tag.ContainsKey("SplitterBarLeft")) { panelSplitter.SetSplitterBarLeft(tag.GetFloat("SplitterBarLeft")); } if (tag.ContainsKey("chestTypeView")) { chestTypeView = tag.GetList <bool>("chestTypeView").ToArray(); } if (tag.ContainsKey("dresserTypeView")) { dresserTypeView = tag.GetList <bool>("dresserTypeView").ToArray(); } if (tag.ContainsKey("filterItemList")) { tag.GetList <int>("filterItemList").ToList().ForEach(x => AddFilterItem(x)); } if (tag.ContainsKey("btnLine")) { btnLine.Index = tag.GetInt("btnLine"); } if (tag.ContainsKey("btnIconSize")) { btnIconSize.Index = tag.GetInt("btnIconSize"); UIItemSlot.scale = btnIconSize.GetValue <float>(); } if (tag.ContainsKey("btnFilterChestType")) { btnFilterChestType.Index = tag.GetInt("btnFilterChestType"); } if (tag.ContainsKey("btnFilterChestTypeReverse")) { btnFilterChestTypeReverse.Index = tag.GetInt("btnFilterChestTypeReverse"); } if (tag.ContainsKey("btnFilterItem")) { btnFilterItem.Index = tag.GetInt("btnFilterItem"); } if (tag.ContainsKey("btnFilterChestName")) { btnFilterChestName.Index = tag.GetInt("btnFilterChestName"); } ChangeSpliterPanel(); }