mirror of
https://git.do.srb2.org/STJr/UltimateZoneBuilder.git
synced 2025-01-18 14:31:50 +00:00
moo
This commit is contained in:
parent
580fe3f181
commit
bc465effea
7 changed files with 86 additions and 43 deletions
|
@ -60,14 +60,15 @@ namespace CodeImp.DoomBuilder.BuilderModes
|
|||
#endregion
|
||||
|
||||
#region ================== Properties
|
||||
|
||||
|
||||
public override string Name { get { return "Doom Builder"; } }
|
||||
public static BuilderPlug Me { get { return me; } }
|
||||
|
||||
|
||||
public MenusForm MenusForm { get { return menusform; } }
|
||||
public CurveLinedefsForm CurveLinedefsForm { get { return curvelinedefsform; } }
|
||||
public FindReplaceForm FindReplaceForm { get { return findreplaceform; } }
|
||||
public ErrorCheckForm ErrorCheckForm { get { return errorcheckform; } }
|
||||
|
||||
|
||||
#endregion
|
||||
|
||||
#region ================== Initialize / Dispose
|
||||
|
|
|
@ -43,7 +43,7 @@ namespace CodeImp.DoomBuilder.Editing
|
|||
private int buttonorder = 0;
|
||||
private bool optional = false;
|
||||
private bool isvolatile = false;
|
||||
private string displayname = "Unnamed Mode";
|
||||
private string displayname = "<unnamed mode>";
|
||||
private bool allowcopypaste = true;
|
||||
|
||||
#endregion
|
||||
|
|
|
@ -24,7 +24,7 @@ namespace CodeImp.DoomBuilder.Plugins
|
|||
#region ================== Constants
|
||||
|
||||
#endregion
|
||||
|
||||
|
||||
#region ================== Variables
|
||||
|
||||
// Internals
|
||||
|
@ -34,9 +34,9 @@ namespace CodeImp.DoomBuilder.Plugins
|
|||
private bool isdisposed = false;
|
||||
|
||||
#endregion
|
||||
|
||||
|
||||
#region ================== Properties
|
||||
|
||||
|
||||
// Internals
|
||||
internal Plugin Plugin { get { return plugin; } set { plugin = value; } }
|
||||
|
||||
|
@ -44,7 +44,13 @@ namespace CodeImp.DoomBuilder.Plugins
|
|||
/// Indicates if the plugin has been disposed.
|
||||
/// </summary>
|
||||
public bool IsDisposed { get { return isdisposed; } }
|
||||
|
||||
|
||||
/// <summary>
|
||||
/// Override this to return a more descriptive name for your plugin.
|
||||
/// Default is the library filename without extension.
|
||||
/// </summary>
|
||||
public virtual string Name { get { return plugin.Name; } }
|
||||
|
||||
#endregion
|
||||
|
||||
#region ================== Constructor / Disposer
|
||||
|
|
61
Source/Windows/ConfigForm.Designer.cs
generated
61
Source/Windows/ConfigForm.Designer.cs
generated
|
@ -68,12 +68,12 @@ namespace CodeImp.DoomBuilder.Windows
|
|||
this.removetextureset = new System.Windows.Forms.Button();
|
||||
this.addtextureset = new System.Windows.Forms.Button();
|
||||
this.tabmodes = new System.Windows.Forms.TabPage();
|
||||
this.listconfigs = new System.Windows.Forms.ListView();
|
||||
this.columnname = new System.Windows.Forms.ColumnHeader();
|
||||
this.testprogramdialog = new System.Windows.Forms.OpenFileDialog();
|
||||
this.listmodes = new System.Windows.Forms.ListView();
|
||||
this.colmodename = new System.Windows.Forms.ColumnHeader();
|
||||
this.colmodeplugin = new System.Windows.Forms.ColumnHeader();
|
||||
this.listconfigs = new System.Windows.Forms.ListView();
|
||||
this.columnname = new System.Windows.Forms.ColumnHeader();
|
||||
this.testprogramdialog = new System.Windows.Forms.OpenFileDialog();
|
||||
label5 = new System.Windows.Forms.Label();
|
||||
label6 = new System.Windows.Forms.Label();
|
||||
label3 = new System.Windows.Forms.Label();
|
||||
|
@ -558,6 +558,34 @@ namespace CodeImp.DoomBuilder.Windows
|
|||
this.tabmodes.Text = "Modes";
|
||||
this.tabmodes.UseVisualStyleBackColor = true;
|
||||
//
|
||||
// listmodes
|
||||
//
|
||||
this.listmodes.CheckBoxes = true;
|
||||
this.listmodes.Columns.AddRange(new System.Windows.Forms.ColumnHeader[] {
|
||||
this.colmodename,
|
||||
this.colmodeplugin});
|
||||
this.listmodes.FullRowSelect = true;
|
||||
this.listmodes.HeaderStyle = System.Windows.Forms.ColumnHeaderStyle.Nonclickable;
|
||||
this.listmodes.Location = new System.Drawing.Point(15, 76);
|
||||
this.listmodes.MultiSelect = false;
|
||||
this.listmodes.Name = "listmodes";
|
||||
this.listmodes.ShowGroups = false;
|
||||
this.listmodes.Size = new System.Drawing.Size(442, 226);
|
||||
this.listmodes.TabIndex = 26;
|
||||
this.listmodes.UseCompatibleStateImageBehavior = false;
|
||||
this.listmodes.View = System.Windows.Forms.View.Details;
|
||||
this.listmodes.ItemChecked += new System.Windows.Forms.ItemCheckedEventHandler(this.listmodes_ItemChecked);
|
||||
//
|
||||
// colmodename
|
||||
//
|
||||
this.colmodename.Text = "Editing Mode";
|
||||
this.colmodename.Width = 179;
|
||||
//
|
||||
// colmodeplugin
|
||||
//
|
||||
this.colmodeplugin.Text = "Plugin";
|
||||
this.colmodeplugin.Width = 221;
|
||||
//
|
||||
// listconfigs
|
||||
//
|
||||
this.listconfigs.Columns.AddRange(new System.Windows.Forms.ColumnHeader[] {
|
||||
|
@ -588,33 +616,6 @@ namespace CodeImp.DoomBuilder.Windows
|
|||
this.testprogramdialog.Filter = "Executable Files (*.exe)|*.exe|Batch Files (*.bat)|*.bat";
|
||||
this.testprogramdialog.Title = "Browse Test Program";
|
||||
//
|
||||
// listmodes
|
||||
//
|
||||
this.listmodes.CheckBoxes = true;
|
||||
this.listmodes.Columns.AddRange(new System.Windows.Forms.ColumnHeader[] {
|
||||
this.colmodename,
|
||||
this.colmodeplugin});
|
||||
this.listmodes.FullRowSelect = true;
|
||||
this.listmodes.HeaderStyle = System.Windows.Forms.ColumnHeaderStyle.Nonclickable;
|
||||
this.listmodes.Location = new System.Drawing.Point(15, 76);
|
||||
this.listmodes.MultiSelect = false;
|
||||
this.listmodes.Name = "listmodes";
|
||||
this.listmodes.ShowGroups = false;
|
||||
this.listmodes.Size = new System.Drawing.Size(442, 226);
|
||||
this.listmodes.TabIndex = 26;
|
||||
this.listmodes.UseCompatibleStateImageBehavior = false;
|
||||
this.listmodes.View = System.Windows.Forms.View.Details;
|
||||
//
|
||||
// colmodename
|
||||
//
|
||||
this.colmodename.Text = "Editing Mode";
|
||||
this.colmodename.Width = 179;
|
||||
//
|
||||
// colmodeplugin
|
||||
//
|
||||
this.colmodeplugin.Text = "Plugin";
|
||||
this.colmodeplugin.Width = 221;
|
||||
//
|
||||
// ConfigForm
|
||||
//
|
||||
this.AcceptButton = this.apply;
|
||||
|
|
|
@ -49,7 +49,7 @@ namespace CodeImp.DoomBuilder.Windows
|
|||
|
||||
// Initialize
|
||||
InitializeComponent();
|
||||
|
||||
|
||||
// Make list column header full width
|
||||
columnname.Width = listconfigs.ClientRectangle.Width - SystemInformation.VerticalScrollBarWidth - 2;
|
||||
|
||||
|
@ -77,9 +77,16 @@ namespace CodeImp.DoomBuilder.Windows
|
|||
// Fill list of editing modes
|
||||
foreach(EditModeInfo emi in General.Editing.ModesInfo)
|
||||
{
|
||||
// Is this mode selectable by the user?
|
||||
if(emi.ButtonImage != null)
|
||||
{
|
||||
lvi = listmodes.Items.Add(emi.Attributes.DisplayName);
|
||||
lvi.Tag = emi;
|
||||
lvi.SubItems.Add(emi.Plugin.Plug.Name);
|
||||
}
|
||||
}
|
||||
}
|
||||
|
||||
|
||||
// This shows a specific page
|
||||
public void ShowTab(int index)
|
||||
{
|
||||
|
@ -160,6 +167,13 @@ namespace CodeImp.DoomBuilder.Windows
|
|||
item.ImageIndex = 0;
|
||||
}
|
||||
listtextures.Sort();
|
||||
|
||||
// Go for all the editing modes in the list
|
||||
foreach(ListViewItem lvi in listmodes.Items)
|
||||
{
|
||||
EditModeInfo emi = (lvi.Tag as EditModeInfo);
|
||||
lvi.Checked = configinfo.EditModes.Contains(emi.Type.FullName);
|
||||
}
|
||||
}
|
||||
}
|
||||
|
||||
|
@ -208,7 +222,7 @@ namespace CodeImp.DoomBuilder.Windows
|
|||
{
|
||||
// Leave when no configuration selected
|
||||
if(configinfo == null) return;
|
||||
|
||||
|
||||
// Apply to selected configuration
|
||||
if(nodebuildersave.SelectedItem != null)
|
||||
configinfo.NodebuilderSave = (nodebuildersave.SelectedItem as NodebuilderInfo).Name;
|
||||
|
@ -463,5 +477,26 @@ namespace CodeImp.DoomBuilder.Windows
|
|||
listtextures.Sort();
|
||||
}
|
||||
}
|
||||
|
||||
// This is called when an editing mode item is checked or unchecked
|
||||
private void listmodes_ItemChecked(object sender, ItemCheckedEventArgs e)
|
||||
{
|
||||
// Leave when no configuration selected
|
||||
if(configinfo == null) return;
|
||||
|
||||
// Apply changes
|
||||
EditModeInfo emi = (e.Item.Tag as EditModeInfo);
|
||||
bool currentstate = configinfo.EditModes.Contains(emi.Type.FullName);
|
||||
if(e.Item.Checked && !currentstate)
|
||||
{
|
||||
// Add
|
||||
configinfo.EditModes.Add(emi.Type.FullName);
|
||||
}
|
||||
else if(!e.Item.Checked && currentstate)
|
||||
{
|
||||
// Remove
|
||||
configinfo.EditModes.Remove(emi.Type.FullName);
|
||||
}
|
||||
}
|
||||
}
|
||||
}
|
||||
|
|
|
@ -184,7 +184,7 @@
|
|||
<value>False</value>
|
||||
</metadata>
|
||||
<data name="label10.Text" xml:space="preserve">
|
||||
<value>Here you can select the editing modes that you wish to use in this configuration. This is usefull in case there are plugins with additional editing modes that can be used instead of the original editing modes.</value>
|
||||
<value>Here you can select the editing modes that you wish to use in this configuration. This is usefull in case there are plugins with additional editing modes that can be used as a replacement for the original editing modes.</value>
|
||||
</data>
|
||||
<metadata name="labelparameters.Locked" type="System.Boolean, mscorlib, Version=2.0.0.0, Culture=neutral, PublicKeyToken=b77a5c561934e089">
|
||||
<value>True</value>
|
||||
|
|
|
@ -62,7 +62,7 @@ namespace CodeImp.DoomBuilder.Windows
|
|||
fieldofview.Value = General.Settings.VisualFOV / 10;
|
||||
mousespeed.Value = General.Settings.MouseSpeed / 100;
|
||||
movespeed.Value = General.Settings.MoveSpeed / 100;
|
||||
viewdistance.Value = (int)(General.Settings.ViewDistance / 200.0f);
|
||||
viewdistance.Value = General.Clamp((int)(General.Settings.ViewDistance / 200.0f), viewdistance.Minimum, viewdistance.Maximum);
|
||||
invertyaxis.Checked = General.Settings.InvertYAxis;
|
||||
fixedaspect.Checked = General.Settings.FixedAspect;
|
||||
scriptfontbold.Checked = General.Settings.ScriptFontBold;
|
||||
|
|
Loading…
Reference in a new issue