Beispiel #1
0
        /** 更新。
         */
        public void Main()
        {
            UnityEngine.GameObject t_new_gameobject = UnityEngine.EventSystems.EventSystem.current.currentSelectedGameObject;

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

                this.gameobject = t_new_gameobject;

                //OnCheckFocusの呼び出し。
                if (this.gameobject != null)
                {
                    Fee.Ui.Focus_MonoBehaviour t_focus = this.gameobject.GetComponent <Fee.Ui.Focus_MonoBehaviour>();
                    if (t_focus != null)
                    {
                        t_focus.CallOnFocusCheck();
                    }
                }
            }
        }
Beispiel #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.Ui.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().GetUiTextMaterialItem().DuplicateMaterialItem();
            this.raw_custom_image_material_item = Render2D.GetInstance().GetUiImageMaterialItem().DuplicateMaterialItem();
        }