Exemplo n.º 1
0
        public void EnableMenu(string menuName)
        {
            if (string.IsNullOrEmpty(menuName))
            {
                return;
            }
            if (menus.ContainsKey(menuName))
            {
                DisableActiveMenu();

                activeWidget = menus[menuName];
                activeWidget.EnabelWidget();
            }
            else
            {
                Debug.LogError("Menu is not available in Dictionary!");
            }
        }
Exemplo n.º 2
0
        public void AddMenu(string menuName, MenuWidget menuWidget)
        {
            if (string.IsNullOrEmpty(menuName))
            {
                return;
            }
            if (menus.ContainsKey(menuName))
            {
                Debug.LogError("Menu already exists in dictionary!");
                return;
            }

            if (menuWidget == null)
            {
                return;
            }
            menus.Add(menuName, menuWidget);
        }