override public float Run()
        {
            if (!string.IsNullOrEmpty(menuName) && !string.IsNullOrEmpty(elementName))
            {
                MenuElement menuElement = PlayerMenus.GetElementWithName(menuName, elementName);
                if (menuElement is MenuInput)
                {
                    MenuInput menuInput = (MenuInput)menuElement;
                    if (setMenuInputBoxSource == SetMenuInputBoxSource.EnteredHere)
                    {
                        menuInput.SetLabel(newLabel);
                    }
                    else if (setMenuInputBoxSource == SetMenuInputBoxSource.FromGlobalVariable)
                    {
                        menuInput.SetLabel(GlobalVariables.GetStringValue(varID));
                    }
                }
                else
                {
                    ACDebug.LogWarning("Cannot find Element '" + elementName + "' within Menu '" + menuName + "'");
                }
            }

            return(0f);
        }
Ejemplo n.º 2
0
        override public float Run()
        {
            if (menuName != "" && elementName != "")
            {
                MenuElement menuElement = PlayerMenus.GetElementWithName(menuName, elementName);
                if (menuElement is MenuInput)
                {
                    MenuInput menuInput = (MenuInput)menuElement;
                    if (setMenuInputBoxSource == SetMenuInputBoxSource.EnteredHere)
                    {
                        menuInput.SetLabel(newLabel);
                    }
                    else if (setMenuInputBoxSource == SetMenuInputBoxSource.FromGlobalVariable)
                    {
                        menuInput.SetLabel(GlobalVariables.GetStringValue(varID));
                    }
                }
            }

            return(0f);
        }