mirror of
https://git.do.srb2.org/STJr/UltimateZoneBuilder.git
synced 2025-01-18 14:31:50 +00:00
Visual mode, UDMF: renamed "Scale Texture Up/Down (X/Y)" actions to "Increase/Decrease Horizontal/Vertical Scale". These actions can now be used on things.
This commit is contained in:
parent
aca13330a8
commit
4b01f8e9fb
9 changed files with 63 additions and 34 deletions
|
@ -761,11 +761,11 @@ movetexturedown8
|
|||
}
|
||||
|
||||
//mxd
|
||||
scaletextureupx
|
||||
scaleupx
|
||||
{
|
||||
title = "Scale Texture Up (X)";
|
||||
title = "Increase Horizontal Scale";
|
||||
category = "visual";
|
||||
description = "Increases horizontal scale of targeted or selected textures by 0.25 (UDMF only).";
|
||||
description = "Increases horizontal scale of targeted or selected textures or things by 0.1 (UDMF only).";
|
||||
allowkeys = true;
|
||||
allowmouse = true;
|
||||
allowscroll = true;
|
||||
|
@ -774,11 +774,11 @@ scaletextureupx
|
|||
}
|
||||
|
||||
//mxd
|
||||
scaletexturedownx
|
||||
scaledownx
|
||||
{
|
||||
title = "Scale Texture Down (X)";
|
||||
title = "Decrease Horizontal Scale";
|
||||
category = "visual";
|
||||
description = "Decreases horizontal scale of targeted or selected textures by 0.25 (UDMF only).";
|
||||
description = "Decreases horizontal scale of targeted or selected textures or things by 0.1 (UDMF only).";
|
||||
allowkeys = true;
|
||||
allowmouse = true;
|
||||
allowscroll = true;
|
||||
|
@ -787,11 +787,11 @@ scaletexturedownx
|
|||
}
|
||||
|
||||
//mxd
|
||||
scaletextureupy
|
||||
scaleupy
|
||||
{
|
||||
title = "Scale Texture Up (Y)";
|
||||
title = "Increase Vertical Scale";
|
||||
category = "visual";
|
||||
description = "Increases vertical scale of targeted or selected textures by 0.25 (UDMF only).";
|
||||
description = "Increases vertical scale of targeted or selected textures or things by 0.1 (UDMF only).";
|
||||
allowkeys = true;
|
||||
allowmouse = true;
|
||||
allowscroll = true;
|
||||
|
@ -800,11 +800,11 @@ scaletextureupy
|
|||
}
|
||||
|
||||
//mxd
|
||||
scaletexturedowny
|
||||
scaledowny
|
||||
{
|
||||
title = "Scale Texture Down (Y)";
|
||||
title = "Decrease Vertical Scale";
|
||||
category = "visual";
|
||||
description = "Decreases vertical scale of targeted or selected textures by 0.25 (UDMF only).";
|
||||
description = "Decreases vertical scale of targeted or selected textures or things by 0.1 (UDMF only).";
|
||||
allowkeys = true;
|
||||
allowmouse = true;
|
||||
allowscroll = true;
|
||||
|
|
|
@ -109,9 +109,10 @@ group things
|
|||
"Press <k>builder_visualselect</k> to select the highlighted thing"
|
||||
"Press <k>builder_clearselection</k> to clear selection"
|
||||
"Press <k>builder_deleteitem</k> to delete selected things"
|
||||
"Use <k>buildermodes_raisesector8</k> and <k>buildermodes_lowersector8</k> to change height of selected/targeted things by 8 map units"
|
||||
"Use <k>buildermodes_raisesector8</k> and <k>buildermodes_lowersector8</k> to change height of selected/targeted things by 8 map units"
|
||||
"Use <k>buildermodes_lowersectortonearest</k> and <k>buildermodes_raisesectortonearest</k> to align selected/targeted things to floor or ceiling"
|
||||
"Use <k>builder_movethingfwd</k>, <k>builder_movethingback</k>, <k>builder_movethingleft</k> and <k>builder_movethingright</k> to move selected things around"
|
||||
"Use <k>builder_movethingfwd</k>, <k>builder_movethingback</k>, <k>builder_movethingleft</k> and <k>builder_movethingright</k> to move selected things around"
|
||||
"Use <k>buildermodes_scaleupx</k>, <k>buildermodes_scaledownx</k>, <k>buildermodes_scaleupy</k> and <k>buildermodes_scaledowny</k> to scale selected things (UDMF only)"
|
||||
"Press <k>builder_placethingatcursor</k> to move selected things to cursor location"
|
||||
"Press <k>buildermodes_showvisualthings</k> to cycle through the different ways the things are shown"
|
||||
|
||||
|
@ -124,7 +125,7 @@ group sidedefs
|
|||
"Press <k>builder_deleteitem</k> to remove textures from selected surfaces"
|
||||
"Use <k>buildermodes_movetextureleft</k>, <k>buildermodes_movetextureright</k>, <k>buildermodes_movetextureup</k> and <k>buildermodes_movetexturedown</k> to change texture offsets by 1 mp."
|
||||
"Use <k>buildermodes_movetextureleft8</k>, <k>buildermodes_movetextureright8</k>, <k>buildermodes_movetextureup8</k> and <k>buildermodes_movetexturedown8</k> to change texture offsets by current grid size"
|
||||
"Use <k>buildermodes_scaletextureupx</k>, <k>buildermodes_scaletexturedownx</k>, <k>buildermodes_scaletextureupy</k> and <k>buildermodes_scaletexturedowny</k> to scale selected textures (UDMF only)"
|
||||
"Use <k>buildermodes_scaleupx</k>, <k>buildermodes_scaledownx</k>, <k>buildermodes_scaleupy</k> and <k>buildermodes_scaledowny</k> to scale selected textures (UDMF only)"
|
||||
"Press <k>buildermodes_textureselect</k> to open texture browser"
|
||||
"Use <k>buildermodes_texturecopy</k>, <k>buildermodes_texturepaste</k> and <k>buildermodes_floodfilltextures</k> to copy, paste and flood-fill highlighted texture"
|
||||
"Use <k>buildermodes_texturecopyoffsets</k> and <k>buildermodes_texturepasteoffsets</k> to copy and paste texture offsets"
|
||||
|
@ -143,7 +144,7 @@ group sectors
|
|||
"Press <k>builder_deleteitem</k> to remove textures from selected surfaces"
|
||||
"Use <k>buildermodes_movetextureleft</k>, <k>buildermodes_movetextureright</k>, <k>buildermodes_movetextureup</k> and <k>buildermodes_movetexturedown</k> to change texture offsets by 1 mp. (UDMF only)"
|
||||
"Use <k>buildermodes_movetextureleft8</k>, <k>buildermodes_movetextureright8</k>, <k>buildermodes_movetextureup8</k> and <k>buildermodes_movetexturedown8</k> to change texture offsets by current grid size (UDMF only)"
|
||||
"Use <k>buildermodes_scaletextureupx</k>, <k>buildermodes_scaletexturedownx</k>, <k>buildermodes_scaletextureupy</k> and <k>buildermodes_scaletexturedowny</k> to scale selected textures (UDMF only)"
|
||||
"Use <k>buildermodes_scaleupx</k>, <k>buildermodes_scaledownx</k>, <k>buildermodes_scaleupy</k> and <k>buildermodes_scaledowny</k> to scale selected textures (UDMF only)"
|
||||
"Use <k>buildermodes_resettextureudmf</k> to reset local texture offsets and scale (UDMF only)"
|
||||
"Press <k>buildermodes_textureselect</k> to open texture browser"
|
||||
"Use <k>buildermodes_texturecopy</k> and <k>buildermodes_texturepaste</k> to copy and paste highlighted texture"
|
||||
|
|
|
@ -889,7 +889,7 @@ namespace CodeImp.DoomBuilder.BuilderModes
|
|||
}
|
||||
|
||||
//mxd
|
||||
public virtual void OnChangeTextureScale(float incrementX, float incrementY)
|
||||
public virtual void OnChangeScale(float incrementX, float incrementY)
|
||||
{
|
||||
if(!General.Map.UDMF) return;
|
||||
|
||||
|
|
|
@ -1412,7 +1412,7 @@ namespace CodeImp.DoomBuilder.BuilderModes
|
|||
}
|
||||
|
||||
//mxd
|
||||
public virtual void OnChangeTextureScale(float incrementX, float incrementY)
|
||||
public virtual void OnChangeScale(float incrementX, float incrementY)
|
||||
{
|
||||
if(!General.Map.UDMF) return;
|
||||
|
||||
|
|
|
@ -2646,42 +2646,42 @@ namespace CodeImp.DoomBuilder.BuilderModes
|
|||
}
|
||||
|
||||
//mxd
|
||||
[BeginAction("scaletextureupx")]
|
||||
[BeginAction("scaleupx")]
|
||||
public void ScaleTextureUpX()
|
||||
{
|
||||
PreAction(UndoGroup.TextureScaleChange);
|
||||
List<IVisualEventReceiver> objs = GetSelectedObjects(true, true, false, false);
|
||||
foreach(IVisualEventReceiver i in objs) i.OnChangeTextureScale(-0.1f, 0);
|
||||
List<IVisualEventReceiver> objs = GetSelectedObjects(true, true, true, false);
|
||||
foreach(IVisualEventReceiver i in objs) i.OnChangeScale(-0.1f, 0);
|
||||
PostAction();
|
||||
}
|
||||
|
||||
//mxd
|
||||
[BeginAction("scaletexturedownx")]
|
||||
[BeginAction("scaledownx")]
|
||||
public void ScaleTextureDownX()
|
||||
{
|
||||
PreAction(UndoGroup.TextureScaleChange);
|
||||
List<IVisualEventReceiver> objs = GetSelectedObjects(true, true, false, false);
|
||||
foreach(IVisualEventReceiver i in objs) i.OnChangeTextureScale(0.1f, 0);
|
||||
List<IVisualEventReceiver> objs = GetSelectedObjects(true, true, true, false);
|
||||
foreach(IVisualEventReceiver i in objs) i.OnChangeScale(0.1f, 0);
|
||||
PostAction();
|
||||
}
|
||||
|
||||
//mxd
|
||||
[BeginAction("scaletextureupy")]
|
||||
[BeginAction("scaleupy")]
|
||||
public void ScaleTextureUpY()
|
||||
{
|
||||
PreAction(UndoGroup.TextureScaleChange);
|
||||
List<IVisualEventReceiver> objs = GetSelectedObjects(true, true, false, false);
|
||||
foreach(IVisualEventReceiver i in objs) i.OnChangeTextureScale(0, 0.1f);
|
||||
List<IVisualEventReceiver> objs = GetSelectedObjects(true, true, true, false);
|
||||
foreach(IVisualEventReceiver i in objs) i.OnChangeScale(0, 0.1f);
|
||||
PostAction();
|
||||
}
|
||||
|
||||
//mxd
|
||||
[BeginAction("scaletexturedowny")]
|
||||
[BeginAction("scaledowny")]
|
||||
public void ScaleTextureDownY()
|
||||
{
|
||||
PreAction(UndoGroup.TextureScaleChange);
|
||||
List<IVisualEventReceiver> objs = GetSelectedObjects(true, true, false, false);
|
||||
foreach(IVisualEventReceiver i in objs) i.OnChangeTextureScale(0, -0.1f);
|
||||
List<IVisualEventReceiver> objs = GetSelectedObjects(true, true, true, false);
|
||||
foreach(IVisualEventReceiver i in objs) i.OnChangeScale(0, -0.1f);
|
||||
PostAction();
|
||||
}
|
||||
|
||||
|
|
|
@ -460,7 +460,6 @@ namespace CodeImp.DoomBuilder.BuilderModes
|
|||
public virtual void OnMouseMove(MouseEventArgs e) { }
|
||||
public virtual void OnChangeTargetBrightness(bool up) { }
|
||||
public virtual void OnChangeTextureOffset(int horizontal, int vertical, bool doSurfaceAngleCorrection) { }
|
||||
public virtual void OnChangeTextureScale(float incrementX, float incrementY) { } //mxd
|
||||
public virtual void OnSelectTexture() { }
|
||||
public virtual void OnCopyTexture() { }
|
||||
public virtual void OnPasteTexture() { }
|
||||
|
@ -592,6 +591,35 @@ namespace CodeImp.DoomBuilder.BuilderModes
|
|||
}
|
||||
}
|
||||
|
||||
//mxd
|
||||
public virtual void OnChangeScale(float incrementX, float incrementY)
|
||||
{
|
||||
if(!General.Map.UDMF) return;
|
||||
|
||||
if((General.Map.UndoRedo.NextUndo == null) || (General.Map.UndoRedo.NextUndo.TicketID != undoticket))
|
||||
undoticket = mode.CreateUndo("Change thing scale");
|
||||
|
||||
float sx = Thing.ScaleX;
|
||||
float sy = Thing.ScaleY;
|
||||
if(incrementX != 0)
|
||||
{
|
||||
if(sx - incrementX == 0) sx *= -1;
|
||||
else sx -= incrementX;
|
||||
}
|
||||
|
||||
if(incrementY != 0)
|
||||
{
|
||||
if(sy + incrementY == 0) sy *= -1;
|
||||
else sy += incrementY;
|
||||
}
|
||||
|
||||
Thing.SetScale((float)Math.Round(sx, 3), (float)Math.Round(sy, 3));
|
||||
mode.SetActionResult("Changed thing scale to " + Thing.ScaleX + ", " + Thing.ScaleY + ".");
|
||||
|
||||
// Update what must be updated
|
||||
this.Changed = true;
|
||||
}
|
||||
|
||||
//mxd
|
||||
public void OnMove(Vector3D newPosition)
|
||||
{
|
||||
|
|
|
@ -231,7 +231,7 @@ namespace CodeImp.DoomBuilder.BuilderModes
|
|||
public virtual void OnMouseMove(MouseEventArgs e) { }
|
||||
public virtual void OnChangeTargetBrightness(bool up) { }
|
||||
public virtual void OnChangeTextureOffset(int horizontal, int vertical, bool doSurfaceAngleCorrection) { }
|
||||
public virtual void OnChangeTextureScale(float incrementX, float incrementY) { }
|
||||
public virtual void OnChangeScale(float incrementX, float incrementY) { }
|
||||
public virtual void OnSelectTexture() { }
|
||||
public virtual void OnCopyTexture() { }
|
||||
public virtual void OnPasteTexture() { }
|
||||
|
|
|
@ -33,7 +33,7 @@ namespace CodeImp.DoomBuilder.BuilderModes
|
|||
void OnChangeTargetHeight(int amount);
|
||||
void OnChangeTargetBrightness(bool up);
|
||||
void OnChangeTextureOffset(int horizontal, int vertical, bool doSurfaceAngleCorrection);
|
||||
void OnChangeTextureScale(float incrementX, float incrementY); //mxd
|
||||
void OnChangeScale(float incrementX, float incrementY); //mxd
|
||||
void OnResetTextureOffset();
|
||||
void OnResetLocalTextureOffset(); //mxd. This should reset upper/middle/lower offsets (UDMF only)
|
||||
void OnSelectTexture();
|
||||
|
|
|
@ -34,7 +34,7 @@ namespace CodeImp.DoomBuilder.BuilderModes
|
|||
public void OnChangeTargetHeight(int amount) { }
|
||||
public void OnChangeTargetBrightness(bool up) { }
|
||||
public void OnChangeTextureOffset(int horizontal, int vertical, bool doSurfaceAngleCorrection) { }
|
||||
public virtual void OnChangeTextureScale(float incrementX, float incrementY) { } //mxd
|
||||
public virtual void OnChangeScale(float incrementX, float incrementY) { } //mxd
|
||||
public void OnResetTextureOffset() { }
|
||||
public void OnResetLocalTextureOffset() { } //mxd
|
||||
public void OnSelectTexture() { }
|
||||
|
|
Loading…
Reference in a new issue