mirror of
https://git.do.srb2.org/STJr/UltimateZoneBuilder.git
synced 2024-11-27 06:02:11 +00:00
miauw.
This commit is contained in:
parent
fc2685a0b5
commit
da9a1af21a
6 changed files with 138 additions and 67 deletions
21
Source/Interface/MapOptionsForm.Designer.cs
generated
21
Source/Interface/MapOptionsForm.Designer.cs
generated
|
@ -105,7 +105,18 @@ namespace CodeImp.DoomBuilder.Interface
|
||||||
this.config.Location = new System.Drawing.Point(129, 31);
|
this.config.Location = new System.Drawing.Point(129, 31);
|
||||||
this.config.Name = "config";
|
this.config.Name = "config";
|
||||||
this.config.Size = new System.Drawing.Size(213, 22);
|
this.config.Size = new System.Drawing.Size(213, 22);
|
||||||
|
this.config.Sorted = true;
|
||||||
this.config.TabIndex = 6;
|
this.config.TabIndex = 6;
|
||||||
|
this.config.SelectedIndexChanged += new System.EventHandler(this.config_SelectedIndexChanged);
|
||||||
|
//
|
||||||
|
// label4
|
||||||
|
//
|
||||||
|
label4.Location = new System.Drawing.Point(15, 161);
|
||||||
|
label4.Name = "label4";
|
||||||
|
label4.Size = new System.Drawing.Size(336, 34);
|
||||||
|
label4.TabIndex = 17;
|
||||||
|
label4.Text = "Drag items to change order (lower items override higher items). Grayed items are " +
|
||||||
|
"loaded according to the game configuration.";
|
||||||
//
|
//
|
||||||
// apply
|
// apply
|
||||||
//
|
//
|
||||||
|
@ -145,20 +156,12 @@ namespace CodeImp.DoomBuilder.Interface
|
||||||
//
|
//
|
||||||
// resourcelocations
|
// resourcelocations
|
||||||
//
|
//
|
||||||
|
this.resourcelocations.DialogOffset = new System.Drawing.Point(40, 20);
|
||||||
this.resourcelocations.Location = new System.Drawing.Point(15, 28);
|
this.resourcelocations.Location = new System.Drawing.Point(15, 28);
|
||||||
this.resourcelocations.Name = "resourcelocations";
|
this.resourcelocations.Name = "resourcelocations";
|
||||||
this.resourcelocations.Size = new System.Drawing.Size(336, 130);
|
this.resourcelocations.Size = new System.Drawing.Size(336, 130);
|
||||||
this.resourcelocations.TabIndex = 18;
|
this.resourcelocations.TabIndex = 18;
|
||||||
//
|
//
|
||||||
// label4
|
|
||||||
//
|
|
||||||
label4.Location = new System.Drawing.Point(15, 161);
|
|
||||||
label4.Name = "label4";
|
|
||||||
label4.Size = new System.Drawing.Size(336, 34);
|
|
||||||
label4.TabIndex = 17;
|
|
||||||
label4.Text = "Drag items to change order (lower items override higher items). Grayed items are " +
|
|
||||||
"loaded according to the game configuration.";
|
|
||||||
//
|
|
||||||
// MapOptionsForm
|
// MapOptionsForm
|
||||||
//
|
//
|
||||||
this.AcceptButton = this.apply;
|
this.AcceptButton = this.apply;
|
||||||
|
|
|
@ -40,6 +40,8 @@ namespace CodeImp.DoomBuilder.Interface
|
||||||
// Constructor
|
// Constructor
|
||||||
public MapOptionsForm(MapOptions options)
|
public MapOptionsForm(MapOptions options)
|
||||||
{
|
{
|
||||||
|
int index;
|
||||||
|
|
||||||
// Initialize
|
// Initialize
|
||||||
InitializeComponent();
|
InitializeComponent();
|
||||||
|
|
||||||
|
@ -50,13 +52,13 @@ namespace CodeImp.DoomBuilder.Interface
|
||||||
for(int i = 0; i < General.Configs.Count; i++)
|
for(int i = 0; i < General.Configs.Count; i++)
|
||||||
{
|
{
|
||||||
// Add config name to list
|
// Add config name to list
|
||||||
config.Items.Add(General.Configs[i].Name);
|
index = config.Items.Add(General.Configs[i]);
|
||||||
|
|
||||||
// Is this configuration currently selected?
|
// Is this configuration currently selected?
|
||||||
if(string.Compare(General.Configs[i].Filename, options.ConfigFile, true) == 0)
|
if(string.Compare(General.Configs[i].Filename, options.ConfigFile, true) == 0)
|
||||||
{
|
{
|
||||||
// Select this item
|
// Select this item
|
||||||
config.SelectedIndex = config.Items.Count - 1;
|
config.SelectedIndex = index;
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
|
|
||||||
|
@ -106,5 +108,21 @@ namespace CodeImp.DoomBuilder.Interface
|
||||||
this.DialogResult = DialogResult.Cancel;
|
this.DialogResult = DialogResult.Cancel;
|
||||||
this.Hide();
|
this.Hide();
|
||||||
}
|
}
|
||||||
|
|
||||||
|
// Game configuration chosen
|
||||||
|
private void config_SelectedIndexChanged(object sender, EventArgs e)
|
||||||
|
{
|
||||||
|
ConfigurationInfo ci;
|
||||||
|
|
||||||
|
// Anything selected?
|
||||||
|
if(config.SelectedIndex > -1)
|
||||||
|
{
|
||||||
|
// Get the info
|
||||||
|
ci = (ConfigurationInfo)config.SelectedItem;
|
||||||
|
|
||||||
|
// Show resources
|
||||||
|
resourcelocations.FixedResourceLocationList(ci.Resources);
|
||||||
|
}
|
||||||
|
}
|
||||||
}
|
}
|
||||||
}
|
}
|
|
@ -117,19 +117,55 @@
|
||||||
<resheader name="writer">
|
<resheader name="writer">
|
||||||
<value>System.Resources.ResXResourceWriter, System.Windows.Forms, Version=2.0.0.0, Culture=neutral, PublicKeyToken=b77a5c561934e089</value>
|
<value>System.Resources.ResXResourceWriter, System.Windows.Forms, Version=2.0.0.0, Culture=neutral, PublicKeyToken=b77a5c561934e089</value>
|
||||||
</resheader>
|
</resheader>
|
||||||
|
<metadata name="label3.Locked" type="System.Boolean, mscorlib, Version=2.0.0.0, Culture=neutral, PublicKeyToken=b77a5c561934e089">
|
||||||
|
<value>True</value>
|
||||||
|
</metadata>
|
||||||
<metadata name="label3.GenerateMember" type="System.Boolean, mscorlib, Version=2.0.0.0, Culture=neutral, PublicKeyToken=b77a5c561934e089">
|
<metadata name="label3.GenerateMember" type="System.Boolean, mscorlib, Version=2.0.0.0, Culture=neutral, PublicKeyToken=b77a5c561934e089">
|
||||||
<value>False</value>
|
<value>False</value>
|
||||||
</metadata>
|
</metadata>
|
||||||
|
<metadata name="label2.Locked" type="System.Boolean, mscorlib, Version=2.0.0.0, Culture=neutral, PublicKeyToken=b77a5c561934e089">
|
||||||
|
<value>True</value>
|
||||||
|
</metadata>
|
||||||
<metadata name="label2.GenerateMember" type="System.Boolean, mscorlib, Version=2.0.0.0, Culture=neutral, PublicKeyToken=b77a5c561934e089">
|
<metadata name="label2.GenerateMember" type="System.Boolean, mscorlib, Version=2.0.0.0, Culture=neutral, PublicKeyToken=b77a5c561934e089">
|
||||||
<value>False</value>
|
<value>False</value>
|
||||||
</metadata>
|
</metadata>
|
||||||
|
<metadata name="label1.Locked" type="System.Boolean, mscorlib, Version=2.0.0.0, Culture=neutral, PublicKeyToken=b77a5c561934e089">
|
||||||
|
<value>True</value>
|
||||||
|
</metadata>
|
||||||
<metadata name="label1.GenerateMember" type="System.Boolean, mscorlib, Version=2.0.0.0, Culture=neutral, PublicKeyToken=b77a5c561934e089">
|
<metadata name="label1.GenerateMember" type="System.Boolean, mscorlib, Version=2.0.0.0, Culture=neutral, PublicKeyToken=b77a5c561934e089">
|
||||||
<value>False</value>
|
<value>False</value>
|
||||||
</metadata>
|
</metadata>
|
||||||
<metadata name="panelsettings.GenerateMember" type="System.Boolean, mscorlib, Version=2.0.0.0, Culture=neutral, PublicKeyToken=b77a5c561934e089">
|
<metadata name="panelsettings.GenerateMember" type="System.Boolean, mscorlib, Version=2.0.0.0, Culture=neutral, PublicKeyToken=b77a5c561934e089">
|
||||||
<value>False</value>
|
<value>False</value>
|
||||||
</metadata>
|
</metadata>
|
||||||
|
<metadata name="panelsettings.Locked" type="System.Boolean, mscorlib, Version=2.0.0.0, Culture=neutral, PublicKeyToken=b77a5c561934e089">
|
||||||
|
<value>True</value>
|
||||||
|
</metadata>
|
||||||
|
<metadata name="levelname.Locked" type="System.Boolean, mscorlib, Version=2.0.0.0, Culture=neutral, PublicKeyToken=b77a5c561934e089">
|
||||||
|
<value>True</value>
|
||||||
|
</metadata>
|
||||||
|
<metadata name="config.Locked" type="System.Boolean, mscorlib, Version=2.0.0.0, Culture=neutral, PublicKeyToken=b77a5c561934e089">
|
||||||
|
<value>True</value>
|
||||||
|
</metadata>
|
||||||
|
<metadata name="label4.Locked" type="System.Boolean, mscorlib, Version=2.0.0.0, Culture=neutral, PublicKeyToken=b77a5c561934e089">
|
||||||
|
<value>True</value>
|
||||||
|
</metadata>
|
||||||
<metadata name="label4.GenerateMember" type="System.Boolean, mscorlib, Version=2.0.0.0, Culture=neutral, PublicKeyToken=b77a5c561934e089">
|
<metadata name="label4.GenerateMember" type="System.Boolean, mscorlib, Version=2.0.0.0, Culture=neutral, PublicKeyToken=b77a5c561934e089">
|
||||||
<value>False</value>
|
<value>False</value>
|
||||||
</metadata>
|
</metadata>
|
||||||
|
<metadata name="apply.Locked" type="System.Boolean, mscorlib, Version=2.0.0.0, Culture=neutral, PublicKeyToken=b77a5c561934e089">
|
||||||
|
<value>True</value>
|
||||||
|
</metadata>
|
||||||
|
<metadata name="cancel.Locked" type="System.Boolean, mscorlib, Version=2.0.0.0, Culture=neutral, PublicKeyToken=b77a5c561934e089">
|
||||||
|
<value>True</value>
|
||||||
|
</metadata>
|
||||||
|
<metadata name="panelres.Locked" type="System.Boolean, mscorlib, Version=2.0.0.0, Culture=neutral, PublicKeyToken=b77a5c561934e089">
|
||||||
|
<value>True</value>
|
||||||
|
</metadata>
|
||||||
|
<metadata name="resourcelocations.Locked" type="System.Boolean, mscorlib, Version=2.0.0.0, Culture=neutral, PublicKeyToken=b77a5c561934e089">
|
||||||
|
<value>True</value>
|
||||||
|
</metadata>
|
||||||
|
<metadata name="$this.Locked" type="System.Boolean, mscorlib, Version=2.0.0.0, Culture=neutral, PublicKeyToken=b77a5c561934e089">
|
||||||
|
<value>True</value>
|
||||||
|
</metadata>
|
||||||
</root>
|
</root>
|
2
Source/Interface/OpenMapOptionsForm.Designer.cs
generated
2
Source/Interface/OpenMapOptionsForm.Designer.cs
generated
|
@ -91,6 +91,7 @@ namespace CodeImp.DoomBuilder.Interface
|
||||||
//
|
//
|
||||||
// resourcelocations
|
// resourcelocations
|
||||||
//
|
//
|
||||||
|
this.resourcelocations.DialogOffset = new System.Drawing.Point(40, 20);
|
||||||
this.resourcelocations.Location = new System.Drawing.Point(14, 26);
|
this.resourcelocations.Location = new System.Drawing.Point(14, 26);
|
||||||
this.resourcelocations.Name = "resourcelocations";
|
this.resourcelocations.Name = "resourcelocations";
|
||||||
this.resourcelocations.Size = new System.Drawing.Size(336, 127);
|
this.resourcelocations.Size = new System.Drawing.Size(336, 127);
|
||||||
|
@ -126,6 +127,7 @@ namespace CodeImp.DoomBuilder.Interface
|
||||||
this.config.Location = new System.Drawing.Point(141, 21);
|
this.config.Location = new System.Drawing.Point(141, 21);
|
||||||
this.config.Name = "config";
|
this.config.Name = "config";
|
||||||
this.config.Size = new System.Drawing.Size(213, 22);
|
this.config.Size = new System.Drawing.Size(213, 22);
|
||||||
|
this.config.Sorted = true;
|
||||||
this.config.TabIndex = 15;
|
this.config.TabIndex = 15;
|
||||||
this.config.SelectedIndexChanged += new System.EventHandler(this.config_SelectedIndexChanged);
|
this.config.SelectedIndexChanged += new System.EventHandler(this.config_SelectedIndexChanged);
|
||||||
//
|
//
|
||||||
|
|
|
@ -59,6 +59,7 @@ namespace CodeImp.DoomBuilder.Interface
|
||||||
{
|
{
|
||||||
string dbsfile;
|
string dbsfile;
|
||||||
string gameconfig;
|
string gameconfig;
|
||||||
|
int index;
|
||||||
|
|
||||||
// Busy
|
// Busy
|
||||||
Cursor.Current = Cursors.WaitCursor;
|
Cursor.Current = Cursors.WaitCursor;
|
||||||
|
@ -91,13 +92,13 @@ namespace CodeImp.DoomBuilder.Interface
|
||||||
for(int i = 0; i < General.Configs.Count; i++)
|
for(int i = 0; i < General.Configs.Count; i++)
|
||||||
{
|
{
|
||||||
// Add config name to list
|
// Add config name to list
|
||||||
config.Items.Add(General.Configs[i].Name);
|
index = config.Items.Add(General.Configs[i]);
|
||||||
|
|
||||||
// This is the preferred game configuration?
|
// This is the preferred game configuration?
|
||||||
if(General.Configs[i].Filename == gameconfig)
|
if(General.Configs[i].Filename == gameconfig)
|
||||||
{
|
{
|
||||||
// Select this item
|
// Select this item
|
||||||
config.SelectedIndex = i;
|
config.SelectedIndex = index;
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
|
|
||||||
|
@ -178,12 +179,16 @@ namespace CodeImp.DoomBuilder.Interface
|
||||||
private void config_SelectedIndexChanged(object sender, EventArgs e)
|
private void config_SelectedIndexChanged(object sender, EventArgs e)
|
||||||
{
|
{
|
||||||
List<ListViewItem> mapnames;
|
List<ListViewItem> mapnames;
|
||||||
|
ConfigurationInfo ci;
|
||||||
Configuration cfg;
|
Configuration cfg;
|
||||||
IDictionary maplumpnames;
|
IDictionary maplumpnames;
|
||||||
int scanindex, checkoffset;
|
int scanindex, checkoffset;
|
||||||
int lumpsfound, lumpsrequired = 0;
|
int lumpsfound, lumpsrequired = 0;
|
||||||
string lumpname, selectedname = "";
|
string lumpname, selectedname = "";
|
||||||
|
|
||||||
|
// Anything selected?
|
||||||
|
if(config.SelectedIndex > -1)
|
||||||
|
{
|
||||||
// Keep selected name, if any
|
// Keep selected name, if any
|
||||||
if(mapslist.SelectedItems.Count > 0)
|
if(mapslist.SelectedItems.Count > 0)
|
||||||
selectedname = mapslist.SelectedItems[0].Text;
|
selectedname = mapslist.SelectedItems[0].Text;
|
||||||
|
@ -191,8 +196,11 @@ namespace CodeImp.DoomBuilder.Interface
|
||||||
// Make an array for the map names
|
// Make an array for the map names
|
||||||
mapnames = new List<ListViewItem>();
|
mapnames = new List<ListViewItem>();
|
||||||
|
|
||||||
|
// Get selected configuration info
|
||||||
|
ci = (ConfigurationInfo)config.SelectedItem;
|
||||||
|
|
||||||
// Load this configuration
|
// Load this configuration
|
||||||
cfg = General.LoadGameConfiguration(General.Configs[config.SelectedIndex].Filename);
|
cfg = General.LoadGameConfiguration(ci.Filename);
|
||||||
|
|
||||||
// Get the map lump names
|
// Get the map lump names
|
||||||
maplumpnames = cfg.ReadSetting("maplumpnames", new Hashtable());
|
maplumpnames = cfg.ReadSetting("maplumpnames", new Hashtable());
|
||||||
|
@ -248,6 +256,10 @@ namespace CodeImp.DoomBuilder.Interface
|
||||||
break;
|
break;
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
|
|
||||||
|
// Show configuration resources
|
||||||
|
resourcelocations.FixedResourceLocationList(ci.Resources);
|
||||||
|
}
|
||||||
}
|
}
|
||||||
|
|
||||||
// OK clicked
|
// OK clicked
|
||||||
|
|
|
@ -63,7 +63,7 @@ namespace CodeImp.DoomBuilder.Interface
|
||||||
}
|
}
|
||||||
|
|
||||||
// Go for all items
|
// Go for all items
|
||||||
for(int i = list.Count; i >= 0; i--)
|
for(int i = list.Count - 1; i >= 0; i--)
|
||||||
{
|
{
|
||||||
// Add item as fixed
|
// Add item as fixed
|
||||||
resourceitems.Items.Insert(0, new ListViewItem(list[i].location));
|
resourceitems.Items.Insert(0, new ListViewItem(list[i].location));
|
||||||
|
|
Loading…
Reference in a new issue