mirror of
https://git.do.srb2.org/STJr/UltimateZoneBuilder.git
synced 2024-11-26 22:01:45 +00:00
aecd017b19
Fixed: some map format conversion errors were never displayed, because errors list was cleared after performing map conversion. Fixed: 3d floor indicators in 2D modes were not updated after leaving Visual mode. Fixed: some UDMF-only interface buttons were never removed after converting map format from UDMF.
67 lines
2.5 KiB
C#
67 lines
2.5 KiB
C#
using System;
|
|
using System.Windows.Forms;
|
|
|
|
namespace CodeImp.DoomBuilder.AutomapMode
|
|
{
|
|
public partial class MenusForm : UserControl
|
|
{
|
|
public event EventHandler OnShowHiddenLinesChanged;
|
|
public event EventHandler OnShowSecretSectorsChanged;
|
|
public event EventHandler OnShowLocksChanged;
|
|
internal event EventHandler OnColorPresetChanged;
|
|
|
|
public bool ShowHiddenLines { get { return showhiddenlines.Checked; } set { showhiddenlines.Checked = value; } }
|
|
public bool ShowSecretSectors { get { return showsecretsectors.Checked; } set { showsecretsectors.Checked = value; } }
|
|
public bool ShowLocks { get { return showlocks.Checked; } set { showlocks.Checked = value; } }
|
|
internal AutomapMode.ColorPreset ColorPreset { get { return (AutomapMode.ColorPreset)colorpreset.SelectedIndex; } set { colorpreset.SelectedIndex = (int)value; } }
|
|
|
|
public MenusForm()
|
|
{
|
|
InitializeComponent();
|
|
}
|
|
|
|
public void Register()
|
|
{
|
|
General.Interface.BeginToolbarUpdate(); //mxd
|
|
General.Interface.AddButton(showhiddenlines);
|
|
General.Interface.AddButton(showsecretsectors);
|
|
if(!General.Map.DOOM) General.Interface.AddButton(showlocks);
|
|
General.Interface.AddButton(colorpresetseparator);
|
|
General.Interface.AddButton(colorpresetlabel);
|
|
General.Interface.AddButton(colorpreset);
|
|
General.Interface.EndToolbarUpdate(); //mxd
|
|
}
|
|
|
|
public void Unregister()
|
|
{
|
|
General.Interface.BeginToolbarUpdate(); //mxd
|
|
General.Interface.RemoveButton(colorpreset);
|
|
General.Interface.RemoveButton(colorpresetlabel);
|
|
General.Interface.RemoveButton(colorpresetseparator);
|
|
General.Interface.RemoveButton(showlocks);
|
|
General.Interface.RemoveButton(showsecretsectors);
|
|
General.Interface.RemoveButton(showhiddenlines);
|
|
General.Interface.EndToolbarUpdate(); //mxd
|
|
}
|
|
|
|
private void showhiddenlines_CheckedChanged(object sender, EventArgs e)
|
|
{
|
|
if(OnShowHiddenLinesChanged != null) OnShowHiddenLinesChanged(showhiddenlines.Checked, EventArgs.Empty);
|
|
}
|
|
|
|
private void showsecretsectors_CheckedChanged(object sender, EventArgs e)
|
|
{
|
|
if(OnShowSecretSectorsChanged != null) OnShowSecretSectorsChanged(showsecretsectors.Checked, EventArgs.Empty);
|
|
}
|
|
|
|
private void showlocks_CheckedChanged(object sender, EventArgs e)
|
|
{
|
|
if(OnShowLocksChanged != null) OnShowLocksChanged(showlocks.Checked, EventArgs.Empty);
|
|
}
|
|
|
|
private void colorpreset_SelectedIndexChanged(object sender, EventArgs e)
|
|
{
|
|
if(OnColorPresetChanged != null) OnColorPresetChanged(colorpreset.SelectedIndex, EventArgs.Empty);
|
|
}
|
|
}
|
|
}
|