示例#1
0
        /** 更新。
         */
        private void Main()
        {
            if (this.playerloop_flag == true)
            {
                UnityEngine.GameObject t_new_gameobject;

                if (UnityEngine.EventSystems.EventSystem.current != null)
                {
                    t_new_gameobject = UnityEngine.EventSystems.EventSystem.current.currentSelectedGameObject;
                }
                else
                {
                    t_new_gameobject = null;
                }

                if (t_new_gameobject != this.ui_gameobject)
                {
                    //OnCheckFocusの呼び出し。
                    if (this.ui_gameobject != null)
                    {
                        Fee.Focus.Focus_MonoBehaviour t_focus = this.ui_gameobject.GetComponent <Fee.Focus.Focus_MonoBehaviour>();
                        if (t_focus != null)
                        {
                            t_focus.CallOnFocusCheck();
                        }
                    }

                    this.ui_gameobject = t_new_gameobject;

                    //OnCheckFocusの呼び出し。
                    if (this.ui_gameobject != null)
                    {
                        Fee.Focus.Focus_MonoBehaviour t_focus = this.ui_gameobject.GetComponent <Fee.Focus.Focus_MonoBehaviour>();
                        if (t_focus != null)
                        {
                            t_focus.CallOnFocusCheck();
                        }
                    }
                }
            }
        }
示例#2
0
        /** 初期化。
         */
        public void Initialize(InputField2D a_parent)
        {
            //raw
            this.raw_gameobject          = Fee.Instantiate.Instantiate.CreateUiInputField("InputField", Fee.Render2D.Render2D.GetInstance().GetRootTransform());
            this.raw_focus_monobehaviour = this.raw_gameobject.AddComponent <Fee.Focus.Focus_MonoBehaviour>();
            this.raw_transform           = this.raw_gameobject.GetComponent <UnityEngine.Transform>();
            this.raw_inputfield          = this.raw_gameobject.GetComponent <UnityEngine.UI.InputField>();
            this.raw_recttransform       = this.raw_gameobject.GetComponent <UnityEngine.RectTransform>();
            this.raw_text             = this.raw_inputfield.textComponent;
            this.raw_image            = this.raw_inputfield.image;
            this.raw_placeholder_text = this.raw_inputfield.placeholder.GetComponent <UnityEngine.UI.Text>();
            this.raw_gameobject.SetActive(false);

            {
                UnityEngine.UI.Navigation t_navigation = this.raw_inputfield.navigation;
                t_navigation.mode = UnityEngine.UI.Navigation.Mode.None;
                this.raw_inputfield.navigation = t_navigation;
            }

            //共通マテリアルアイテム複製。
            this.raw_custom_text_material_item  = Render2D.GetInstance().GettMaterialItem(MaterialType.UiText).Duplicate();
            this.raw_custom_image_material_item = Render2D.GetInstance().GettMaterialItem(MaterialType.UiInputImage).Duplicate();
        }