ZoneBuilder/Source/Plugins/BuilderModes/Interface/DrawLineOptionsPanel.cs
MaxED 0000b7a02d Added, Draw Lines mode: additional guidelines and horizontal/vertical line lengths can now be displayed for currently drawn line using "Show guidelines" top menu button.
Changed, Draw Lines mode: line angles are now shown only when "Show guidelines" mode is enabled.
Fixed, Draw Lines mode: in some cases "Snap to cardinal directions" mode was snapping only to diagonals.
Fixed, Draw Lines mode: snap to geometry behaved incorrectly when "Snap to cardinal directions" mode was enabled.
Changed, Things mode: dynamic light shape is now drawn using highlight color when a dynamic light thing is highlighted.
Added more sanity checks to MODELDEFS parser.
2023-01-04 19:37:58 +01:00

50 lines
1.7 KiB
C#

using System;
using System.Windows.Forms;
namespace CodeImp.DoomBuilder.BuilderModes
{
internal partial class DrawLineOptionsPanel : UserControl
{
public event EventHandler OnContinuousDrawingChanged;
public event EventHandler OnAutoCloseDrawingChanged;
public event EventHandler OnShowGuidelinesChanged;
public bool ContinuousDrawing { get { return continuousdrawing.Checked; } set { continuousdrawing.Checked = value; } }
public bool AutoCloseDrawing { get { return autoclosedrawing.Checked; } set { autoclosedrawing.Checked = value; } }
public bool ShowGuidelines { get { return showguidelines.Checked; } set { showguidelines.Checked = value; } }
public DrawLineOptionsPanel()
{
InitializeComponent();
}
public void Register()
{
General.Interface.AddButton(continuousdrawing);
General.Interface.AddButton(autoclosedrawing);
General.Interface.AddButton(showguidelines);
}
public void Unregister()
{
General.Interface.RemoveButton(showguidelines);
General.Interface.RemoveButton(autoclosedrawing);
General.Interface.RemoveButton(continuousdrawing);
}
private void continuousdrawing_CheckedChanged(object sender, EventArgs e)
{
if(OnContinuousDrawingChanged != null) OnContinuousDrawingChanged(continuousdrawing.Checked, EventArgs.Empty);
}
private void autoclosedrawing_CheckedChanged(object sender, EventArgs e)
{
if(OnAutoCloseDrawingChanged != null) OnAutoCloseDrawingChanged(autoclosedrawing.Checked, EventArgs.Empty);
}
private void showguidelines_CheckedChanged(object sender, EventArgs e)
{
if(OnShowGuidelinesChanged != null) OnShowGuidelinesChanged(showguidelines.Checked, EventArgs.Empty);
}
}
}