Beispiel #1
0
        public DesignedDockContent AddArea(DockpanelArea.Dock dock, float r = 0.5f)
        {
            var          area = dockArea.AddArea(dock, r);
            ModelElement au   = new ModelElement();

            au.Load(layout.Auxiliary.ModData);
            var con = new DesignedDockContent(layout);

            con.Initial(area, au);
            layout.contents.Add(con);
            return(con);
        }
        public DesignedDockAuxiliary AddArea(DockpanelArea.Dock dock, float r = 0.5f)
        {
            var area  = dockArea.AddArea(dock, r);
            var go    = HGUIManager.GameBuffer.Clone(layout.Auxiliary);
            var trans = go.transform;

            trans.SetParent(area.model.transform);
            trans.localScale    = Vector3.one;
            trans.localRotation = Quaternion.identity;
            var au  = go.GetComponent <UIElement>();
            var con = new DesignedDockAuxiliary(layout);

            con.Initial(area, au);
            layout.contents.Add(con);
            return(con);
        }
Beispiel #3
0
        void PointUp(EventCallBack callBack, UserAction action)
        {
            Cover.activeSelf = false;
            //if(layout.DragAuxiliary==this)
            //{
            //    if(contents.Count<2)
            //    {
            //        return;
            //    }
            //}
            layout.DragAuxiliary.RemoveContent(layout.DragContent);
            var area = layoutArea.AddArea((DockpanelArea.Dock)callBack.DataContext);

            //area.auxiliary.AddContent(layout.DragContent);
            //area.SizeChanged();
            layout.Refresh();
        }