public static void OnGUI() { GUILayout.BeginHorizontal("物品详情", GUI.skin.window, GUILayout.ExpandHeight(true), GUILayout.ExpandWidth(true)); if (ItemSearchUI.SelectItem != null) { GUILayout.BeginVertical(GUI.skin.box, GUILayout.Width(120)); Texture2D icon = ModTool.GetIcon(ItemSearchUI.SelectItem); if (icon != null) { GUILayout.Label(icon); } else { GUILayout.Label("此物品无图标"); } if (InGameWiki.ShowJSON.Value) { if (GUILayout.Button("显示JSON数据")) { JsonUI.Json = ItemSearchUI.SelectItem; } } GUILayout.EndVertical(); } svPos = GUILayout.BeginScrollView(svPos, GUILayout.ExpandHeight(true), GUILayout.ExpandWidth(true)); if (ItemSearchUI.SelectItem == null) { GUILayout.Label("当前未选中物品"); } else { GUI.contentColor = ItemSearchUI.SelectItem.GetQualityColor(); GUILayout.Label($"物品名称: {ItemSearchUI.SelectItem["name"].str.UnCode64()}"); GUI.contentColor = Color.white; GUILayout.Label($"ID: {ItemSearchUI.SelectItem["id"].I}"); GUILayout.Label($"品质: {ItemSearchUI.SelectItem["quality"].I}品"); GUILayout.Label($"类别: {Tools.getStr("ItemType" + (int)ItemSearchUI.SelectItem["type"].n)}"); GUILayout.Label($"简介: {ItemSearchUI.SelectItem["desc"].str.UnCode64()}"); GUILayout.Label($"描述: {ItemSearchUI.SelectItem["desc2"].str.UnCode64()}"); GUILayout.Label($"最大堆叠: { ItemSearchUI.SelectItem["maxNum"].I }"); GUILayout.Label($"价格: { ItemSearchUI.SelectItem["price"].I }"); switch ((int)ItemSearchUI.SelectItem["type"].n) { case 6: //药材 GUILayout.Label("【药性】"); GUILayout.Label($"用于主药: {Tools.getLiDanLeiXinStr((int)ItemSearchUI.SelectItem["yaoZhi2"].n)}"); GUILayout.Label($"用于辅药: {Tools.getLiDanLeiXinStr((int)ItemSearchUI.SelectItem["yaoZhi3"].n)}"); GUILayout.Label($"用于药引: {Tools.getLiDanLeiXinStr((int)ItemSearchUI.SelectItem["yaoZhi1"].n)}"); break; } } GUILayout.EndScrollView(); //联动数据1 if (ItemSearchUI.SelectItem != null) { switch ((int)ItemSearchUI.SelectItem["type"].n) { case 5: //丹药 DanYaoUI(ItemSearchUI.SelectItem); break; case 6: //药材 YaoCaiUI(ItemSearchUI.SelectItem); break; } } //联动数据 - 采集地数据 if (ItemSearchUI.SelectItem != null) { //6药材 8材料 if ((int)ItemSearchUI.SelectItem["type"].n == 6 || (int)ItemSearchUI.SelectItem["type"].n == 8) { CaiJiDiUI(ItemSearchUI.SelectItem); } } GUILayout.EndHorizontal(); }