using AppUI.Bluetooth; using AppUI.Localization; using AppUI.Manager; using AppUI.Manager.View; using AppUI.Util.TabSwitcher; using AppUI.View.Home.UserCenter; using InfraredManager; using SmartBowSDK; using System.Collections; using System.Collections.Generic; using System.Linq; using UnityEngine; using UnityEngine.UI; namespace AppUI.View.Home.Main { public class HomeViewBottomBar : MonoBehaviour { void Start() { Dictionary actionMap = new Dictionary { { "IconConnect", null }, { "IconScreen", null }, //{ "IconGuider", null }, //{ "IconShop", null }, //{ "IconNewUser", null }, //{ "IconFriend", null }, { "IconRank", null }, { "IconSetUp", null } }; SortChildObjects(actionMap); // 按条件禁用特定按钮的交互性 if (CommonConfig.StandaloneMode) { DisableButtonInteractivity(actionMap, new List { "IconGuider", "IconFriend", "IconRank" }); } } void DisableButtonInteractivity(Dictionary actionMap, List buttonNames) { foreach (var buttonName in buttonNames) { // 检查 actionMap 中是否有该键且对应的 Transform 不为 null if (actionMap.TryGetValue(buttonName, out Transform buttonTransform) && buttonTransform != null) { Image image = buttonTransform.GetComponent(); if (image != null) { image.color = new Color(200f / 255f, 200f / 255f, 200f / 255f, 130f / 255f); } Button button = buttonTransform.GetComponent