Beispiel #1
0
 private void Start()
 {
     input = gameObject.GetComponent <InputField>();
     se    = new InputField.SubmitEvent();
     se.AddListener(SubmitInput);
     input.onEndEdit = se;
 }
Beispiel #2
0
        // Use this for initialization

        void Start()
        {
            DontDestroyOnLoad(gameObject);
            var consoleObj = GameObject.Find("ConsoleUI/Console");

            if (consoleObj != null && consoleObj.GetComponent <ConsoleUI>() != null)
            {
                Destroy(gameObject);
                return;
            }

            if (console != null)
            {
                console.SetActive(false);
                var consoleUI         = console.AddComponent <ConsoleUI>();
                var consoleController = console.GetComponent <ConsoleController>();
                consoleController.ui = consoleUI;
                console.AddComponent <DefaultCommands>();
                consoleUI.enabled    = false;
                consoleUI.scrollbar  = scrollbar.GetComponent <Scrollbar>();
                consoleUI.outputText = outputText.GetComponent <Text>();
                consoleUI.outputArea = outputArea.GetComponent <ScrollRect>();
                consoleUI.inputField = inputArea.GetComponent <InputField>();

                var submitEvent = new InputField.SubmitEvent();
                submitEvent.AddListener(consoleUI.OnSubmit);
                consoleUI.inputField.onEndEdit = submitEvent;
                console.SetActive(true);
            }
        }
Beispiel #3
0
 private void Start()
 {
     // Add listener to catch the submit
     InputField.SubmitEvent submitEvent = new InputField.SubmitEvent();
     submitEvent.AddListener(SubmitSearch);
     nameInputField.onEndEdit = submitEvent;
 }
 void Start()
 {
     var input = gameObject.GetComponent<InputField>();
     var se= new InputField.SubmitEvent();
     se.AddListener(CodeCheck);
     input.onEndEdit = se;
 }
Beispiel #5
0
    public void setupInitialScreen()
    {
        //Button
        Debug.Log("Start button");
        GameObject start = GameObject.Find("Start") as GameObject;

        start.SetActive(false);

        Debug.Log("Rand button");
        GameObject rand = GameObject.Find("RandomisationID") as GameObject;

        rand.SetActive(false);

        //Participant Input
        InputField pID = GameObject.Find("ParticipantID").GetComponent <InputField>();

        InputField.SubmitEvent se = new InputField.SubmitEvent();
        //se.AddListener(submitPID(start));
        se.AddListener((value) => submitPID(value, start, rand));
        pID.onEndEdit = se;


        //Randomisation Input
        InputField rID = rand.GetComponent <InputField>();

        InputField.SubmitEvent se2 = new InputField.SubmitEvent();
        se2.AddListener((value) => submitRandID(value, start));
        rID.onEndEdit = se2;
    }
Beispiel #6
0
    // Start is called before the first frame update
    void Start()
    {
        instance        = this;
        inventoryHelper = new InventoryHelper();

        // Set Listener for buy amount text field
        if (buyInBulkPanel != null)
        {
            var eventListener = new InputField.SubmitEvent();
            buyAmountFieldObj = buyInBulkPanel.transform.GetChild(1).gameObject;
            buyInputField     = buyAmountFieldObj.GetComponent <InputField>();
            eventListener.AddListener(SetBuyAmount);
            buyInputField.onEndEdit = eventListener;
        }

        // Set Listener for sell amount text field
        if (sellInBulkPanel != null)
        {
            var eventListener = new InputField.SubmitEvent();
            sellAmountFieldObj = sellInBulkPanel.transform.GetChild(1).gameObject;
            sellInputField     = sellAmountFieldObj.GetComponent <InputField>();
            eventListener.AddListener(SetSellAmount);
            sellInputField.onEndEdit = eventListener;
        }
    }
Beispiel #7
0
    private void UpdateDrawn()
    {
        foreach (Transform child in transform)
        {
            if (child.tag == "ListItem")
            {
                Destroy(child.gameObject);
            }
        }

        foreach (var field in Manager.GetType().GetFields())
        {
            if (field.GetValue(Manager).CanConvertTo <float>() && field.IsPublic)
            {
                GameObject newPropertyEditor = (GameObject)Instantiate(ElementPrefab);
                newPropertyEditor.name = "Item: " + field.Name;
                newPropertyEditor.transform.SetParent(transform, false);

                Text headerText = newPropertyEditor.GetComponentsInChildren <Text>().FirstOrDefault(d => d.name == "PropName");
                headerText.text = field.Name;

                InputField curInput = newPropertyEditor.GetComponentInChildren <InputField>();
                curInput.text = "0";

                InputField localInput = curInput;

                InputField.SubmitEvent submitEvent = new InputField.SubmitEvent();
                submitEvent.AddListener(delegate
                {
                    localInput.text = int.Parse(localInput.text).ZeroMin().ToString();
                });
                curInput.onEndEdit = submitEvent;

                Button increaseButton = newPropertyEditor.GetComponentsInChildren <Button>().FirstOrDefault(d => d.gameObject.name == "IncreaseButton");
                Button decreaseButton = newPropertyEditor.GetComponentsInChildren <Button>().FirstOrDefault(d => d.gameObject.name == "DecreaseButton");
                Button purchaseButton = newPropertyEditor.GetComponentsInChildren <Button>().FirstOrDefault(d => d.gameObject.name == "PurchaseButton");

                increaseButton.onClick.AddListener(delegate
                {
                    int numInput = int.Parse(localInput.text);
                    numInput++;
                    localInput.text = numInput.ZeroMin().ToString();
                });

                decreaseButton.onClick.AddListener(delegate
                {
                    int numInput = int.Parse(localInput.text);
                    numInput--;
                    localInput.text = numInput.ZeroMin().ToString();
                });

                var localField = field;
                purchaseButton.onClick.AddListener(delegate
                {
                    int numInput = int.Parse(localInput.text);
                    localField.SetValue(Manager, (int)localField.GetValue(Manager) + numInput);
                });
            }
        }
    }
Beispiel #8
0
        private void Start()
        {
            var se = new InputField.SubmitEvent();

            se.AddListener(OnSubmit);
            m_InputField.onEndEdit = se;
        }
Beispiel #9
0
    public void EndInput()
    {
        var submitEvent = new InputField.SubmitEvent();

        submitEvent.AddListener(SubmitName);
        input.onEndEdit = submitEvent;
    }
Beispiel #10
0
 //Activate UI name field and listen for input
 void Start()
 {
     submitEvent = new InputField.SubmitEvent();
     input.gameObject.SetActive(true);
     submitEvent.AddListener(GameManagerScript.control.SetName);
     input.onEndEdit = submitEvent;
 }
Beispiel #11
0
        private void initialise()
        {
            // Set up references
            instance = this; // Set singleton

            currentView    = ViewType.Login;
            viewBeforeHelp = ViewType.Login;

            // Move all canvases into camera
            foreach (Canvas c in AllCanvases)
            {
                c.gameObject.GetComponent <RectTransform>().offsetMax = new Vector2(0, 0);
                c.gameObject.GetComponent <RectTransform>().offsetMin = new Vector2(0, 128);
            }

            // Show menu canvas on start
            disableViews();
            enableView(currentView);

            // Create events to handle user input
            inputSubmitEvent = new InputField.SubmitEvent();
            inputSubmitEvent.AddListener(handleInput);

            // Apply events to GUI components
            playerInput.onEndEdit = inputSubmitEvent;

            // Hide text input until player logs in
            playerInput.gameObject.SetActive(false);
            outputBoxText.transform.parent.gameObject.SetActive(false);

            //Change resolution
            Screen.SetResolution(320, 480, false);
        }
Beispiel #12
0
    public void GetNick()
    {
        var se = new InputField.SubmitEvent();

        se.AddListener(SubmitNick);
        nickImput.onEndEdit = se;
    }
Beispiel #13
0
    void Start()
    {
        var se = new InputField.SubmitEvent();

        se.AddListener(TryConnect);
        input_field.onEndEdit = se;
    }
Beispiel #14
0
    public void Startup()
    {
        controller                = GameObject.Find("GameController").GetComponent <GameController> ();
        ingress_call_text         = GameObject.Find("IngressNumber").GetComponent <Text> ();
        egress_call_text          = GameObject.Find("EgressNumber").GetComponent <Text> ();
        dangerous_func_text       = GameObject.Find("TheStrings").GetComponent <Text> ();
        dangerous_func_count_text = GameObject.Find("interestingFuncNumber").GetComponent <Text> ();
        basic_blks_text           = GameObject.Find("BasicBlocksSelector").GetComponent <Text> ();
        strings_text              = GameObject.Find("AttributeMiddle").GetComponentsInChildren <Text> () [0];
        strings_count_text        = GameObject.Find("stringsNumber").GetComponent <Text> ();
        module_name_text          = GameObject.Find("ModuleName").GetComponent <Text> ();
        func_name_input           = GameObject.Find("longFuncRenameInput").GetComponent <InputField> ();
        func_name_text            = GameObject.Find("LongFuncName").GetComponent <Text> ();
        func_address_text         = GameObject.Find("Address").GetComponent <Text> ();
        func_name_group           = GameObject.Find("LongNamePanel").GetComponent <HorizontalLayoutGroup> ();
        comment_input             = GameObject.Find("NotesInputField").GetComponent <InputField> ();
        mark_input                = GameObject.Find("markInputField").GetComponent <InputField> ();
        marked_scroll_canvas      = GameObject.Find("MarklistContent").GetComponent <Canvas> ();

        InputField.SubmitEvent commentChangeEvent = new InputField.SubmitEvent();
        commentChangeEvent.AddListener(ChangeComment);
        comment_input.onEndEdit = commentChangeEvent;

        InputField.SubmitEvent functionChangeEvent = new InputField.SubmitEvent();
        functionChangeEvent.AddListener(ChangeFunctionName);
        func_name_input.onEndEdit = functionChangeEvent;

        InputField.SubmitEvent markChangeEvent = new InputField.SubmitEvent();
        markChangeEvent.AddListener(ChangeMark);
        mark_input.onEndEdit = markChangeEvent;
    }
Beispiel #15
0
    void Start()
    {
        //direct db connection to where the db is stored in app
        //and open connection
        const string  connectionString = "URI=file:Assets\\Plugins\\MumboJumbos.db";
        IDbConnection dbcon            = new SqliteConnection(connectionString);

        dbcon.Open();

        //create query for user name
        IDbCommand   dbcmd = dbcon.CreateCommand();
        const string sql   =
            "SELECT StuUserName " +
            "FROM student";

        dbcmd.CommandText = sql;
        IDataReader reader = dbcmd.ExecuteReader();

        while (reader.Read())
        {
            string user = reader.GetString(0);

            Debug.Log(user);

            userList.Add(user);
        }
        var input = GrStudentUserName;
        var se    = new InputField.SubmitEvent();

        se.AddListener(CheckName);
        input.onEndEdit = se;

        //or simply use the line below,
        //input.onEndEdit.AddListener(CheckName);  // This also works
    }
Beispiel #16
0
    void Start()
    {
        var se = new InputField.SubmitEvent();

        se.AddListener(EnterInitials);
        input.onEndEdit = se;
    }
Beispiel #17
0
        // Start is called before the first frame update
        void Start()
        {
            var se = new InputField.SubmitEvent();

            se.AddListener(OnInputUserNameEndEdit);
            m_inputUserName.onEndEdit = se;
        }
Beispiel #18
0
    // Function that displays Participant ID, Randomisation ID, and Start prompts in order
    public static void SetupInitialScreen()
    {
        // Start and Rand inputs, initially set to inactive
        GameObject start = GameObject.Find("Start") as GameObject;

        start.SetActive(false);

        GameObject rand = GameObject.Find("RandomisationID") as GameObject;

        rand.SetActive(false);

        // Participant ID Input
        InputField pID = GameObject.Find("ParticipantID").GetComponent <InputField>();

        InputField.SubmitEvent se = new InputField.SubmitEvent();
        se.AddListener((value) => SubmitPID(value, start, rand));
        pID.onEndEdit = se;

        // Randomisation ID Input
        InputField rID = rand.GetComponent <InputField>();

        InputField.SubmitEvent se2 = new InputField.SubmitEvent();
        se2.AddListener((value) => SubmitRandID(value, start));
        rID.onEndEdit = se2;
    }
Beispiel #19
0
    public void GetHost()
    {
        var se = new InputField.SubmitEvent();

        se.AddListener(SubmitHost);
        hostImput.onEndEdit = se;
    }
Beispiel #20
0
    public void GetPort()
    {
        var se = new InputField.SubmitEvent();

        se.AddListener(SubmitPort);
        portImput.onEndEdit = se;
    }
Beispiel #21
0
    /// <summary>
    /// loads input field into program
    /// loads initial game interface values
    /// activates the loaded input field
    /// </summary>
    void Start()
    {
        _input  = this.GetComponent <InputField>();
        _submit = new InputField.SubmitEvent();
        _submit.AddListener(SubmitInput);

        _input.onEndEdit = _submit;

        //Initialized state for game, loaded from db.

        int lcHealth = GameManager.GameManagerInstance.GameModelInstance.DataServiceInstance.GetHealth(GameManager.GameManagerInstance.GameModelInstance._currentPlayer._email);

        _healthOutput.text = lcHealth.ToString();


        string lcStory = GameManager.GameManagerInstance.GameModelInstance.DataServiceInstance.
                         GetStory(
            GameManager.GameManagerInstance.GameModelInstance._currentPlayer._email
            );

        _output.text = lcStory.ToString() + CommandProcessor.AvailableActions(GameManager.GameManagerInstance.GameModelInstance._currentPlayer);
        //if (GameManager.GameManagerInstance.ActiveCanvas.name != "cnvInventory" & GameManager.GameManagerInstance.ActiveCanvas.name != "cnvMap")
        //{
        //_output.text = CommandProcessor.StoryDisplay(GameManager.GameManagerInstance.GameModelInstance._currentPlayer);
        //}

        _input.ActivateInputField();
    }
Beispiel #22
0
    // Use this for initialization
    void Start()
    {
        coroutineStarted = false;
        yes          = false;
        no           = false;
        continueGame = false;

        yesno.SetActive(false);
//		bool change = true;
        tx = "  ";

        txt.text          = " ";
        instructions.text = " ";
        gameover.text     = " ";

        inputField.SetActive(false);
        //steps = 1;

        se = new InputField.SubmitEvent();
        se.AddListener(SubmitInput);
        input.onEndEdit = se;


        StartCoroutine("MyEvent");
    }
Beispiel #23
0
    void Start()
    {
        var input_name     = projectName.GetComponent <InputField>();
        var input_location = projectLocation.GetComponent <InputField>();
        var input_cost     = projectCost.GetComponent <InputField>();
        var input_timeline = projectTimeline.GetComponent <InputField>();
        //SEND INPUT TO STRING
        var se_name     = new InputField.SubmitEvent();
        var se_location = new InputField.SubmitEvent();
        var se_cost     = new InputField.SubmitEvent();
        var se_timeline = new InputField.SubmitEvent();

        //GET STRING
        se_name.AddListener(submit_projectName);
        se_location.AddListener(submit_projectLocation);
        se_cost.AddListener(submit_projectCost);
        se_timeline.AddListener(submit_projectTimeline);
        //SAVE FROM STRING TO STRING
        input_name.onEndEdit     = se_name;
        input_location.onEndEdit = se_location;
        input_cost.onEndEdit     = se_cost;
        input_timeline.onEndEdit = se_timeline;
        //BUTTON SUBMIT
        back.onClick.AddListener(Home);
        submit.onClick.AddListener(submit_project);
    }
Beispiel #24
0
 // Use this for initialization
 void Start()
 {
     input = gameObject.GetComponent<InputField>();
     se = new InputField.SubmitEvent();
     se.AddListener(SubmitInput);
     input.onEndEdit = se;
 }
Beispiel #25
0
    // Use this for initialization
    void Awake()
    {
        //Set the error massage to inactive
        lengthErrorMessage.SetActive(false);
        //Get input field
        input = gameObject.GetComponent <InputField>();
        //Set the username if there is any
        input.text = PlayerPrefs.GetString(Const.username);
        //Create a new submit event
        InputField.SubmitEvent se = new InputField.SubmitEvent();
        //Add listener
        se.AddListener((v) =>
        {
            //Check if the character is atleast 6 long
            if (v.Length > 6)
            {
                lengthErrorMessage.SetActive(false);
                //Update the username
                PlayerPrefs.SetString(Const.username, v);
            }
            else
            {
                lengthErrorMessage.SetActive(true);
            }
        });
        //Add event to button
        input.onEndEdit = se;

        // Sets the MyValidate method to invoke after the input field's default input validation invoke (default validation happens every time a character is entered into the text field.)
        input.onValidateInput += (input, charIndex, addedChar) => {
            return(char.IsLetterOrDigit(addedChar)?addedChar: '\0');
        };
    }
Beispiel #26
0
    private void Start()
    {
        var name = new InputField.SubmitEvent();

        name.AddListener(SetName);
        _inputerName.onEndEdit = name;
    }
 void Start()
 {
     _parentEntity = gameObject.FindInParents<EntityElement>();
     _inputField = GetComponent<InputField>();
     InputField.SubmitEvent submitEvent = new InputField.SubmitEvent();
     submitEvent.AddListener(EditDone);
     _inputField.onEndEdit = submitEvent;
 }
// when used as the return type or a method, void specifies that the method doesn't return a value.
// void isn't allowed in the parameter list of a method.
// input is the interface to the input system.
// this.GetComponent is the type of Component we are retreiving. In this instance because there is nothing in the brackets
// the GetComponent will return a null instead of a (Type type).
// Inputfield turns a label into an interactible field.
// Inputfield.SumbitEvent is a Unity event with a inputfield as a param.
// AddListener adds a non persistent listener to the UnityEvent. Using it adds a runtime callback. The parameter is a callback function.
// In this instance the call back function is SubmitInput.
// input.onEndEdit is a Unity event to call when editing has ended.
// output.text is set to the Description related to the CurrentScene and CurrentPlayer within the GameModel.


// input is a field of TextInput.
// this indicates towards TextInput as it points to the class it is currently in.
// GetComponent gets the InputField without parameters.
// InputField is a class of The UnityEngine.UI Class.
// input is set to GetComponent of InputField.
// se is a field of TextInput.
// se is set to being a new InputField.SubmitEvent.
// se.AddListener calls a Listner with the SubmitInput parameter.
// input.onEndEdit = se sets if input.onEndEdit is used then the newInputField.SubmitEvent will occur.
// output.text is set to equal GameModel.currentPlayer.CurrentScene.Description;
// Gamemodel is a class.
// currentPlayer is of both Gamemodel and Player and has a get set.
// CurrentScene is of both Scene and Player and has a get set.
// Description is a String within the Scene with a get set.


    void Start()
    {
        input = this.GetComponent <InputField>();
        se    = new InputField.SubmitEvent();
        se.AddListener(SubmitInput);
        input.onEndEdit = se;
        output.text     = GameModel.currentPlayer.CurrentScene.Description;
    }
Beispiel #29
0
    // Use this for initialization
    void Start()
    {
        mainInputField.ActivateInputField();
        var se = new InputField.SubmitEvent();

        se.AddListener(SubmitName);
        mainInputField.onEndEdit = se;
    }
Beispiel #30
0
    void Start()
    {
        inputField = GetComponent <InputField>();
        var submit = new InputField.SubmitEvent();

        submit.AddListener(login.Login);
        inputField.onEndEdit = submit;
    }
Beispiel #31
0
    //public string commandType = "game";

    // Use this for initialization


    /*=====================+Sets up current text interface+========================*/
    void Start()
    {
        input       = this.GetComponent <InputField>();
        submitEvent = new InputField.SubmitEvent();
        submitEvent.AddListener(submitInput);
        input.onEndEdit = submitEvent;
        output.text     = GameManager.instance.gameModel.currentScene.fullScene;
    }
Beispiel #32
0
    // Use this for initialization
    void Start()
    {
        loginField = GetComponentInChildren <InputField> ();
        var submitEvent = new InputField.SubmitEvent();

        submitEvent.AddListener(Event_AcceptClick);
        loginField.onEndEdit = submitEvent;
    }
Beispiel #33
0
    void Start()
    {
        _ballPosition = transform.position;
        var se = new InputField.SubmitEvent();

        se.AddListener(GetHeight);
        _heightField.onEndEdit = se;
    }
    // Use this for initialization
    void Start()
    {
        var input = gameObject.GetComponent <InputField>();
        var se    = new InputField.SubmitEvent();

        se.AddListener(SubmitName);
        input.onEndEdit = se;
    }
Beispiel #35
0
 void Awake()
 {
     //consoleTextBox = GetComponentInChildren<Image>();
     commandInput = GetComponentInChildren<InputField>();
     InputField.SubmitEvent submitEvent = new InputField.SubmitEvent();
     submitEvent.AddListener(SubmitCommand);
     commandInput.onEndEdit = submitEvent;
     ToggleConsole(false);
 }
Beispiel #36
0
	void Start ()
	{



		var se = new InputField.SubmitEvent();
		se.AddListener(ProcessCommand);
		input.onEndEdit = se;
	
		Console.text = "Poly Maker v1.0.0 loaded.";
		//or simply use the line below, 
		//input.onEndEdit.AddListener(SubmitName);  // This also works
	}
Beispiel #37
0
    // Use this for initialization
    void Start()
    {
        ChatBackgroundPanel.MoveToTopComplete += ToggleVisibility;
        ChatBackgroundPanel.MoveToOriginalPosStart += ToggleVisibility;

        //OnSubmit method is currently broken,
        //so we need to use give the submit event
        //to onEndEdit to let it know to use the
        //submit event instead of clicking away event
        InputField.SubmitEvent submitEvent = new InputField.SubmitEvent();
        submitEvent.AddListener(SubmittedText);
        InputField inputField = GetComponent<InputField>();
        inputField.onEndEdit = submitEvent;

        this.gameObject.SetActive(false);
    }
Beispiel #38
0
    void Start()
    {
        // Add listener to catch the submit
        InputField.SubmitEvent submitEvent = new InputField.SubmitEvent();
        submitEvent.AddListener(SubmitName);
        nameInputField.onEndEdit = submitEvent;

        // Add validation
        nameInputField.characterValidation = InputField.CharacterValidation.EmailAddress;

        if (Application.platform == RuntimePlatform.IPhonePlayer) {

            path = ("Screenshot" + ".png");
        }
            else if (Application.platform == RuntimePlatform.Android) {
            path = (Application.persistentDataPath + "/Screenshot" + ".png");
        } else {
            path = (Application.persistentDataPath + "/Screenshot" + ".png");
        }
    }
	// Use this for initialization
	void Start () {
        historyIndex = 0;
        consoleHistory = new List<string>();

        initMap();
        writeHelp();

        hasKey = false;

        genericAnswers.Add("What do you say???");
        genericAnswers.Add("huh?");
        genericAnswers.Add("i wouldn't do that dave!");
        genericAnswers.Add("nothing to do there!");

        playerPosX = 2;
        playerPosY = 2;
        wrongAnswers = 0;

        input.ActivateInputField();
        se = new InputField.SubmitEvent();
        se.AddListener(SubmitInput);
        input.onEndEdit = se;
	}
Beispiel #40
0
    void Start()
    {
        if (name == "State" || name == "Sex" || name == "Patient Select")
        {
            Dropdown menu = gameObject.GetComponent<Dropdown>();
            menu.onValueChanged.AddListener(delegate { CheckSelection(menu); });
        }
        else if(name == "Audio Mod" || name == "Visual Mod")
        {
            Toggle checkbox = gameObject.GetComponent<Toggle>();
            checkbox.onValueChanged.AddListener(delegate { UpdateBool(checkbox); });
            info = "true";

        }
        else
        {
            InputField input = gameObject.GetComponent<InputField>();
            InputField.SubmitEvent se = new InputField.SubmitEvent();
            se.AddListener(CheckInfo);
            input.onEndEdit = se;
        }

        manager = submit_button.GetComponent<FormManager>();
        manager.inputs.Add(name, this);
    }
Beispiel #41
0
    // Use this for initialization
    void Start()
    {
        InputField.SubmitEvent submitEvent = new InputField.SubmitEvent ();
        submitEvent.AddListener (GetRotationX);
        _InputField_RotationX.onEndEdit = submitEvent;

        submitEvent = new InputField.SubmitEvent ();
        submitEvent.AddListener (GetRotationY);
        _InputField_RotationY.onEndEdit = submitEvent;

        submitEvent = new InputField.SubmitEvent ();
        submitEvent.AddListener (GetRotationZ);
        _InputField_RotationZ.onEndEdit = submitEvent;

        submitEvent = new InputField.SubmitEvent ();
        submitEvent.AddListener (GetScaleX);
        _InputField_ScaleX.onEndEdit = submitEvent;

        submitEvent = new InputField.SubmitEvent ();
        submitEvent.AddListener (GetScaleY);
        _InputField_ScaleY.onEndEdit = submitEvent;

        submitEvent = new InputField.SubmitEvent ();
        submitEvent.AddListener (GetScaleZ);
        _InputField_ScaleZ.onEndEdit = submitEvent;

        Invoke ("SetOriginalValues", 2);
        SetOriginalValues ();
    }
Beispiel #42
0
    public void Startup()
    {
        controller = GameObject.Find ("GameController").GetComponent<GameController> ();
        ingress_call_text = GameObject.Find ("IngressNumber").GetComponent<Text> ();
        egress_call_text = GameObject.Find ("EgressNumber").GetComponent<Text> ();
        dangerous_func_text = GameObject.Find ("TheStrings").GetComponent<Text> ();
        dangerous_func_count_text = GameObject.Find ("interestingFuncNumber").GetComponent<Text> ();
        basic_blks_text = GameObject.Find ("BasicBlocksSelector").GetComponent<Text> ();
        strings_text = GameObject.Find ("AttributeMiddle").GetComponentsInChildren<Text> () [0];
        strings_count_text = GameObject.Find ("stringsNumber").GetComponent<Text> ();
        module_name_text = GameObject.Find ("ModuleName").GetComponent<Text> ();
        func_name_input = GameObject.Find ("longFuncRenameInput").GetComponent<InputField> ();
        func_name_text = GameObject.Find ("LongFuncName").GetComponent<Text> ();
        func_address_text = GameObject.Find ("Address").GetComponent<Text> ();
        func_name_group = GameObject.Find ("LongNamePanel").GetComponent<HorizontalLayoutGroup> ();
        comment_input = GameObject.Find ("NotesInputField").GetComponent<InputField> ();
        mark_input = GameObject.Find ("markInputField").GetComponent<InputField> ();
        marked_scroll_canvas = GameObject.Find ("MarklistContent").GetComponent<Canvas> ();

        InputField.SubmitEvent commentChangeEvent = new InputField.SubmitEvent ();
        commentChangeEvent.AddListener (ChangeComment);
        comment_input.onEndEdit = commentChangeEvent;

        InputField.SubmitEvent functionChangeEvent = new InputField.SubmitEvent ();
        functionChangeEvent.AddListener (ChangeFunctionName);
        func_name_input.onEndEdit = functionChangeEvent;

        InputField.SubmitEvent markChangeEvent = new InputField.SubmitEvent ();
        markChangeEvent.AddListener (ChangeMark);
        mark_input.onEndEdit = markChangeEvent;
    }
Beispiel #43
0
    // Use this for initialization
    public void Start()
    {
        // Gets input out of input field
        var input = GameObject.Find("InputFieldWew").GetComponent<InputField> ();
        var se = new InputField.SubmitEvent ();
        se.AddListener (SubmitName);
        input.onEndEdit = se;

        LoadDataset ();
    }
 private void Start()
 {
     InputField.SubmitEvent submitEvent = new InputField.SubmitEvent();
     submitEvent.AddListener(SubmitName);
     nameInputField.onEndEdit = submitEvent;
 }