mirror of
https://git.do.srb2.org/STJr/UltimateZoneBuilder.git
synced 2025-01-18 14:31:50 +00:00
Fixed, action arguments control: in some cases named script name was not displayed.
Fixed, Script Editor: Delete key was not working in the text editor (because it was hijacked by context menu action, which requires a selection to be active).
This commit is contained in:
parent
da02474302
commit
b283fab795
5 changed files with 38 additions and 23 deletions
|
@ -297,21 +297,16 @@ namespace CodeImp.DoomBuilder.Controls
|
|||
if(shownamedscripts)
|
||||
{
|
||||
argzeromode = ArgZeroMode.SCRIPT_NAME;
|
||||
scriptnames.Text = arg0str;
|
||||
|
||||
if(General.Map.NamedScripts.ContainsKey(arg0str))
|
||||
{
|
||||
scriptnames.SelectedText = arg0str;
|
||||
UpdateScriptArguments(General.Map.NamedScripts[arg0str]);
|
||||
}
|
||||
else
|
||||
{
|
||||
// Unknown script name
|
||||
scriptnames.Text = arg0str;
|
||||
arg0label.Text = "Script Name:";
|
||||
}
|
||||
arg0label.Text = "Script Name:"; // Unknown script name
|
||||
}
|
||||
// Update numbered script name
|
||||
else
|
||||
{
|
||||
// Update numbered script name
|
||||
argzeromode = ArgZeroMode.SCRIPT_NUMBER;
|
||||
int a0 = arg0.GetResult(0);
|
||||
if(General.Map.NumberedScripts.ContainsKey(a0))
|
||||
|
|
|
@ -98,8 +98,8 @@
|
|||
//
|
||||
// FindUsagesControl
|
||||
//
|
||||
this.AutoScaleDimensions = new System.Drawing.SizeF(6F, 13F);
|
||||
this.AutoScaleMode = System.Windows.Forms.AutoScaleMode.Font;
|
||||
this.AutoScaleDimensions = new System.Drawing.SizeF(96F, 96F);
|
||||
this.AutoScaleMode = System.Windows.Forms.AutoScaleMode.Dpi;
|
||||
this.Controls.Add(this.findusagestree);
|
||||
this.Name = "FindUsagesControl";
|
||||
this.Size = new System.Drawing.Size(619, 150);
|
||||
|
|
|
@ -276,8 +276,13 @@ namespace CodeImp.DoomBuilder.Controls.Scripting
|
|||
{
|
||||
if(findusagestree.SelectedNode != null)
|
||||
{
|
||||
persistentnodes.Remove(findusagestree.SelectedNode);
|
||||
findusagestree.Nodes.Remove(findusagestree.SelectedNode);
|
||||
// Remove parent node when the current one is it's only child node
|
||||
TreeNode target = findusagestree.SelectedNode;
|
||||
while(target.Parent != null && target.Parent.Nodes.Count == 1)
|
||||
target = target.Parent;
|
||||
|
||||
persistentnodes.Remove(target);
|
||||
findusagestree.Nodes.Remove(target);
|
||||
}
|
||||
}
|
||||
|
||||
|
@ -308,8 +313,16 @@ namespace CodeImp.DoomBuilder.Controls.Scripting
|
|||
|
||||
private void contextmenu_Opening(object sender, System.ComponentModel.CancelEventArgs e)
|
||||
{
|
||||
menuremove.Enabled = (findusagestree.SelectedNode != null);
|
||||
menurepeat.Enabled = (findusagestree.SelectedNode != null);
|
||||
if(findusagestree.Nodes.Count > 0)
|
||||
{
|
||||
menuremove.Enabled = (findusagestree.SelectedNode != null);
|
||||
menurepeat.Enabled = (findusagestree.SelectedNode != null);
|
||||
}
|
||||
else
|
||||
{
|
||||
// Don't show the menu when there are no valid options
|
||||
e.Cancel = true;
|
||||
}
|
||||
}
|
||||
|
||||
private void findusagestree_BeforeExpand(object sender, TreeViewCancelEventArgs e)
|
||||
|
|
|
@ -146,7 +146,7 @@ namespace CodeImp.DoomBuilder.Controls
|
|||
//
|
||||
this.menudelete.Image = global::CodeImp.DoomBuilder.Properties.Resources.Close;
|
||||
this.menudelete.Name = "menudelete";
|
||||
this.menudelete.ShortcutKeys = System.Windows.Forms.Keys.Delete;
|
||||
this.menudelete.ShortcutKeyDisplayString = "Del";
|
||||
this.menudelete.Size = new System.Drawing.Size(208, 22);
|
||||
this.menudelete.Text = "Delete";
|
||||
this.menudelete.Click += new System.EventHandler(this.menudelete_Click);
|
||||
|
|
|
@ -3136,15 +3136,22 @@ namespace CodeImp.DoomBuilder.Data
|
|||
if(string.IsNullOrEmpty(skytex))
|
||||
General.ErrorLogger.Add(ErrorType.Warning, "Skybox creation failed: Sky1 property is missing from the MAPINFO map definition");
|
||||
else
|
||||
General.ErrorLogger.Add(ErrorType.Warning, "Skybox creation failed: unable to load \"" + skytex + "\" texture");
|
||||
General.ErrorLogger.Add(ErrorType.Warning, "Skybox creation failed: unable to load texture \"" + skytex + "\"");
|
||||
|
||||
// Use the built-in texture
|
||||
ImageData tex = LoadInternalTexture("MissingSky3D.png");
|
||||
tex.CreateTexture();
|
||||
Bitmap sky = new Bitmap(tex.GetBitmap());
|
||||
sky.RotateFlip(RotateFlipType.RotateNoneFlipX); // We don't want our built-in image mirrored...
|
||||
skybox = MakeClassicSkyBox(sky);
|
||||
tex.Dispose();
|
||||
if(General.Map.Graphics.CheckAvailability())
|
||||
{
|
||||
ImageData tex = LoadInternalTexture("MissingSky3D.png");
|
||||
tex.CreateTexture();
|
||||
Bitmap sky = new Bitmap(tex.GetBitmap());
|
||||
sky.RotateFlip(RotateFlipType.RotateNoneFlipX); // We don't want our built-in image mirrored...
|
||||
skybox = MakeClassicSkyBox(sky);
|
||||
tex.Dispose();
|
||||
}
|
||||
else
|
||||
{
|
||||
General.ErrorLogger.Add(ErrorType.Warning, "Skybox creation failed: Direct3D device is not available");
|
||||
}
|
||||
}
|
||||
}
|
||||
|
||||
|
|
Loading…
Reference in a new issue