//mxd
 public override void OnTextureFit(FitTextureOptions options)
 {
     if (!General.Map.UDMF)
     {
         return;
     }
     if (string.IsNullOrEmpty(Sidedef.MiddleTexture) || Sidedef.MiddleTexture == "-" || !Texture.IsImageLoaded)
     {
         return;
     }
     FitTexture(options);
     Setup();
 }
示例#2
0
        internal void OnTextureFit(FitTextureOptions options)
        {
            options.Bounds             = Bounds;
            options.GlobalBounds       = GlobalBounds;
            options.InitialOffsetX     = OffsetX;
            options.InitialOffsetY     = OffsetY;
            options.ControlSideOffsetX = ControlSideOffsetX;
            options.ControlSideOffsetY = ControlSideOffsetY;
            options.InitialScaleX      = ScaleX;
            options.InitialScaleY      = ScaleY;

            Side.OnTextureFit(options);
        }
        //mxd
        public override void OnTextureFit(FitTextureOptions options)
        {
            if (!General.Map.UDMF)
            {
                return;
            }
            if (string.IsNullOrEmpty(extrafloor.Linedef.Front.MiddleTexture) || extrafloor.Linedef.Front.MiddleTexture == "-" || !Texture.IsImageLoaded)
            {
                return;
            }
            FitTexture(options);

            // Update the model sector to update all 3d floors
            mode.GetVisualSector(extrafloor.Linedef.Front.Sector).UpdateSectorGeometry(false);
        }
        private void UpdateChanges()
        {
            // Apply changes
            FitTextureOptions options = new FitTextureOptions
            {
                FitAcrossSurfaces = (cbfitconnected.Enabled && cbfitconnected.Checked),
                FitWidth          = cbfitwidth.Checked,
                FitHeight         = cbfitheight.Checked,
                HorizontalRepeat  = (int)horizrepeat.Value,
                VerticalRepeat    = (int)vertrepeat.Value
            };

            foreach (SortedVisualSide side in strips)
            {
                side.OnTextureFit(options);
            }
        }
        //mxd
        public override void OnTextureFit(FitTextureOptions options)
        {
            if (!General.Map.UDMF)
            {
                return;
            }
            if (string.IsNullOrEmpty(Sidedef.MiddleTexture) || Sidedef.MiddleTexture == "-" || !Texture.IsImageLoaded)
            {
                return;
            }
            FitTexture(options);
            Setup();

            // Update linked effects
            SectorData sd = mode.GetSectorDataEx(Sector.Sector);

            if (sd != null)
            {
                sd.Reset(true);
            }
        }
        private void UpdateChanges()
        {
            // Apply changes
            FitTextureOptions options = new FitTextureOptions
            {
                FitAcrossSurfaces = (cbfitconnected.Enabled && cbfitconnected.Checked),
                FitWidth          = cbfitwidth.Checked,
                FitHeight         = cbfitheight.Checked,
                PatternWidth      = (int)patternwidth.GetResultFloat(0),
                PatternHeight     = (int)patternheight.GetResultFloat(0),
                AutoWidth         = cbautowidth.Checked,
                AutoHeight        = cbautoheight.Checked,
                HorizontalRepeat  = (float)horizrepeat.GetResultFloat(0),
                VerticalRepeat    = (float)vertrepeat.GetResultFloat(0)
            };

            foreach (SortedVisualSide side in strips)
            {
                side.OnTextureFit(options);
            }
        }
示例#7
0
        private void UpdateChanges()
        {
            // Apply changes
            FitTextureOptions options = new FitTextureOptions
            {
                FitAcrossSurfaces = (cbfitconnected.Enabled && cbfitconnected.Checked),
                FitWidth          = cbfitwidth.Checked,
                FitHeight         = cbfitheight.Checked,
                PatternWidth      = (int)patternwidth.GetResultFloat(0),
                PatternHeight     = (int)patternheight.GetResultFloat(0),
                AutoWidth         = cbautowidth.Checked,
                AutoHeight        = cbautoheight.Checked
            };

            // Default horizonal repeat to 1 if  the value can't be parsed or if it's 0
            double hrepeat = horizrepeat.GetResultFloat(double.NaN);

            if (double.IsNaN(hrepeat) || hrepeat == 0.0)
            {
                hrepeat = 1.0;
            }

            // Default vertical repeat to 1 if  the value can't be parsed or if it's 0
            double vrepeat = vertrepeat.GetResultFloat(double.NaN);

            if (double.IsNaN(vrepeat) || vrepeat == 0.0)
            {
                vrepeat = 1.0;
            }

            options.HorizontalRepeat = hrepeat;
            options.VerticalRepeat   = vrepeat;

            foreach (SortedVisualSide side in strips)
            {
                side.OnTextureFit(options);
            }
        }
示例#8
0
 public virtual void OnTextureFit(FitTextureOptions options)
 {
 }                                                                       //mxd