2011-12-07 21:05:09 +00:00
|
|
|
|
|
|
|
|
|
#region ================== Copyright (c) 2007 Pascal vd Heiden
|
|
|
|
|
|
|
|
|
|
/*
|
|
|
|
|
* Copyright (c) 2007 Pascal vd Heiden, www.codeimp.com
|
|
|
|
|
* This program is released under GNU General Public License
|
|
|
|
|
*
|
|
|
|
|
* This program is distributed in the hope that it will be useful,
|
|
|
|
|
* but WITHOUT ANY WARRANTY; without even the implied warranty of
|
|
|
|
|
* MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the
|
|
|
|
|
* GNU General Public License for more details.
|
|
|
|
|
*
|
|
|
|
|
*/
|
|
|
|
|
|
|
|
|
|
#endregion
|
|
|
|
|
|
|
|
|
|
#region ================== Namespaces
|
|
|
|
|
|
|
|
|
|
using CodeImp.DoomBuilder.Data;
|
|
|
|
|
using CodeImp.DoomBuilder.Map;
|
|
|
|
|
using CodeImp.DoomBuilder.Rendering;
|
|
|
|
|
using CodeImp.DoomBuilder.Editing;
|
|
|
|
|
|
|
|
|
|
#endregion
|
|
|
|
|
|
2012-11-27 21:12:20 +00:00
|
|
|
|
namespace CodeImp.DoomBuilder.BuilderModes
|
2011-12-07 21:05:09 +00:00
|
|
|
|
{
|
|
|
|
|
[EditMode(DisplayName = "Floor Align Mode",
|
|
|
|
|
SwitchAction = "flooralignmode",
|
|
|
|
|
ButtonImage = "FloorAlign.png",
|
2014-01-09 13:09:43 +00:00
|
|
|
|
ButtonOrder = int.MinValue + 310,
|
2011-12-07 21:05:09 +00:00
|
|
|
|
ButtonGroup = "000_editing",
|
2014-09-08 13:09:14 +00:00
|
|
|
|
UseByDefault = true, //mxd
|
|
|
|
|
SupportedMapFormats = new[] { "UniversalMapSetIO" }, //mxd
|
2011-12-07 21:05:09 +00:00
|
|
|
|
Volatile = true)]
|
|
|
|
|
|
|
|
|
|
public class FloorAlignMode : FlatAlignMode
|
|
|
|
|
{
|
|
|
|
|
#region ================== Properties
|
|
|
|
|
|
2015-04-28 14:22:03 +00:00
|
|
|
|
protected override string XScaleName { get { return "xscalefloor"; } }
|
|
|
|
|
protected override string YScaleName { get { return "yscalefloor"; } }
|
|
|
|
|
protected override string XOffsetName { get { return "xpanningfloor"; } }
|
|
|
|
|
protected override string YOffsetName { get { return "ypanningfloor"; } }
|
|
|
|
|
protected override string RotationName { get { return "rotationfloor"; } }
|
|
|
|
|
protected override string UndoDescription { get { return "Floor Alignment"; } }
|
2011-12-07 21:05:09 +00:00
|
|
|
|
|
|
|
|
|
#endregion
|
|
|
|
|
|
|
|
|
|
#region ================== Methods
|
|
|
|
|
|
|
|
|
|
// Get the texture data to align
|
|
|
|
|
protected override ImageData GetTexture(Sector editsector)
|
|
|
|
|
{
|
|
|
|
|
return General.Map.Data.GetFlatImage(editsector.LongFloorTexture);
|
|
|
|
|
}
|
|
|
|
|
|
|
|
|
|
#endregion
|
|
|
|
|
|
|
|
|
|
#region ================== Events
|
|
|
|
|
|
|
|
|
|
// Mode engages
|
|
|
|
|
public override void OnEngage()
|
|
|
|
|
{
|
|
|
|
|
base.OnEngage();
|
2011-12-13 06:52:21 +00:00
|
|
|
|
General.Actions.InvokeAction("builder_viewmodefloors");
|
2011-12-07 21:05:09 +00:00
|
|
|
|
}
|
|
|
|
|
|
|
|
|
|
#endregion
|
|
|
|
|
}
|
|
|
|
|
}
|