Пример #1
0
        static void OnGUI(UnityModManager.ModEntry modEntry)
        {
            GUILayout.Label(title, GUILayout.Width(300));
            GUILayout.BeginHorizontal();
            if (GUILayout.Toggle(Main.settings.useWarehouse == 0, "新版仓库"))
            {
                Warehouse_UpdateActorItems_Patch.SetNewWarehouse(true);
                Main.settings.useWarehouse = 0;
            }
            if (GUILayout.Toggle(Main.settings.useWarehouse == 1, "旧版仓库"))
            {
                Main.settings.useWarehouse = 1;
            }
            if (GUILayout.Toggle(Main.settings.useWarehouse == 2, "原版仓库"))
            {
                Warehouse_UpdateActorItems_Patch.SetNewWarehouse(false);
                Main.settings.useWarehouse = 2;
            }
            GUILayout.EndHorizontal();


            GUILayout.BeginHorizontal();
            string sNum = GUILayout.TextField(Main.settings.numberOfColumns.ToString());
            int    num;

            if (int.TryParse(sNum, out num))
            {
                if (num > 0 || num < 1000)
                {
                    Main.settings.numberOfColumns = num;
                }
            }
            GUILayout.Label(string.Format("←←←←←← 设置背包一行显示{0}个物品:   <color=#F63333>修改行数和仓库版本设置建议重启游戏!</color>", Main.settings.numberOfColumns));
            GUILayout.EndHorizontal();


            GUILayout.BeginHorizontal();
            GUILayout.Label("<color=#F63333>取消拖拽存取物品功能    按住Ctrl+点击物品存取全部物品</color>");
            GUILayout.EndHorizontal();


            GUILayout.BeginHorizontal();
            string content = GUILayout.TextField(Main.settings.tackNum.ToString());
            int    takeNum;

            if (int.TryParse(content, out takeNum))
            {
                if (takeNum > 0 || takeNum < 1000)
                {
                    Main.settings.tackNum = takeNum;
                }
            }
            GUILayout.Label(string.Format("<color=#F63333>←←←←←← 设置按住Shift+点击物品存储{0}个物品</color>", Main.settings.tackNum));
            GUILayout.EndHorizontal();

            GUILayout.BeginHorizontal();
            string speed = GUILayout.TextField(Main.settings.scrollSpeed.ToString());
            int    s;

            if (int.TryParse(speed, out s))
            {
                if (s > 0 || s < 1000)
                {
                    Main.settings.scrollSpeed = s;
                }
            }
            GUILayout.Label(string.Format("←←←←←← 设置背包滚轮滑动速度{0}", Main.settings.scrollSpeed));
            GUILayout.EndHorizontal();


            GUILayout.BeginHorizontal();
            Main.settings.useClassify = GUILayout.HorizontalSlider(Main.settings.useClassify, 0, 1) <= 0.5f ? 0 : 1;
            GUILayout.Label(string.Format("开启分类搜索:<color=#F63333>({0})</color>", Main.settings.useClassify == 0 ? "关" : "开"));
            if (Main.settings.useClassify == 1)
            {
                Main.settings.levelClassify = Main.MaxLevelClassify(); //等级筛选
                Main.settings.bookClassify  = Main.MaxBookClassify();  //书籍筛选
                                                                       //Main.settings.attrClassify = Main.MaxAttrClassify();//属性
            }
            GUILayout.EndHorizontal();
            //GUILayout.BeginHorizontal();
            //GUILayout.Label("默认打开仓库标签:");
            //if (warehouse != null)
            //{
            //    for (int i = 0; i < warehouse.titleName.Length; i++)
            //    {
            //        if (GUILayout.Toggle(Main.settings.openTitle == i, warehouse.titleName[i]))
            //        {
            //            Main.settings.openTitle = i;
            //        }
            //    }
            //}
            //GUILayout.EndHorizontal();
        }