コード例 #1
0
        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("killItems"))
            {
                TileWallUI.killItems = tag.GetString("killItems").Split(',').Select(x => x.Equals("1") ? true : false).ToArray <bool>();
            }
            if (tag.ContainsKey("btnIconSize"))
            {
                btnIconSize.Index = tag.GetInt("btnIconSize");
                UIItemSlot.scale  = btnIconSize.GetValue <float>();
            }
            if (tag.ContainsKey("btnFilterNear"))
            {
                btnFilterNear.Index = tag.GetInt("btnFilterNear");
            }
            if (tag.ContainsKey("btnShowTile"))
            {
                btnShowTile.Index = tag.GetInt("btnShowTile");
            }
            if (tag.ContainsKey("btnShowWall"))
            {
                btnShowWall.Index = tag.GetInt("btnShowWall");
            }
        }
コード例 #2
0
 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();
 }