mirror of
https://git.do.srb2.org/STJr/UltimateZoneBuilder.git
synced 2024-11-30 15:41:30 +00:00
178e4db217
- added option to move floor/ceiling when aiming at sidedef in Visual Mode - added option to edit sector/thing properties immediately after creating a new one - fixed a bug in the ImageBrowserControl - Tools.DrawLines now keeps created sectors marked (this is still to be changed so it does not include already existing sectors) - fixed resize and alignment problem with all windows when used with high screen DPI (large fonts)
104 lines
No EOL
2.6 KiB
C#
104 lines
No EOL
2.6 KiB
C#
|
|
#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 System;
|
|
using System.Collections;
|
|
using System.Collections.Generic;
|
|
using System.Globalization;
|
|
using System.Text;
|
|
using System.Windows.Forms;
|
|
using System.IO;
|
|
using System.Reflection;
|
|
using CodeImp.DoomBuilder.Windows;
|
|
using CodeImp.DoomBuilder.IO;
|
|
using CodeImp.DoomBuilder.Map;
|
|
using CodeImp.DoomBuilder.Rendering;
|
|
using CodeImp.DoomBuilder.Geometry;
|
|
using System.Drawing;
|
|
using CodeImp.DoomBuilder.Editing;
|
|
|
|
#endregion
|
|
|
|
namespace CodeImp.DoomBuilder.BuilderModes
|
|
{
|
|
public partial class PreferencesForm : Form
|
|
{
|
|
#region ================== Variables
|
|
|
|
private PreferencesController controller;
|
|
|
|
#endregion
|
|
|
|
#region ================== Properties
|
|
|
|
#endregion
|
|
|
|
#region ================== Constructor / Disposer
|
|
|
|
// Contrustor
|
|
public PreferencesForm()
|
|
{
|
|
InitializeComponent();
|
|
|
|
// Apply current settings to interface
|
|
heightbysidedef.SelectedIndex = General.Settings.ReadPluginSetting("changeheightbysidedef", 0);
|
|
editnewthing.Checked = General.Settings.ReadPluginSetting("editnewthing", true);
|
|
editnewsector.Checked = General.Settings.ReadPluginSetting("editnewsector", false);
|
|
}
|
|
|
|
#endregion
|
|
|
|
#region ================== Events
|
|
|
|
// When OK is pressed on the preferences dialog
|
|
public void OnAccept(PreferencesController controller)
|
|
{
|
|
// Write preferred settings
|
|
General.Settings.WritePluginSetting("changeheightbysidedef", heightbysidedef.SelectedIndex);
|
|
General.Settings.WritePluginSetting("editnewthing", editnewthing.Checked);
|
|
General.Settings.WritePluginSetting("editnewsector", editnewsector.Checked);
|
|
}
|
|
|
|
// When Cancel is pressed on the preferences dialog
|
|
public void OnCancel(PreferencesController controller)
|
|
{
|
|
}
|
|
|
|
#endregion
|
|
|
|
#region ================== Methods
|
|
|
|
// This sets up the form with the preferences controller
|
|
public void Setup(PreferencesController controller)
|
|
{
|
|
this.controller = controller;
|
|
|
|
// Add tab pages
|
|
foreach(TabPage p in tabs.TabPages)
|
|
{
|
|
controller.AddTab(p);
|
|
}
|
|
|
|
// Bind events
|
|
controller.OnAccept += OnAccept;
|
|
controller.OnCancel += OnCancel;
|
|
}
|
|
|
|
#endregion
|
|
}
|
|
} |