mirror of
https://git.do.srb2.org/STJr/UltimateZoneBuilder.git
synced 2024-11-29 23:22:32 +00:00
Should not have used textures category if not having them on top
This commit is contained in:
parent
819d27885b
commit
36381c51bb
3 changed files with 34 additions and 6 deletions
|
@ -119,7 +119,7 @@ namespace CodeImp.DoomBuilder.Controls
|
||||||
this.browseflats = browseflats;
|
this.browseflats = browseflats;
|
||||||
uselongtexturenames = General.Map.Options.UseLongTextureNames;
|
uselongtexturenames = General.Map.Options.UseLongTextureNames;
|
||||||
texturetype = General.Settings.ReadSetting(settingpath + ".texturetype", 0);
|
texturetype = General.Settings.ReadSetting(settingpath + ".texturetype", 0);
|
||||||
usedtexturesfirst.Checked = General.Settings.ReadSetting(settingpath + ".showusedtexturesfirst", false);
|
list.UsedTexturesFirst = usedtexturesfirst.Checked = General.Settings.ReadSetting(settingpath + ".showusedtexturesfirst", false);
|
||||||
list.ClassicView = classicview.Checked = General.Settings.ReadSetting(settingpath + ".classicview", false);
|
list.ClassicView = classicview.Checked = General.Settings.ReadSetting(settingpath + ".classicview", false);
|
||||||
|
|
||||||
int imagesize = General.Settings.ReadSetting(settingpath + ".imagesize", 128);
|
int imagesize = General.Settings.ReadSetting(settingpath + ".imagesize", 128);
|
||||||
|
@ -364,6 +364,7 @@ namespace CodeImp.DoomBuilder.Controls
|
||||||
{
|
{
|
||||||
if(!blockupdate)
|
if(!blockupdate)
|
||||||
{
|
{
|
||||||
|
list.UsedTexturesFirst = usedtexturesfirst.Checked;
|
||||||
RefillList(false);
|
RefillList(false);
|
||||||
list.Focus();
|
list.Focus();
|
||||||
}
|
}
|
||||||
|
|
|
@ -28,6 +28,7 @@ namespace CodeImp.DoomBuilder.Controls
|
||||||
private ImageBrowserItem lastselecteditem;
|
private ImageBrowserItem lastselecteditem;
|
||||||
private int imagesize = 128;
|
private int imagesize = 128;
|
||||||
private bool classicview = false;
|
private bool classicview = false;
|
||||||
|
private bool usedtexturesfirst = false;
|
||||||
private string contenttype = "Textures";
|
private string contenttype = "Textures";
|
||||||
private string title;
|
private string title;
|
||||||
private int titleheight = SystemFonts.MessageBoxFont.Height + 6;
|
private int titleheight = SystemFonts.MessageBoxFont.Height + 6;
|
||||||
|
@ -125,6 +126,17 @@ namespace CodeImp.DoomBuilder.Controls
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
|
|
||||||
|
public bool UsedTexturesFirst
|
||||||
|
{
|
||||||
|
get { return usedtexturesfirst; }
|
||||||
|
set
|
||||||
|
{
|
||||||
|
usedtexturesfirst = value;
|
||||||
|
UpdateRectangles();
|
||||||
|
if (selection.Count > 0) ScrollToItem(selection[0]);
|
||||||
|
}
|
||||||
|
}
|
||||||
|
|
||||||
public List<ImageBrowserItem> Items { get { return items; } }
|
public List<ImageBrowserItem> Items { get { return items; } }
|
||||||
public List<ImageBrowserItem> SelectedItems { get { return selection; } }
|
public List<ImageBrowserItem> SelectedItems { get { return selection; } }
|
||||||
public string Title { get { return title; } set { title = value; } }
|
public string Title { get { return title; } set { title = value; } }
|
||||||
|
@ -498,7 +510,7 @@ namespace CodeImp.DoomBuilder.Controls
|
||||||
foreach (var ti in items)
|
foreach (var ti in items)
|
||||||
{
|
{
|
||||||
Image preview = GetPreview(ti, imagesize);
|
Image preview = GetPreview(ti, imagesize);
|
||||||
if (classicview && (ti == firstItem || (currentType == ImageBrowserItemType.IMAGE && ti.ItemType != ImageBrowserItemType.IMAGE) || currentUsedInMap != ti.Icon.UsedInMap))
|
if (classicview && (ti == firstItem || (currentType == ImageBrowserItemType.IMAGE && ti.ItemType != ImageBrowserItemType.IMAGE) || (usedtexturesfirst && currentUsedInMap != ti.Icon.UsedInMap)))
|
||||||
{
|
{
|
||||||
// new row, also provide space for category name.
|
// new row, also provide space for category name.
|
||||||
cx = 0;
|
cx = 0;
|
||||||
|
@ -597,7 +609,7 @@ namespace CodeImp.DoomBuilder.Controls
|
||||||
|
|
||||||
for (var i = 0; i < items.Count; i++)
|
for (var i = 0; i < items.Count; i++)
|
||||||
{
|
{
|
||||||
if (classicview && (i == 0 || (currentType == ImageBrowserItemType.IMAGE && items[i].ItemType != ImageBrowserItemType.IMAGE) || currentUsedInMap != items[i].Icon.UsedInMap))
|
if (classicview && (i == 0 || (currentType == ImageBrowserItemType.IMAGE && items[i].ItemType != ImageBrowserItemType.IMAGE) || (usedtexturesfirst && currentUsedInMap != items[i].Icon.UsedInMap)))
|
||||||
{
|
{
|
||||||
// draw corresponding title right above this item.
|
// draw corresponding title right above this item.
|
||||||
string hdrname;
|
string hdrname;
|
||||||
|
|
|
@ -1,7 +1,7 @@
|
||||||
//------------------------------------------------------------------------------
|
//------------------------------------------------------------------------------
|
||||||
// <auto-generated>
|
// <auto-generated>
|
||||||
// This code was generated by a tool.
|
// This code was generated by a tool.
|
||||||
// Runtime Version:2.0.50727.5485
|
// Runtime Version:4.0.30319.42000
|
||||||
//
|
//
|
||||||
// Changes to this file may cause incorrect behavior and will be lost if
|
// Changes to this file may cause incorrect behavior and will be lost if
|
||||||
// the code is regenerated.
|
// the code is regenerated.
|
||||||
|
@ -19,7 +19,7 @@ namespace CodeImp.DoomBuilder.BuilderEffects.Properties {
|
||||||
// class via a tool like ResGen or Visual Studio.
|
// class via a tool like ResGen or Visual Studio.
|
||||||
// To add or remove a member, edit your .ResX file then rerun ResGen
|
// To add or remove a member, edit your .ResX file then rerun ResGen
|
||||||
// with the /str option, or rebuild your VS project.
|
// with the /str option, or rebuild your VS project.
|
||||||
[global::System.CodeDom.Compiler.GeneratedCodeAttribute("System.Resources.Tools.StronglyTypedResourceBuilder", "2.0.0.0")]
|
[global::System.CodeDom.Compiler.GeneratedCodeAttribute("System.Resources.Tools.StronglyTypedResourceBuilder", "4.0.0.0")]
|
||||||
[global::System.Diagnostics.DebuggerNonUserCodeAttribute()]
|
[global::System.Diagnostics.DebuggerNonUserCodeAttribute()]
|
||||||
[global::System.Runtime.CompilerServices.CompilerGeneratedAttribute()]
|
[global::System.Runtime.CompilerServices.CompilerGeneratedAttribute()]
|
||||||
internal class Resources {
|
internal class Resources {
|
||||||
|
@ -60,6 +60,9 @@ namespace CodeImp.DoomBuilder.BuilderEffects.Properties {
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
|
|
||||||
|
/// <summary>
|
||||||
|
/// Looks up a localized resource of type System.Drawing.Bitmap.
|
||||||
|
/// </summary>
|
||||||
internal static System.Drawing.Bitmap FlatShading {
|
internal static System.Drawing.Bitmap FlatShading {
|
||||||
get {
|
get {
|
||||||
object obj = ResourceManager.GetObject("FlatShading", resourceCulture);
|
object obj = ResourceManager.GetObject("FlatShading", resourceCulture);
|
||||||
|
@ -67,6 +70,9 @@ namespace CodeImp.DoomBuilder.BuilderEffects.Properties {
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
|
|
||||||
|
/// <summary>
|
||||||
|
/// Looks up a localized resource of type System.Drawing.Bitmap.
|
||||||
|
/// </summary>
|
||||||
internal static System.Drawing.Bitmap Folder {
|
internal static System.Drawing.Bitmap Folder {
|
||||||
get {
|
get {
|
||||||
object obj = ResourceManager.GetObject("Folder", resourceCulture);
|
object obj = ResourceManager.GetObject("Folder", resourceCulture);
|
||||||
|
@ -74,6 +80,9 @@ namespace CodeImp.DoomBuilder.BuilderEffects.Properties {
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
|
|
||||||
|
/// <summary>
|
||||||
|
/// Looks up a localized resource of type System.Drawing.Bitmap.
|
||||||
|
/// </summary>
|
||||||
internal static System.Drawing.Bitmap Jitter {
|
internal static System.Drawing.Bitmap Jitter {
|
||||||
get {
|
get {
|
||||||
object obj = ResourceManager.GetObject("Jitter", resourceCulture);
|
object obj = ResourceManager.GetObject("Jitter", resourceCulture);
|
||||||
|
@ -81,6 +90,9 @@ namespace CodeImp.DoomBuilder.BuilderEffects.Properties {
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
|
|
||||||
|
/// <summary>
|
||||||
|
/// Looks up a localized resource of type System.Drawing.Bitmap.
|
||||||
|
/// </summary>
|
||||||
internal static System.Drawing.Bitmap Terrain {
|
internal static System.Drawing.Bitmap Terrain {
|
||||||
get {
|
get {
|
||||||
object obj = ResourceManager.GetObject("Terrain", resourceCulture);
|
object obj = ResourceManager.GetObject("Terrain", resourceCulture);
|
||||||
|
@ -88,6 +100,9 @@ namespace CodeImp.DoomBuilder.BuilderEffects.Properties {
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
|
|
||||||
|
/// <summary>
|
||||||
|
/// Looks up a localized resource of type System.Drawing.Bitmap.
|
||||||
|
/// </summary>
|
||||||
internal static System.Drawing.Bitmap Update {
|
internal static System.Drawing.Bitmap Update {
|
||||||
get {
|
get {
|
||||||
object obj = ResourceManager.GetObject("Update", resourceCulture);
|
object obj = ResourceManager.GetObject("Update", resourceCulture);
|
||||||
|
|
Loading…
Reference in a new issue