Exemplo n.º 1
0
    public void OnInputfieldClick(object objectInp, UIPointerEventArgs args)
    {
        GameObject clickedObject = args.currentTarget;

        if (MenuManager.Instance.menuStack.Peek() != Instance)
        {
            //this menu is not visible
            return;
        }

        InputField clickedInputField = clickedObject.GetComponent <InputField>();

        if (clickedInputField != null)
        {
            currentInputfield = clickedInputField;

            string userInput = "Enter the desired Value!";
            NumPad.Show(FillInputfield, userInput);
        }
    }
Exemplo n.º 2
0
    public void OnInputFieldClick(object obj, UIPointerEventArgs args)
    {
        GameObject clickedObject = args.currentTarget;

        if (MenuManager.Instance.menuStack.Peek() != Instance)
        {
            //this menu is not visible
            return;
        }

        InputField clickedInputField = clickedObject.GetComponent <InputField>();

        if (clickedInputField != null)
        {
            if (clickedInputField.name.Contains("ID"))
            {
                NumPad.Show(EditID, "Set desired ID!");
            }
            else if (clickedInputField.name.Contains("Name"))
            {
                KeyboardManager.Show(EditName, "Set desired Name!");
            }
        }
    }