Example #1
0
        private void SelectTexture(bool create)
        {
            ISelectObjectDialog objectSelector  = null;
            Transform           dialogTransform = IOC.Resolve <IWindowManager>().CreateDialogWindow(m_selectTextureWindow, "Select Texture",
                                                                                                    (sender, args) =>
            {
                if (!objectSelector.IsNoneSelected)
                {
                    OnTextureSelected((Texture2D)objectSelector.SelectedObject, create);
                }
            });

            objectSelector            = IOC.Resolve <ISelectObjectDialog>();
            objectSelector.ObjectType = typeof(Texture2D);
        }
Example #2
0
        private void OnAddButtonClick()
        {
            ISelectObjectDialog objectSelector  = null;
            Transform           dialogTransform = IOC.Resolve <IWindowManager>().CreateDialogWindow(m_selectTextureWindow, "Select Texture",
                                                                                                    (sender, args) =>
            {
                if (!objectSelector.IsNoneSelected)
                {
                    CreateBrush((Texture2D)objectSelector.SelectedObject);
                }
            });

            objectSelector            = IOC.Resolve <ISelectObjectDialog>();
            objectSelector.ObjectType = typeof(Texture2D);
        }
Example #3
0
        private void OnSelect()
        {
            ISelectObjectDialog objectSelector = null;

            IWindowManager wm = IOC.Resolve <IWindowManager>();

            Type   memberInfoType     = GetMemberType();
            string memberInfoTypeName = m_localization.GetString("ID_RTEditor_PE_TypeName_" + memberInfoType.Name, memberInfoType.Name);
            string select             = m_localization.GetString("ID_RTEditor_PE_ObjectEditor_Select", "Select") + " ";

            if (wm.IsWindowRegistered("Select" + memberInfoType.Name))
            {
                Transform dialogTransform = IOC.Resolve <IWindowManager>().CreateDialogWindow("Select" + memberInfoType.Name, select + memberInfoTypeName,
                                                                                              (sender, args) =>
                {
                    if (objectSelector.IsNoneSelected)
                    {
                        SetObject(null);
                    }
                    else
                    {
                        SetObject(objectSelector.SelectedObject);
                    }
                });
            }
            else
            {
                Transform dialogTransform = IOC.Resolve <IWindowManager>().CreateDialogWindow(RuntimeWindowType.SelectObject.ToString(), select + memberInfoTypeName,
                                                                                              (sender, args) =>
                {
                    if (objectSelector.IsNoneSelected)
                    {
                        SetObject(null);
                    }
                    else
                    {
                        SetObject(objectSelector.SelectedObject);
                    }
                });
            }

            objectSelector            = IOC.Resolve <ISelectObjectDialog>();
            objectSelector.ObjectType = GetMemberType();
        }
Example #4
0
        private void OnSelect()
        {
            ISelectObjectDialog objectSelector  = null;
            Transform           dialogTransform = IOC.Resolve <IWindowManager>().CreateDialogWindow(RuntimeWindowType.SelectObject.ToString(), "Select " + MemberInfoType.Name,
                                                                                                    (sender, args) =>
            {
                if (objectSelector.IsNoneSelected)
                {
                    SetValue(null);
                    EndEdit();
                    SetInputField(null);
                }
                else
                {
                    SetValue(objectSelector.SelectedObject);
                    EndEdit();
                    SetInputField(objectSelector.SelectedObject);
                }
            });

            objectSelector            = IOC.Resolve <ISelectObjectDialog>();// dialogTransform.GetComponentInChildren<SelectObjectDialog>();
            objectSelector.ObjectType = MemberInfoType;
        }