Example #1
0
        /// <summary>
        ///
        /// </summary>
        public bool ChangeKeyFor(bl_InputBindingUI button)
        {
            if (isFetchingKey)
            {
                return(false);
            }

            isFetchingKey     = true;
            currentFetchInput = button;
            return(true);
        }
Example #2
0
        /// <summary>
        ///
        /// </summary>
        void InstanceKeys()
        {
            bl_InputData.Instance.Initialize();
            if (bl_InputData.Instance.mappedInstance == null)
            {
                Debug.Log("Button Mapped has not been assigned in Input Manager."); return;
            }
            cachedBindings.ForEach(x => { Destroy(x.gameObject); });
            cachedBindings.Clear();
            List <ButtonData> buttons = bl_InputData.Instance.mappedInstance.ButtonMap;
            GameObject        template;

            for (int i = 0; i < buttons.Count; i++)
            {
                template = Instantiate(KeyBindingTemplate) as GameObject;
                template.transform.SetParent(ListPanel, false);
                template.SetActive(true);
                bl_InputBindingUI script = template.GetComponent <bl_InputBindingUI>();
                script.Set(buttons[i], this);
                cachedBindings.Add(script);
            }
            ConfirmChangeWindow.transform.SetAsLastSibling();
            initialized = true;
        }