mirror of
https://git.do.srb2.org/STJr/ZoneBuilder.git
synced 2024-11-15 00:51:39 +00:00
0000b7a02d
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.
50 lines
1.7 KiB
C#
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);
|
|
}
|
|
}
|
|
}
|