mirror of
https://git.do.srb2.org/STJr/UltimateZoneBuilder.git
synced 2024-11-23 20:32:34 +00:00
8599f18f4c
Buttons order was messed up in editing modes toolbar after performing "Reload Resources" action. Fixed editing modes toolbar layout.
36 lines
1,014 B
C#
36 lines
1,014 B
C#
using System;
|
|
using System.Windows.Forms;
|
|
|
|
namespace CodeImp.DoomBuilder.BuilderModes
|
|
{
|
|
internal partial class DrawCurveOptionsPanel : UserControl
|
|
{
|
|
public event EventHandler OnValueChanged;
|
|
private bool blockEvents;
|
|
|
|
public int SegmentLength { get { return (int)seglen.Value; } set { blockEvents = true; seglen.Value = value; blockEvents = false; } }
|
|
|
|
public DrawCurveOptionsPanel(int minLength, int maxLength) {
|
|
InitializeComponent();
|
|
|
|
seglen.Minimum = minLength;
|
|
seglen.Maximum = maxLength;
|
|
}
|
|
|
|
private DrawCurveOptionsPanel() { InitializeComponent(); }
|
|
|
|
public void Register() {
|
|
General.Interface.AddButton(seglabel);
|
|
General.Interface.AddButton(seglen);
|
|
}
|
|
|
|
public void Unregister() {
|
|
General.Interface.RemoveButton(seglen);
|
|
General.Interface.RemoveButton(seglabel);
|
|
}
|
|
|
|
private void seglen_ValueChanged(object sender, EventArgs e) {
|
|
if(!blockEvents && OnValueChanged != null) OnValueChanged(this, EventArgs.Empty);
|
|
}
|
|
}
|
|
}
|