Fixed inability to disable bilinear filtering in Visual mode some users experienced.

Fixed occasional TreeView flickering in Edit Things window, Browse Action window and Tag Explorer panel.
Updated Thing category icons in the Edit Things window. They now have "opened" and "closed" states.
Internal: added BufferedTreeView to the core controls.
Updated ZDoom game configurations (sector crush mode).
Updated ZDoom ACC.
This commit is contained in:
MaxED 2016-03-29 14:38:07 +00:00 committed by spherallic
parent 77272b9db3
commit 022b0474af
11 changed files with 1243 additions and 901 deletions

View file

@ -760,6 +760,9 @@
<Compile Include="Controls\ArgumentsControl.Designer.cs">
<DependentUpon>ArgumentsControl.cs</DependentUpon>
</Compile>
<Compile Include="Controls\BufferedTreeView.cs">
<SubType>Component</SubType>
</Compile>
<Compile Include="Controls\ButtonsNumericTextboxDesigner.cs" />
<Compile Include="Controls\CollapsibleSplitContainer.cs">
<SubType>Component</SubType>

View file

@ -5,20 +5,23 @@ using System.Runtime.InteropServices;
// As per http://stackoverflow.com/questions/10362988/treeview-flickering
// Gets rid of the flickering default TreeView
namespace CodeImp.DoomBuilder.SoundPropagationMode
namespace CodeImp.DoomBuilder.Controls
{
public class BufferedTreeView : TreeView
{
// Pinvoke:
private const int TVM_SETEXTENDEDSTYLE = 0x1100 + 44;
//private const int TVM_GETEXTENDEDSTYLE = 0x1100 + 45;
private const int TVS_EX_DOUBLEBUFFER = 0x0004;
[DllImport("user32.dll")]
private static extern IntPtr SendMessage(IntPtr hWnd, int msg, IntPtr wp, IntPtr lp);
// Methods
protected override void OnHandleCreated(EventArgs e)
{
SendMessage(this.Handle, TVM_SETEXTENDEDSTYLE, (IntPtr)TVS_EX_DOUBLEBUFFER, (IntPtr)TVS_EX_DOUBLEBUFFER);
base.OnHandleCreated(e);
}
// Pinvoke:
private const int TVM_SETEXTENDEDSTYLE = 0x1100 + 44;
private const int TVM_GETEXTENDEDSTYLE = 0x1100 + 45;
private const int TVS_EX_DOUBLEBUFFER = 0x0004;
[DllImport("user32.dll")]
private static extern IntPtr SendMessage(IntPtr hWnd, int msg, IntPtr wp, IntPtr lp);
}
}
}

View file

@ -153,31 +153,51 @@ namespace CodeImp.DoomBuilder.Controls
this.thingimages.Images.SetKeyName(17, "thing17.png");
this.thingimages.Images.SetKeyName(18, "thing18.png");
this.thingimages.Images.SetKeyName(19, "thing19.png");
this.thingimages.Images.SetKeyName(20, "category00.png");
this.thingimages.Images.SetKeyName(21, "category01.png");
this.thingimages.Images.SetKeyName(22, "category02.png");
this.thingimages.Images.SetKeyName(23, "category03.png");
this.thingimages.Images.SetKeyName(24, "category04.png");
this.thingimages.Images.SetKeyName(25, "category05.png");
this.thingimages.Images.SetKeyName(26, "category06.png");
this.thingimages.Images.SetKeyName(27, "category07.png");
this.thingimages.Images.SetKeyName(28, "category08.png");
this.thingimages.Images.SetKeyName(29, "category09.png");
this.thingimages.Images.SetKeyName(30, "category10.png");
this.thingimages.Images.SetKeyName(31, "category11.png");
this.thingimages.Images.SetKeyName(32, "category12.png");
this.thingimages.Images.SetKeyName(33, "category13.png");
this.thingimages.Images.SetKeyName(34, "category14.png");
this.thingimages.Images.SetKeyName(35, "category15.png");
this.thingimages.Images.SetKeyName(36, "category16.png");
this.thingimages.Images.SetKeyName(37, "category17.png");
this.thingimages.Images.SetKeyName(38, "category18.png");
this.thingimages.Images.SetKeyName(39, "category19.png");
this.thingimages.Images.SetKeyName(40, "Warning.png");
//
// infopanel
//
this.infopanel.Controls.Add(this.fulltypecaption);
this.thingimages.Images.SetKeyName(20, "Warning.png");
this.thingimages.Images.SetKeyName(21, "category00.png");
this.thingimages.Images.SetKeyName(22, "category01.png");
this.thingimages.Images.SetKeyName(23, "category02.png");
this.thingimages.Images.SetKeyName(24, "category03.png");
this.thingimages.Images.SetKeyName(25, "category04.png");
this.thingimages.Images.SetKeyName(26, "category05.png");
this.thingimages.Images.SetKeyName(27, "category06.png");
this.thingimages.Images.SetKeyName(28, "category07.png");
this.thingimages.Images.SetKeyName(29, "category08.png");
this.thingimages.Images.SetKeyName(30, "category09.png");
this.thingimages.Images.SetKeyName(31, "category10.png");
this.thingimages.Images.SetKeyName(32, "category11.png");
this.thingimages.Images.SetKeyName(33, "category12.png");
this.thingimages.Images.SetKeyName(34, "category13.png");
this.thingimages.Images.SetKeyName(35, "category14.png");
this.thingimages.Images.SetKeyName(36, "category15.png");
this.thingimages.Images.SetKeyName(37, "category16.png");
this.thingimages.Images.SetKeyName(38, "category17.png");
this.thingimages.Images.SetKeyName(39, "category18.png");
this.thingimages.Images.SetKeyName(40, "category19.png");
this.thingimages.Images.SetKeyName(41, "category_open00.png");
this.thingimages.Images.SetKeyName(42, "category_open01.png");
this.thingimages.Images.SetKeyName(43, "category_open02.png");
this.thingimages.Images.SetKeyName(44, "category_open03.png");
this.thingimages.Images.SetKeyName(45, "category_open04.png");
this.thingimages.Images.SetKeyName(46, "category_open05.png");
this.thingimages.Images.SetKeyName(47, "category_open06.png");
this.thingimages.Images.SetKeyName(48, "category_open07.png");
this.thingimages.Images.SetKeyName(49, "category_open08.png");
this.thingimages.Images.SetKeyName(50, "category_open09.png");
this.thingimages.Images.SetKeyName(51, "category_open10.png");
this.thingimages.Images.SetKeyName(52, "category_open11.png");
this.thingimages.Images.SetKeyName(53, "category_open12.png");
this.thingimages.Images.SetKeyName(54, "category_open13.png");
this.thingimages.Images.SetKeyName(55, "category_open14.png");
this.thingimages.Images.SetKeyName(56, "category_open15.png");
this.thingimages.Images.SetKeyName(57, "category_open16.png");
this.thingimages.Images.SetKeyName(58, "category_open17.png");
this.thingimages.Images.SetKeyName(59, "category_open18.png");
this.thingimages.Images.SetKeyName(60, "category_open19.png");
//
// infopanel
//
this.infopanel.Controls.Add(this.fulltypecaption);
this.infopanel.Controls.Add(this.fulltypelabel);
this.infopanel.Controls.Add(this.spritepanel);
this.infopanel.Controls.Add(this.classname);
@ -280,7 +300,9 @@ namespace CodeImp.DoomBuilder.Controls
this.typelist.SelectionsChanged += new System.EventHandler(this.typelist_SelectionsChanged);
this.typelist.KeyPress += new System.Windows.Forms.KeyPressEventHandler(this.typelist_KeyPress);
this.typelist.MouseDoubleClick += new System.Windows.Forms.MouseEventHandler(this.typelist_MouseDoubleClick);
this.typelist.MouseEnter += new System.EventHandler(this.typelist_MouseEnter);
this.typelist.BeforeExpand += new System.Windows.Forms.TreeViewCancelEventHandler(this.typelist_BeforeExpand);
this.typelist.BeforeCollapse += new System.Windows.Forms.TreeViewCancelEventHandler(this.typelist_BeforeCollapse);
this.typelist.MouseEnter += new System.EventHandler(this.typelist_MouseEnter);
//
// spritetex
//

View file

@ -35,7 +35,9 @@ namespace CodeImp.DoomBuilder.Controls
{
#region ================== Constants
private const int WARNING_ICON_INDEX = 40; //mxd
private const int WARNING_ICON_INDEX = 20; //mxd
private const int FOLDER_ICON_OFFSET = 21; //mxd
private const int FOLDER_OPEN_ICON_OFFSET = 41; //mxd
#endregion
@ -125,7 +127,7 @@ namespace CodeImp.DoomBuilder.Controls
else
{
// Set regular icon
if((ti.Color >= 0) && (ti.Color < thingimages.Images.Count)) n.ImageIndex = ti.Color;
if((ti.Color > -1) && (ti.Color < WARNING_ICON_INDEX)) n.ImageIndex = ti.Color;
n.SelectedImageIndex = n.ImageIndex;
}
@ -142,8 +144,8 @@ namespace CodeImp.DoomBuilder.Controls
}
else
{
cn.ImageIndex = thingimages.Images.Count / 2; // Offset to folder icons
if((tc.Color >= 0) && (tc.Color < thingimages.Images.Count)) cn.ImageIndex += tc.Color;
cn.ImageIndex = FOLDER_ICON_OFFSET; // Offset to folder icons
if((tc.Color > -1) && (tc.Color < WARNING_ICON_INDEX)) cn.ImageIndex += tc.Color;
cn.SelectedImageIndex = cn.ImageIndex;
}
}
@ -552,6 +554,22 @@ namespace CodeImp.DoomBuilder.Controls
{
General.OpenWebsite(General.Map.Config.ThingClassHelp.Replace("%K", thinginfo.ClassName));
}
//mxd. Switch to Open Folder icon
private void typelist_BeforeExpand(object sender, TreeViewCancelEventArgs e)
{
// Category node?
if(e.Node.ImageIndex > WARNING_ICON_INDEX)
e.Node.ImageIndex = e.Node.ImageIndex - FOLDER_ICON_OFFSET + FOLDER_OPEN_ICON_OFFSET;
}
//mxd. Switch to Closed Folder icon
private void typelist_BeforeCollapse(object sender, TreeViewCancelEventArgs e)
{
// Category node?
if(e.Node.ImageIndex > WARNING_ICON_INDEX)
e.Node.ImageIndex = e.Node.ImageIndex - FOLDER_OPEN_ICON_OFFSET + FOLDER_ICON_OFFSET;
}
#endregion
}

File diff suppressed because it is too large Load diff

View file

@ -72,6 +72,7 @@ using System.Collections.Generic;
using System.ComponentModel;
using System.Drawing;
using System.Windows.Forms;
using CodeImp.DoomBuilder.Controls;
#endregion
@ -128,7 +129,7 @@ namespace CodeImp.DoomBuilder.GZBuilder.Controls
/// The TreeView control is a regular treeview with multi-selection capability.
/// </summary>
[ToolboxItem(true)]
public class MultiSelectTreeview : TreeView
public class MultiSelectTreeview : BufferedTreeView
{
public event TreeViewEventHandler AfterDeselect;
public event TreeViewEventHandler BeforeDeselect;

View file

@ -56,7 +56,7 @@ namespace CodeImp.DoomBuilder.Windows
this.option0label = new System.Windows.Forms.Label();
this.cancel = new System.Windows.Forms.Button();
this.apply = new System.Windows.Forms.Button();
this.actions = new System.Windows.Forms.TreeView();
this.actions = new CodeImp.DoomBuilder.Controls.BufferedTreeView();
this.tabs = new System.Windows.Forms.TabControl();
this.tabactions = new System.Windows.Forms.TabPage();
this.filterPanel = new System.Windows.Forms.Panel();
@ -525,7 +525,7 @@ namespace CodeImp.DoomBuilder.Windows
private System.Windows.Forms.Button cancel;
private System.Windows.Forms.Button apply;
private System.Windows.Forms.TreeView actions;
private CodeImp.DoomBuilder.Controls.BufferedTreeView actions;
private System.Windows.Forms.TabControl tabs;
private System.Windows.Forms.TabPage tabactions;
private System.Windows.Forms.TabPage tabgeneralized;

View file

@ -29,7 +29,7 @@
private void InitializeComponent()
{
this.showwarningsonly = new System.Windows.Forms.CheckBox();
this.soundenvironments = new CodeImp.DoomBuilder.SoundPropagationMode.BufferedTreeView();
this.soundenvironments = new CodeImp.DoomBuilder.Controls.BufferedTreeView();
this.SuspendLayout();
//
// showwarningsonly
@ -73,7 +73,7 @@
#endregion
private BufferedTreeView soundenvironments;
private CodeImp.DoomBuilder.Controls.BufferedTreeView soundenvironments;
private System.Windows.Forms.CheckBox showwarningsonly;

View file

@ -2,6 +2,7 @@
using System.Collections.Generic;
using System.Drawing;
using System.Windows.Forms;
using CodeImp.DoomBuilder.Controls;
using CodeImp.DoomBuilder.Map;
using CodeImp.DoomBuilder.Editing;
using CodeImp.DoomBuilder.Geometry;

View file

@ -76,9 +76,6 @@
<Reference Include="System.Xml" />
</ItemGroup>
<ItemGroup>
<Compile Include="BufferedTreeView.cs">
<SubType>Component</SubType>
</Compile>
<Compile Include="BuilderPlug.cs" />
<Compile Include="Interface\SoundEnvironmentPanel.cs">
<SubType>UserControl</SubType>

View file

@ -16,7 +16,7 @@
private void InitializeComponent() {
this.components = new System.ComponentModel.Container();
System.ComponentModel.ComponentResourceManager resources = new System.ComponentModel.ComponentResourceManager(typeof(TagExplorer));
this.treeView = new System.Windows.Forms.TreeView();
this.treeView = new CodeImp.DoomBuilder.Controls.BufferedTreeView();
this.imageList1 = new System.Windows.Forms.ImageList(this.components);
this.cbDisplayMode = new System.Windows.Forms.ComboBox();
this.label1 = new System.Windows.Forms.Label();
@ -243,7 +243,7 @@
#endregion
private System.Windows.Forms.TreeView treeView;
private CodeImp.DoomBuilder.Controls.BufferedTreeView treeView;
private System.Windows.Forms.ComboBox cbDisplayMode;
private System.Windows.Forms.Label label1;
private System.Windows.Forms.ComboBox cbSortMode;