Ejemplo n.º 1
0
 public void OnLayoutRebuilt(IXmlLayoutController controller)
 {
     _controller = controller;
     _xmlLayout  = (XmlLayout)controller.XmlLayout;
     //Debug.Log("Updating obj list");
     UpdateObjList(objList);
 }
Ejemplo n.º 2
0
        public void OnLayoutRebuilt(IXmlLayoutController xmlLayoutController)
        {
            _controller = xmlLayoutController;
            _XmlLayout  = (XmlLayout)_controller.XmlLayout;

            Flyout.Initialize(_XmlLayout.GetElementById("flyout-DesignerTools"));
            Flyout.Open();
        }
Ejemplo n.º 3
0
        public void OnLayoutRebuilt(IXmlLayoutController xmlLayoutController)
        {
            _controller        = xmlLayoutController;
            _xmlLayout         = (XmlLayout)_controller.XmlLayout;
            _resizeSliderValue = _xmlLayout.GetElementById("Resizeslider-value");

            flyout.Initialize(_xmlLayout.GetElementById("flyout-DesignerTools"));
            flyout.Open();
        }
Ejemplo n.º 4
0
        public void OnLayoutRebuilt(IXmlLayoutController xmlLayoutController)
        {
            this._controller = xmlLayoutController;

            this._rollRateBarPositive =
                this._controller.XmlLayout.GetElementById("positiveRollRateBar");
            this._rollRateBarNegative =
                this._controller.XmlLayout.GetElementById("negativeRollRateBar");
            this._pitchRateBarPositive =
                this._controller.XmlLayout.GetElementById("positivePitchRateBar");
            this._pitchRateBarNegative =
                this._controller.XmlLayout.GetElementById("negativePitchRateBar");
            this._yawRateBarPositive =
                this._controller.XmlLayout.GetElementById("positiveYawRateBar");
            this._yawRateBarNegative =
                this._controller.XmlLayout.GetElementById("negativeYawRateBar");

            this._rollAngleText  = this.GetTextElementById("rollAngle");
            this._rollRateText   = this.GetTextElementById("rollRate");
            this._pitchAngleText = this.GetTextElementById("pitchAngle");
            this._pitchRateText  = this.GetTextElementById("pitchRate");
            this._yawAngleText   = this.GetTextElementById("yawAngle");
            this._yawRateText    = this.GetTextElementById("yawRate");

            this._rangeText          = this.GetTextElementById("range");
            this._rateOfApproachText = this.GetTextElementById("rateOfApproach");

            this._targetOffsetX    = this.GetTextElementById("offsetX");
            this._targetOffsetY    = this.GetTextElementById("offsetY");
            this._targetOffsetZ    = this.GetTextElementById("offsetZ");
            this._translationRateX = this.GetTextElementById("translationRateX");
            this._translationRateY = this.GetTextElementById("translationRateY");
            this._translationRateZ = this.GetTextElementById("translationRateZ");
            // this._debug1 = this.GetTextElementById("debug1");
            // this._debug2 = this.GetTextElementById("debug2");
            // this._debug3 = this.GetTextElementById("debug3");

            this.ClearText();
            this.SetRotationRateBars(new Vector3(0, 0, 0));

            foreach (var layoutRoot in ((XmlLayout)this._controller.XmlLayout).GetElementsByClass("layoutRoot"))
            {
                layoutRoot.SetActive(true);
            }

            this._isInitialized = true;
        }
Ejemplo n.º 5
0
        public void OnLayoutRebuilt(IXmlLayoutController xmlLayoutController)
        {
            OrthoSize = DesignerCamera.orthographicSize;
            //_MouseDrag = new MouseDrag (_Designer.GizmoCamera);
            Mod.Instance.ViewToolsUI = this;

            _controller         = xmlLayoutController;
            _XmlLayout          = (XmlLayout)_controller.XmlLayout;
            _ZoomPanel          = _XmlLayout.GetElementById("ZoomPanel");
            _ImageSelector      = _XmlLayout.GetElementById("ImageSelector");
            _ViewToolsPin       = _XmlLayout.GetElementById("ViewToolsPin");
            _ImageConfirmButton = _XmlLayout.GetElementById("ImageConfirmButton");
            _XmlLayout.GetElementById("FolderPathText").SetAndApplyAttribute("text", "Folder location : " + _Path);

            if (DesignerCamera.orthographic == true)
            {
                XmlElement OrthoToggle = _XmlLayout.GetElementById("OrthoToggle");
                OrthoToggle.SetAndApplyAttribute("isOn", "true");
                _ZoomPanel.SetActive(true);
                OrthoViewActive = true;
            }

            UpdateReferenceImages(Mod.Instance._ReferenceImages);

            _DesignerParts = Game.Instance.CachedDesignerParts;
            foreach (DesignerPart part in _DesignerParts.Parts)
            {
                if (part.PartTypes.First().Id == "Fuselage1")
                {
                    _Fuselage = part;
                }
            }

            foreach (PartData part in _Designer.CraftScript.Data.Assembly.Parts)
            {
                PartScript _part = (PartScript)part.PartScript;
                if (_part.name == "DesignerToolsRefPart")
                {
                    _Designer.SelectPart(_part, null, false);
                    _Designer.DeleteSelectedParts();
                }
            }
        }
Ejemplo n.º 6
0
 public void OnLayoutRebuilt(IXmlLayoutController controller)
 {
     this._controller = controller;
     //_Flyout.Initialize(((XmlLayout)_controller.XmlLayout).GetElementById("flyout-Mesh2Craft"));
     //_Flyout.Open();
 }