diff --git a/UoFiddler.Controls/Classes/ControlEvents.cs b/UoFiddler.Controls/Classes/ControlEvents.cs
index 875811e..2c92153 100644
--- a/UoFiddler.Controls/Classes/ControlEvents.cs
+++ b/UoFiddler.Controls/Classes/ControlEvents.cs
@@ -39,6 +39,8 @@ public sealed class ControlEvents
public delegate void ProgressChangeHandler();
+ public delegate void PreviewBackgroundColorChangeHandler();
+
///
/// Fired when map diff file usage is switched
///
@@ -104,6 +106,11 @@ public sealed class ControlEvents
///
public static event ProgressChangeHandler ProgressChangeEvent;
+ ///
+ /// Fired when preview background color changed
+ ///
+ public static event PreviewBackgroundColorChangeHandler PreviewBackgroundColorChangeEvent;
+
public static void FireMapDiffChangeEvent()
{
MapDiffChangeEvent?.Invoke();
@@ -168,5 +175,10 @@ public static void FireProgressChangeEvent()
{
ProgressChangeEvent?.Invoke();
}
+
+ public static void FirePreviewBackgroundColorChangeEvent()
+ {
+ PreviewBackgroundColorChangeEvent?.Invoke();
+ }
}
}
\ No newline at end of file
diff --git a/UoFiddler.Controls/Classes/Options.cs b/UoFiddler.Controls/Classes/Options.cs
index dab5525..057ae01 100644
--- a/UoFiddler.Controls/Classes/Options.cs
+++ b/UoFiddler.Controls/Classes/Options.cs
@@ -207,8 +207,8 @@ public static Icon GetFiddlerIcon()
public static string ProfileName { get; set; }
public static Color TileFocusColor { get; set; } = Color.DarkRed;
public static Color TileSelectionColor { get; set; } = Color.DodgerBlue;
- public static bool OverrideBackgroundColorFromTile { get; set; }
public static bool RemoveTileBorder { get; set; }
+ public static Color PreviewBackgroundColor { get; set; } = Color.White;
static Options()
{
diff --git a/UoFiddler.Controls/Forms/TileDataHelpForm.Designer.cs b/UoFiddler.Controls/Forms/TileDataHelpForm.Designer.cs
new file mode 100644
index 0000000..0a1248c
--- /dev/null
+++ b/UoFiddler.Controls/Forms/TileDataHelpForm.Designer.cs
@@ -0,0 +1,135 @@
+namespace UoFiddler.Controls.Forms
+{
+ partial class TileDataHelpForm
+ {
+ ///
+ /// Required designer variable.
+ ///
+ private System.ComponentModel.IContainer components = null;
+
+ ///
+ /// Clean up any resources being used.
+ ///
+ /// true if managed resources should be disposed; otherwise, false.
+ protected override void Dispose(bool disposing)
+ {
+ if (disposing && (components != null))
+ {
+ components.Dispose();
+ }
+ base.Dispose(disposing);
+ }
+
+ #region Windows Form Designer generated code
+
+ ///
+ /// Required method for Designer support - do not modify
+ /// the contents of this method with the code editor.
+ ///
+ private void InitializeComponent()
+ {
+ _splitContainer = new System.Windows.Forms.SplitContainer();
+ _listView = new System.Windows.Forms.ListView();
+ _columnField = new System.Windows.Forms.ColumnHeader();
+ _descriptionBox = new System.Windows.Forms.RichTextBox();
+ _btnClose = new System.Windows.Forms.Button();
+ ((System.ComponentModel.ISupportInitialize)_splitContainer).BeginInit();
+ _splitContainer.Panel1.SuspendLayout();
+ _splitContainer.Panel2.SuspendLayout();
+ _splitContainer.SuspendLayout();
+ SuspendLayout();
+ //
+ // _splitContainer
+ //
+ _splitContainer.Anchor = System.Windows.Forms.AnchorStyles.Top | System.Windows.Forms.AnchorStyles.Bottom | System.Windows.Forms.AnchorStyles.Left | System.Windows.Forms.AnchorStyles.Right;
+ _splitContainer.Location = new System.Drawing.Point(8, 8);
+ _splitContainer.Name = "_splitContainer";
+ //
+ // _splitContainer.Panel1
+ //
+ _splitContainer.Panel1.Controls.Add(_listView);
+ //
+ // _splitContainer.Panel2
+ //
+ _splitContainer.Panel2.Controls.Add(_descriptionBox);
+ _splitContainer.Size = new System.Drawing.Size(544, 396);
+ _splitContainer.SplitterDistance = 185;
+ _splitContainer.TabIndex = 0;
+ //
+ // _listView
+ //
+ _listView.Columns.AddRange(new System.Windows.Forms.ColumnHeader[] { _columnField });
+ _listView.Dock = System.Windows.Forms.DockStyle.Fill;
+ _listView.FullRowSelect = true;
+ _listView.HeaderStyle = System.Windows.Forms.ColumnHeaderStyle.Nonclickable;
+ _listView.Location = new System.Drawing.Point(0, 0);
+ _listView.MultiSelect = false;
+ _listView.Name = "_listView";
+ _listView.Size = new System.Drawing.Size(185, 396);
+ _listView.TabIndex = 0;
+ _listView.UseCompatibleStateImageBehavior = false;
+ _listView.View = System.Windows.Forms.View.Details;
+ _listView.SelectedIndexChanged += OnSelectionChanged;
+ //
+ // _columnField
+ //
+ _columnField.Text = "Field";
+ _columnField.Width = 162;
+ //
+ // _descriptionBox
+ //
+ _descriptionBox.BackColor = System.Drawing.SystemColors.Control;
+ _descriptionBox.BorderStyle = System.Windows.Forms.BorderStyle.None;
+ _descriptionBox.Dock = System.Windows.Forms.DockStyle.Fill;
+ _descriptionBox.Location = new System.Drawing.Point(0, 0);
+ _descriptionBox.Name = "_descriptionBox";
+ _descriptionBox.ReadOnly = true;
+ _descriptionBox.ScrollBars = System.Windows.Forms.RichTextBoxScrollBars.Vertical;
+ _descriptionBox.Size = new System.Drawing.Size(355, 396);
+ _descriptionBox.TabIndex = 0;
+ _descriptionBox.TabStop = false;
+ _descriptionBox.Text = "";
+ //
+ // _btnClose
+ //
+ _btnClose.Anchor = System.Windows.Forms.AnchorStyles.Bottom | System.Windows.Forms.AnchorStyles.Right;
+ _btnClose.DialogResult = System.Windows.Forms.DialogResult.Cancel;
+ _btnClose.Location = new System.Drawing.Point(477, 412);
+ _btnClose.Name = "_btnClose";
+ _btnClose.Size = new System.Drawing.Size(75, 27);
+ _btnClose.TabIndex = 1;
+ _btnClose.Text = "Close";
+ _btnClose.UseVisualStyleBackColor = true;
+ //
+ // TileDataHelpForm
+ //
+ AutoScaleDimensions = new System.Drawing.SizeF(7F, 15F);
+ AutoScaleMode = System.Windows.Forms.AutoScaleMode.Font;
+ CancelButton = _btnClose;
+ ClientSize = new System.Drawing.Size(560, 448);
+ Controls.Add(_splitContainer);
+ Controls.Add(_btnClose);
+ FormBorderStyle = System.Windows.Forms.FormBorderStyle.FixedDialog;
+ MaximizeBox = false;
+ MinimizeBox = false;
+ Name = "TileDataHelpForm";
+ Padding = new System.Windows.Forms.Padding(8);
+ ShowInTaskbar = false;
+ StartPosition = System.Windows.Forms.FormStartPosition.CenterParent;
+ Text = "TileData Field Reference";
+ _splitContainer.Panel1.ResumeLayout(false);
+ _splitContainer.Panel2.ResumeLayout(false);
+ ((System.ComponentModel.ISupportInitialize)_splitContainer).EndInit();
+ _splitContainer.ResumeLayout(false);
+ ResumeLayout(false);
+ }
+
+ #endregion
+
+ private System.Windows.Forms.SplitContainer _splitContainer;
+ private System.Windows.Forms.ListView _listView;
+ private System.Windows.Forms.ColumnHeader _columnField;
+ private System.Windows.Forms.RichTextBox _descriptionBox;
+ private System.Windows.Forms.Button _btnClose;
+ }
+}
diff --git a/UoFiddler.Controls/Forms/TileDataHelpForm.cs b/UoFiddler.Controls/Forms/TileDataHelpForm.cs
new file mode 100644
index 0000000..7683c4a
--- /dev/null
+++ b/UoFiddler.Controls/Forms/TileDataHelpForm.cs
@@ -0,0 +1,164 @@
+/***************************************************************************
+ *
+ * $Author: Turley
+ *
+ * "THE BEER-WARE LICENSE"
+ * As long as you retain this notice you can do whatever you want with
+ * this stuff. If we meet some day, and you think this stuff is worth it,
+ * you can buy me a beer in return.
+ *
+ ***************************************************************************/
+
+using System.Text;
+using System.Windows.Forms;
+
+namespace UoFiddler.Controls.Forms
+{
+ public partial class TileDataHelpForm : Form
+ {
+ public TileDataHelpForm()
+ {
+ InitializeComponent();
+ PopulateFields();
+ }
+
+ private void PopulateFields()
+ {
+ _listView.Groups.Add(new ListViewGroup("items", "Items"));
+ _listView.Groups.Add(new ListViewGroup("land", "Land Tiles"));
+ _listView.Groups.Add(new ListViewGroup("flags", "Flags"));
+
+ Add("Name", "This field is for the name of the item, which can be a maximum of 20 characters.", "items");
+ Add("Animation", "This field is for the animation ID associated with the item.", "items");
+ Add("Weight", "This field is for the weight of the item.", "items");
+ Add("Layer", new StringBuilder()
+ .AppendLine("This field is for the layer of the item:")
+ .AppendLine("")
+ .AppendLine("1 One handed weapon")
+ .AppendLine("2 Two handed weapon, shield, or misc.")
+ .AppendLine("3 Shoes")
+ .AppendLine("4 Pants")
+ .AppendLine("5 Shirt")
+ .AppendLine("6 Helm / Line")
+ .AppendLine("7 Gloves")
+ .AppendLine("8 Ring")
+ .AppendLine("9 Talisman")
+ .AppendLine("10 Neck")
+ .AppendLine("11 Hair")
+ .AppendLine("12 Waist (half apron)")
+ .AppendLine("13 Torso (inner) (chest armor)")
+ .AppendLine("14 Bracelet")
+ .AppendLine("15 Unused (but backpackers for backpackers go to 21)")
+ .AppendLine("16 Facial Hair")
+ .AppendLine("17 Torso (middle) (surcoat, tunic, full apron, sash)")
+ .AppendLine("18 Earrings")
+ .AppendLine("19 Arms")
+ .AppendLine("20 Back (cloak)")
+ .AppendLine("21 Backpack")
+ .AppendLine("22 Torso (outer) (robe)")
+ .AppendLine("23 Legs (outer) (skirt / kilt)")
+ .AppendLine("24 Legs (inner) (leg armor)")
+ .AppendLine("25 Mount (horse, ostard, etc)")
+ .AppendLine("26 NPC Buy Restock container")
+ .AppendLine("27 NPC Buy no restock container")
+ .Append("28 NPC Sell container")
+ .ToString(), "items");
+ Add("Quantity", "This field is for the quantity of the item.", "items");
+ Add("Value", "This field is for the value of the item.", "items");
+ Add("Stacking Offset", new StringBuilder()
+ .AppendLine("StackOff refers to the stacking offset in pixels when multiple items are stacked.")
+ .Append("A higher StackOff value means the items will appear further apart from each other within the stack.")
+ .ToString(), "items");
+ Add("Hue", "This field is for the hue (color) of the item.", "items");
+ Add("Unknown 2", "This field is for the second unknown value.", "items");
+ Add("Misc Data", "Old UO Demo weapon template definition", "items");
+ Add("Height", "This field is for the height of the item.", "items");
+ Add("Unknown 3", "This field is for the third unknown value.", "items");
+
+ Add("Name", "This field is for the name of the land tile, which can be a maximum of 20 characters.", "land");
+ Add("Texture ID", "This field is for the texture ID associated with the land tile.", "land");
+
+ Add("Background", "Not yet documented.", "flags");
+ Add("Weapon", "Not yet documented.", "flags");
+ Add("Transparent", "Not yet documented.", "flags");
+ Add("Translucent", "The tile is rendered with partial alpha-transparency.", "flags");
+ Add("Wall", "The tile is a wall.", "flags");
+ Add("Damaging", "The tile can cause damage when moved over.", "flags");
+ Add("Impassable", "The tile may not be moved over or through.", "flags");
+ Add("Wet", "Not yet documented.", "flags");
+ Add("Unknown1", "Unknown.", "flags");
+ Add("Surface", "The tile is a surface. It may be moved over, but not through.", "flags");
+ Add("Bridge", "The tile is a stair, ramp, or ladder.", "flags");
+ Add("Generic", "The tile is stackable.", "flags");
+ Add("Window", "The tile is a window. Like NoShoot, tiles with this flag block line of sight.", "flags");
+ Add("NoShoot", "The tile blocks line of sight.", "flags");
+ Add("ArticleA", "For single-amount tiles, the string \"a \" should be prepended to the tile name.", "flags");
+ Add("ArticleAn", "For single-amount tiles, the string \"an \" should be prepended to the tile name.", "flags");
+ Add("ArticleThe", "Probably article \"The\" prepended to the tile name.", "flags");
+ Add("Foliage", "The tile becomes translucent when walked behind. Boat masts also have this flag.", "flags");
+ Add("PartialHue", "Only gray pixels will be hued.", "flags");
+ Add("NoHouse", "NoHouse or Unknown. Needs further research.", "flags");
+ Add("Map", "The tile is a map in the cartography sense. Unknown usage.", "flags");
+ Add("Container", "The tile is a container.", "flags");
+ Add("Wearable", "The tile may be equipped.", "flags");
+ Add("LightSource", "The tile gives off light.", "flags");
+ Add("Animation", "The tile is animated.", "flags");
+ Add("HoverOver", "Gargoyles can fly over, or NoDiagonal.", "flags");
+ Add("NoDiagonal", "NoDiagonal (Unknown3).", "flags");
+ Add("Armor", "Not yet documented.", "flags");
+ Add("Roof", "The tile is a slanted roof.", "flags");
+ Add("Door", "The tile is a door. Tiles with this flag can be moved through by ghosts and GMs.", "flags");
+ Add("StairBack", "Not yet documented.", "flags");
+ Add("StairRight", "Not yet documented.", "flags");
+ Add("AlphaBlend", "Blend Alphas, tile blending.", "flags");
+ Add("UseNewArt", "Uses new art style? Something related to the nodraw tile?", "flags");
+ Add("ArtUsed", "Has art being used?", "flags");
+ Add("Unused8", "Unused or unknown yet.", "flags");
+ Add("NoShadow", "Disallow shadow on this tile, light source? lava?", "flags");
+ Add("PixelBleed", "Let pixels bleed in to other tiles? Is this Disabling Texture Clamp?", "flags");
+ Add("PlayAnimOnce", "Play tile animation once.", "flags");
+ Add("MultiMovable", "Movable multi? Cool ships and vehicles etc? Something related to the masts.", "flags");
+ Add("Unused10", "Unused or unknown yet.", "flags");
+ Add("Unused11", "Unused or unknown yet.", "flags");
+ Add("Unused12", "Unused or unknown yet.", "flags");
+ Add("Unused13", "Unused or unknown yet.", "flags");
+ Add("Unused14", "Unused or unknown yet.", "flags");
+ Add("Unused15", "Unused or unknown yet.", "flags");
+ Add("Unused16", "Unused or unknown yet.", "flags");
+ Add("Unused17", "Unused or unknown yet.", "flags");
+ Add("Unused18", "Unused or unknown yet.", "flags");
+ Add("Unused19", "Unused or unknown yet.", "flags");
+ Add("Unused20", "Unused or unknown yet.", "flags");
+ Add("Unused21", "Unused or unknown yet.", "flags");
+ Add("Unused22", "Unused or unknown yet.", "flags");
+ Add("Unused23", "Unused or unknown yet.", "flags");
+ Add("Unused24", "Unused or unknown yet.", "flags");
+ Add("Unused25", "Unused or unknown yet.", "flags");
+ Add("Unused26", "Unused or unknown yet.", "flags");
+ Add("Unused27", "Unused or unknown yet.", "flags");
+ Add("Unused28", "Unused or unknown yet.", "flags");
+ Add("Unused29", "Unused or unknown yet.", "flags");
+ Add("Unused30", "Unused or unknown yet.", "flags");
+ Add("Unused31", "Unused or unknown yet.", "flags");
+ Add("Unused32", "Unused or unknown yet.", "flags");
+
+ if (_listView.Items.Count > 0)
+ _listView.Items[0].Selected = true;
+ }
+
+ private void Add(string field, string description, string groupKey)
+ {
+ var group = _listView.Groups[groupKey];
+ var item = new ListViewItem(field, group) { Tag = description };
+ _listView.Items.Add(item);
+ }
+
+ private void OnSelectionChanged(object sender, System.EventArgs e)
+ {
+ if (_listView.SelectedItems.Count == 0)
+ return;
+
+ _descriptionBox.Text = _listView.SelectedItems[0].Tag as string ?? string.Empty;
+ }
+ }
+}
diff --git a/UoFiddler.Controls/Forms/TileDataHelpForm.resx b/UoFiddler.Controls/Forms/TileDataHelpForm.resx
new file mode 100644
index 0000000..4edf53f
--- /dev/null
+++ b/UoFiddler.Controls/Forms/TileDataHelpForm.resx
@@ -0,0 +1,120 @@
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+ text/microsoft-resx
+
+
+ 2.0
+
+
+ System.Resources.ResXResourceReader, System.Windows.Forms, Version=4.0.0.0, Culture=neutral, PublicKeyToken=b77a5c561934e089
+
+
+ System.Resources.ResXResourceWriter, System.Windows.Forms, Version=4.0.0.0, Culture=neutral, PublicKeyToken=b77a5c561934e089
+
+
\ No newline at end of file
diff --git a/UoFiddler.Controls/UserControls/AnimationListControl.cs b/UoFiddler.Controls/UserControls/AnimationListControl.cs
index 672ec2b..3a67635 100644
--- a/UoFiddler.Controls/UserControls/AnimationListControl.cs
+++ b/UoFiddler.Controls/UserControls/AnimationListControl.cs
@@ -388,6 +388,8 @@ private bool LoadXml()
return false;
}
+ var skipped = new List();
+
TreeViewMobs.BeginUpdate();
try
{
@@ -413,6 +415,12 @@ private bool LoadXml()
string name = xMob.GetAttribute("name");
int value = int.Parse(xMob.GetAttribute("body"));
int type = int.Parse(xMob.GetAttribute("type"));
+ if (type < 0 || type >= GetActionNames.Length)
+ {
+ skipped.Add($"Mob \"{name}\" (body=0x{value:X}) — invalid type {type}");
+ continue;
+ }
+
node = new TreeNode($"{name} (0x{value:X})")
{
Tag = new[] { value, type },
@@ -447,6 +455,12 @@ private bool LoadXml()
string name = xMob.GetAttribute("name");
int value = int.Parse(xMob.GetAttribute("body"));
int type = int.Parse(xMob.GetAttribute("type"));
+ if (type < 0 || type >= GetActionNames.Length)
+ {
+ skipped.Add($"Equip \"{name}\" (body=0x{value:X}) — invalid type {type}");
+ continue;
+ }
+
node = new TreeNode(name)
{
Tag = new[] { value, type },
@@ -476,6 +490,16 @@ private bool LoadXml()
TreeViewMobs.EndUpdate();
}
+ if (skipped.Count > 0)
+ {
+ string list = string.Join(Environment.NewLine, skipped);
+ MessageBox.Show(
+ $"The following entries were skipped due to an invalid type value (valid range: 0–{GetActionNames.Length - 1}):{Environment.NewLine}{Environment.NewLine}{list}{Environment.NewLine}{Environment.NewLine}File: {fileName}",
+ "Animationlist.xml — Skipped Entries",
+ MessageBoxButtons.OK,
+ MessageBoxIcon.Warning);
+ }
+
return true;
}
diff --git a/UoFiddler.Controls/UserControls/ClilocControl.cs b/UoFiddler.Controls/UserControls/ClilocControl.cs
index dbe19e4..c248a97 100644
--- a/UoFiddler.Controls/UserControls/ClilocControl.cs
+++ b/UoFiddler.Controls/UserControls/ClilocControl.cs
@@ -254,6 +254,68 @@ private void FindEntryClick(object sender, EventArgs e)
MessageBoxDefaultButton.Button1);
}
+ protected override bool ProcessCmdKey(ref Message msg, Keys keyData)
+ {
+ if (keyData == Keys.F3)
+ {
+ FindEntryClick(null, EventArgs.Empty);
+ return true;
+ }
+
+ if (keyData == (Keys.F3 | Keys.Shift))
+ {
+ FindPreviousEntry();
+ return true;
+ }
+
+ return base.ProcessCmdKey(ref msg, keyData);
+ }
+
+ private void FindPreviousEntry()
+ {
+ if (string.IsNullOrEmpty(FindEntry.Text) || FindEntry.Text == _searchTextPlaceholder)
+ {
+ MessageBox.Show("Please provide search text", "Find Entry", MessageBoxButtons.OK, MessageBoxIcon.Error,
+ MessageBoxDefaultButton.Button1);
+
+ return;
+ }
+
+ var searchMethod = SearchHelper.GetSearchMethod(RegexToolStripButton.Checked);
+
+ bool hasErrors = false;
+
+ int startRow = dataGridView1.Rows.GetFirstRow(DataGridViewElementStates.Selected) - 1;
+ if (startRow < 0)
+ {
+ startRow = dataGridView1.Rows.Count - 1;
+ }
+
+ for (int i = startRow; i >= 0; --i)
+ {
+ var searchResult = searchMethod(FindEntry.Text, dataGridView1.Rows[i].Cells[1].Value.ToString());
+ if (searchResult.HasErrors)
+ {
+ hasErrors = true;
+ break;
+ }
+
+ if (!searchResult.EntryFound)
+ {
+ continue;
+ }
+
+ dataGridView1.ClearSelection();
+ dataGridView1.Rows[i].Selected = true;
+ dataGridView1.FirstDisplayedScrollingRowIndex = i;
+ return;
+ }
+
+ MessageBox.Show(hasErrors ? "Invalid regular expression." : "Entry not found.", "Find Entry",
+ MessageBoxButtons.OK, MessageBoxIcon.Error,
+ MessageBoxDefaultButton.Button1);
+ }
+
private void OnClickSave(object sender, EventArgs e)
{
dataGridView1.CancelEdit();
diff --git a/UoFiddler.Controls/UserControls/DressControl.cs b/UoFiddler.Controls/UserControls/DressControl.cs
index 3467dda..3ce885c 100644
--- a/UoFiddler.Controls/UserControls/DressControl.cs
+++ b/UoFiddler.Controls/UserControls/DressControl.cs
@@ -1684,8 +1684,67 @@ private void SearchNodes(string searchText, TreeNode startNode)
}
}
+ protected override bool ProcessCmdKey(ref Message msg, Keys keyData)
+ {
+ if (keyData == Keys.F3)
+ {
+ SearchByName();
+ return true;
+ }
+
+ if (keyData == (Keys.F3 | Keys.Shift))
+ {
+ SearchByNamePrevious();
+ return true;
+ }
+
+ return base.ProcessCmdKey(ref msg, keyData);
+ }
+
+ private void SearchByNamePrevious()
+ {
+ var searchText = SearchItemTextBox.Text.Trim();
+
+ if (string.IsNullOrEmpty(searchText))
+ {
+ return;
+ }
+
+ if (_lastSearchText != searchText)
+ {
+ _searchResults.Clear();
+ _lastSearchText = searchText;
+ _lastNodeIndex = 0;
+ SearchNodes(searchText, treeViewItems.Nodes[0]);
+ }
+
+ if (_searchResults.Count == 0)
+ {
+ return;
+ }
+
+ if (_lastNodeIndex >= _searchResults.Count)
+ {
+ _lastNodeIndex = 0;
+ }
+
+ _lastNodeIndex -= 2;
+ if (_lastNodeIndex < 0)
+ {
+ _lastNodeIndex = _searchResults.Count + _lastNodeIndex;
+ }
+
+ treeViewItems.SelectedNode = _searchResults[_lastNodeIndex];
+ _lastNodeIndex++;
+ }
+
private void SearchItemTextBox_KeyUp(object sender, KeyEventArgs e)
{
+ if (e.KeyCode == Keys.F3)
+ {
+ return;
+ }
+
SearchByName();
}
diff --git a/UoFiddler.Controls/UserControls/GumpControl.Designer.cs b/UoFiddler.Controls/UserControls/GumpControl.Designer.cs
index ee240e2..7e45fd4 100644
--- a/UoFiddler.Controls/UserControls/GumpControl.Designer.cs
+++ b/UoFiddler.Controls/UserControls/GumpControl.Designer.cs
@@ -46,6 +46,7 @@ private void InitializeComponent()
contextMenuStrip = new System.Windows.Forms.ContextMenuStrip(components);
showFreeSlotsToolStripMenuItem = new System.Windows.Forms.ToolStripMenuItem();
findNextFreeSlotToolStripMenuItem = new System.Windows.Forms.ToolStripMenuItem();
+ changeBackgroundColorToolStripMenuItem = new System.Windows.Forms.ToolStripMenuItem();
toolStripSeparator2 = new System.Windows.Forms.ToolStripSeparator();
extractImageToolStripMenuItem = new System.Windows.Forms.ToolStripMenuItem();
asBmpToolStripMenuItem = new System.Windows.Forms.ToolStripMenuItem();
@@ -83,6 +84,7 @@ private void InitializeComponent()
saveToolStripButton = new System.Windows.Forms.ToolStripButton();
toolStripSeparator7 = new System.Windows.Forms.ToolStripSeparator();
pictureBox = new System.Windows.Forms.PictureBox();
+ colorDialog = new System.Windows.Forms.ColorDialog();
bottomMenuToolStrip = new System.Windows.Forms.ToolStrip();
IDLabel = new System.Windows.Forms.ToolStripLabel();
SizeLabel = new System.Windows.Forms.ToolStripLabel();
@@ -143,7 +145,7 @@ private void InitializeComponent()
//
// contextMenuStrip
//
- contextMenuStrip.Items.AddRange(new System.Windows.Forms.ToolStripItem[] { showFreeSlotsToolStripMenuItem, findNextFreeSlotToolStripMenuItem, toolStripSeparator2, extractImageToolStripMenuItem, toolStripSeparator6, jumpToMaleFemale, toolStripSeparator5, replaceGumpToolStripMenuItem, insertToolStripMenuItem, toolStripMenuItem1, removeToolStripMenuItem, toolStripSeparator1, saveToolStripMenuItem });
+ contextMenuStrip.Items.AddRange(new System.Windows.Forms.ToolStripItem[] { showFreeSlotsToolStripMenuItem, findNextFreeSlotToolStripMenuItem, changeBackgroundColorToolStripMenuItem, toolStripSeparator2, extractImageToolStripMenuItem, toolStripSeparator6, jumpToMaleFemale, toolStripSeparator5, replaceGumpToolStripMenuItem, insertToolStripMenuItem, toolStripMenuItem1, removeToolStripMenuItem, toolStripSeparator1, saveToolStripMenuItem });
contextMenuStrip.Name = "contextMenuStrip1";
contextMenuStrip.Size = new System.Drawing.Size(190, 226);
//
@@ -160,7 +162,14 @@ private void InitializeComponent()
findNextFreeSlotToolStripMenuItem.Size = new System.Drawing.Size(189, 22);
findNextFreeSlotToolStripMenuItem.Text = "Find Next Free Slot";
findNextFreeSlotToolStripMenuItem.Click += OnClickFindFree;
- //
+ //
+ // changeBackgroundColorToolStripMenuItem
+ //
+ changeBackgroundColorToolStripMenuItem.Name = "changeBackgroundColorToolStripMenuItem";
+ changeBackgroundColorToolStripMenuItem.Size = new System.Drawing.Size(189, 22);
+ changeBackgroundColorToolStripMenuItem.Text = "Change background color";
+ changeBackgroundColorToolStripMenuItem.Click += ChangeBackgroundColorToolStripMenuItem_Click;
+ //
// toolStripSeparator2
//
toolStripSeparator2.Name = "toolStripSeparator2";
@@ -555,5 +564,7 @@ private void InitializeComponent()
private System.Windows.Forms.ToolStripSeparator toolStripSeparator8;
private System.Windows.Forms.ToolStripSeparator toolStripSeparator9;
private System.Windows.Forms.ToolStripDropDownButton tagFilterDropDownButton;
+ private System.Windows.Forms.ToolStripMenuItem changeBackgroundColorToolStripMenuItem;
+ private System.Windows.Forms.ColorDialog colorDialog;
}
}
diff --git a/UoFiddler.Controls/UserControls/GumpControl.cs b/UoFiddler.Controls/UserControls/GumpControl.cs
index 5faea35..22c1e4f 100644
--- a/UoFiddler.Controls/UserControls/GumpControl.cs
+++ b/UoFiddler.Controls/UserControls/GumpControl.cs
@@ -40,6 +40,8 @@ public GumpControl()
ProgressBar.Visible = false;
_refMarker = this;
+
+ pictureBox.BackColor = Options.PreviewBackgroundColor;
}
private sealed record GumpEntry(string Name, string[] Tags);
@@ -118,6 +120,7 @@ protected override void OnLoad(EventArgs e)
{
ControlEvents.FilePathChangeEvent += OnFilePathChangeEvent;
ControlEvents.GumpChangeEvent += OnGumpChangeEvent;
+ ControlEvents.PreviewBackgroundColorChangeEvent += OnPreviewBackgroundColorChanged;
}
_loaded = true;
@@ -301,6 +304,11 @@ private void OnFilePathChangeEvent()
Reload();
}
+ private void OnPreviewBackgroundColorChanged()
+ {
+ pictureBox.BackColor = Options.PreviewBackgroundColor;
+ }
+
private void OnGumpChangeEvent(object sender, int index)
{
if (!_loaded)
@@ -355,6 +363,17 @@ private void OnGumpChangeEvent(object sender, int index)
}
}
+ private void ChangeBackgroundColorToolStripMenuItem_Click(object sender, EventArgs e)
+ {
+ if (colorDialog.ShowDialog() != DialogResult.OK)
+ {
+ return;
+ }
+
+ Options.PreviewBackgroundColor = colorDialog.Color;
+ ControlEvents.FirePreviewBackgroundColorChangeEvent();
+ }
+
private void ListBox_DrawItem(object sender, DrawItemEventArgs e)
{
if (e.Index < 0)
@@ -385,7 +404,6 @@ private void ListBox_DrawItem(object sender, DrawItemEventArgs e)
{
e.Graphics.FillRectangle(Brushes.LightCoral, e.Bounds.X, e.Bounds.Y, 105, e.Bounds.Height);
}
-
e.Graphics.DrawImage(bmp, new Rectangle(e.Bounds.X + 3, e.Bounds.Y + 3, width, height));
}
else
@@ -439,6 +457,7 @@ private void ListBox_SelectedIndexChanged(object sender, EventArgs e)
}
int i = int.Parse(listBox.Items[listBox.SelectedIndex].ToString());
+ pictureBox.BackColor = Options.PreviewBackgroundColor;
if (Gumps.IsValidIndex(i))
{
Bitmap bmp = Gumps.GetGump(i);
diff --git a/UoFiddler.Controls/UserControls/ItemsControl.cs b/UoFiddler.Controls/UserControls/ItemsControl.cs
index 60f6450..4abd084 100644
--- a/UoFiddler.Controls/UserControls/ItemsControl.cs
+++ b/UoFiddler.Controls/UserControls/ItemsControl.cs
@@ -71,15 +71,13 @@ public void UpdateTileView()
? Color.Transparent
: Color.Gray;
- if (Options.OverrideBackgroundColorFromTile)
- {
- ItemsTileView.BackColor = _backgroundColorItem;
- }
+ var sameBackColor = ItemsTileView.BackColor == Options.PreviewBackgroundColor;
+ ItemsTileView.BackColor = Options.PreviewBackgroundColor;
var sameTileSize = ItemsTileView.TileSize == newSize;
var sameFocusColor = ItemsTileView.TileFocusColor == Options.TileFocusColor;
var sameSelectionColor = ItemsTileView.TileHighlightColor == Options.TileSelectionColor;
- if (sameTileSize && sameFocusColor && sameSelectionColor)
+ if (sameTileSize && sameFocusColor && sameSelectionColor && sameBackColor)
{
return;
}
@@ -219,6 +217,7 @@ public void OnLoad(object sender, EventArgs e)
ControlEvents.FilePathChangeEvent += OnFilePathChangeEvent;
ControlEvents.ItemChangeEvent += OnItemChangeEvent;
ControlEvents.TileDataChangeEvent += OnTileDataChangeEvent;
+ ControlEvents.PreviewBackgroundColorChangeEvent += OnPreviewBackgroundColorChanged;
}
IsLoaded = true;
@@ -241,6 +240,16 @@ private void OnFilePathChangeEvent()
Reload();
}
+ private void OnPreviewBackgroundColorChanged()
+ {
+ ItemsTileView.BackColor = Options.PreviewBackgroundColor;
+ ItemsTileView.Invalidate();
+ if (_selectedGraphicId != -1)
+ {
+ UpdateDetail(_selectedGraphicId);
+ }
+ }
+
private void OnTileDataChangeEvent(object sender, int id)
{
if (!IsLoaded)
@@ -321,8 +330,6 @@ private void OnItemChangeEvent(object sender, int index)
ItemsTileView.Invalidate();
}
- private Color _backgroundColorItem = Color.White;
-
private void ChangeBackgroundColorToolStripMenuItem_Click(object sender, EventArgs e)
{
if (colorDialog.ShowDialog() != DialogResult.OK)
@@ -330,18 +337,10 @@ private void ChangeBackgroundColorToolStripMenuItem_Click(object sender, EventAr
return;
}
- _backgroundColorItem = colorDialog.Color;
-
- if (Options.OverrideBackgroundColorFromTile)
- {
- ItemsTileView.BackColor = _backgroundColorItem;
- }
-
- ItemsTileView.Invalidate();
+ Options.PreviewBackgroundColor = colorDialog.Color;
+ ControlEvents.FirePreviewBackgroundColorChangeEvent();
}
- private Color _backgroundDetailColor = Color.White;
-
private void UpdateDetail(int graphic)
{
if (IsAncestorSiteInDesignMode || FormsDesignerHelper.IsInDesignMode())
@@ -374,7 +373,7 @@ private void UpdateDetail(int graphic)
Bitmap newBit = new Bitmap(DetailPictureBox.Size.Width, DetailPictureBox.Size.Height);
using (Graphics newGraph = Graphics.FromImage(newBit))
{
- newGraph.Clear(_backgroundDetailColor);
+ newGraph.Clear(Options.PreviewBackgroundColor);
}
DetailPictureBox.Image?.Dispose();
@@ -388,7 +387,7 @@ private void UpdateDetail(int graphic)
Bitmap newBit = new Bitmap(DetailPictureBox.Size.Width, DetailPictureBox.Size.Height);
using (Graphics newGraph = Graphics.FromImage(newBit))
{
- newGraph.Clear(_backgroundDetailColor);
+ newGraph.Clear(Options.PreviewBackgroundColor);
newGraph.DrawImage(bit, (DetailPictureBox.Size.Width - bit.Width) / 2, 5);
}
@@ -432,11 +431,8 @@ private void ChangeBackgroundColorToolStripMenuItemDetail_Click(object sender, E
return;
}
- _backgroundDetailColor = colorDialog.Color;
- if (_selectedGraphicId != -1)
- {
- UpdateDetail(_selectedGraphicId);
- }
+ Options.PreviewBackgroundColor = colorDialog.Color;
+ ControlEvents.FirePreviewBackgroundColorChangeEvent();
}
private bool _scrolling;
@@ -894,7 +890,7 @@ private void ItemsTileView_DrawItem(object sender, TileViewControl.DrawTileListI
var selected = ItemsTileView.SelectedIndices.Contains(e.Index);
if (!selected)
{
- e.Graphics.Clear(_backgroundColorItem);
+ e.Graphics.Clear(Options.PreviewBackgroundColor);
}
var bitmap = Art.GetStatic(_itemList[e.Index], out bool patched);
@@ -1215,8 +1211,82 @@ private void SearchByIdToolStripTextBox_KeyUp(object sender, KeyEventArgs e)
SelectedGraphicId = indexValue;
}
+ protected override bool ProcessCmdKey(ref Message msg, Keys keyData)
+ {
+ if (keyData == Keys.F3 || keyData == (Keys.F3 | Keys.Shift))
+ {
+ if (searchByNameToolStripTextBox.TextBox.Focused)
+ {
+ return false;
+ }
+
+ if (!string.IsNullOrEmpty(searchByNameToolStripTextBox.Text))
+ {
+ if (keyData == Keys.F3)
+ {
+ SearchName(searchByNameToolStripTextBox.Text, true);
+ }
+ else
+ {
+ SearchNamePrevious(searchByNameToolStripTextBox.Text);
+ }
+ }
+ return true;
+ }
+
+ return base.ProcessCmdKey(ref msg, keyData);
+ }
+
+ public static bool SearchNamePrevious(string name)
+ {
+ var searchMethod = SearchHelper.GetSearchMethod();
+
+ int index = RefMarker._itemList.Count - 1;
+ if (RefMarker._selectedGraphicId >= 0)
+ {
+ index = RefMarker._itemList.IndexOf(RefMarker._selectedGraphicId) - 1;
+ if (index < 0)
+ {
+ index = RefMarker._itemList.Count - 1;
+ }
+ }
+
+ for (int i = index; i >= 0; --i)
+ {
+ var searchResult = searchMethod(name, TileData.ItemTable[RefMarker._itemList[i]].Name);
+ if (searchResult.HasErrors)
+ {
+ break;
+ }
+
+ if (!searchResult.EntryFound)
+ {
+ continue;
+ }
+
+ RefMarker.ItemsTileView.FocusIndex = -1;
+ RefMarker.SelectedGraphicId = RefMarker._itemList[i];
+ return true;
+ }
+
+ return false;
+ }
+
private void SearchByNameToolStripTextBox_KeyUp(object sender, KeyEventArgs e)
{
+ if (e.KeyCode == Keys.F3)
+ {
+ if (e.Shift)
+ {
+ SearchNamePrevious(searchByNameToolStripTextBox.Text);
+ }
+ else
+ {
+ SearchName(searchByNameToolStripTextBox.Text, true);
+ }
+ return;
+ }
+
SearchName(searchByNameToolStripTextBox.Text, false);
}
diff --git a/UoFiddler.Controls/UserControls/LandTilesControl.Designer.cs b/UoFiddler.Controls/UserControls/LandTilesControl.Designer.cs
index 02e67e6..67a01c4 100644
--- a/UoFiddler.Controls/UserControls/LandTilesControl.Designer.cs
+++ b/UoFiddler.Controls/UserControls/LandTilesControl.Designer.cs
@@ -47,6 +47,7 @@ private void InitializeComponent()
LandTilesContextMenuStrip = new System.Windows.Forms.ContextMenuStrip(components);
showFreeSlotsToolStripMenuItem = new System.Windows.Forms.ToolStripMenuItem();
findNextFreeSlotToolStripMenuItem = new System.Windows.Forms.ToolStripMenuItem();
+ changeBackgroundColorToolStripMenuItem = new System.Windows.Forms.ToolStripMenuItem();
toolStripSeparator6 = new System.Windows.Forms.ToolStripSeparator();
exportImageToolStripMenuItem = new System.Windows.Forms.ToolStripMenuItem();
asBmpToolStripMenuItem = new System.Windows.Forms.ToolStripMenuItem();
@@ -87,6 +88,7 @@ private void InitializeComponent()
FlagsLabel = new System.Windows.Forms.ToolStripStatusLabel();
panel = new System.Windows.Forms.Panel();
LandTilesTileView = new TileViewControl();
+ colorDialog = new System.Windows.Forms.ColorDialog();
LandTilesContextMenuStrip.SuspendLayout();
LandTilesToolStrip.SuspendLayout();
StatusStrip.SuspendLayout();
@@ -95,7 +97,7 @@ private void InitializeComponent()
//
// LandTilesContextMenuStrip
//
- LandTilesContextMenuStrip.Items.AddRange(new System.Windows.Forms.ToolStripItem[] { showFreeSlotsToolStripMenuItem, findNextFreeSlotToolStripMenuItem, toolStripSeparator6, exportImageToolStripMenuItem, toolStripSeparator3, selectInTileDataTabToolStripMenuItem, selectInRadarColorTabToolStripMenuItem, selectInTexturesTabToolStripMenuItem, toolStripSeparator2, replaceToolStripMenuItem, replaceStartingFromToolStripMenuItem, insertAtToolStripMenuItem, removeToolStripMenuItem, toolStripSeparator1, saveToolStripMenuItem });
+ LandTilesContextMenuStrip.Items.AddRange(new System.Windows.Forms.ToolStripItem[] { showFreeSlotsToolStripMenuItem, findNextFreeSlotToolStripMenuItem, changeBackgroundColorToolStripMenuItem, toolStripSeparator6, exportImageToolStripMenuItem, toolStripSeparator3, selectInTileDataTabToolStripMenuItem, selectInRadarColorTabToolStripMenuItem, selectInTexturesTabToolStripMenuItem, toolStripSeparator2, replaceToolStripMenuItem, replaceStartingFromToolStripMenuItem, insertAtToolStripMenuItem, removeToolStripMenuItem, toolStripSeparator1, saveToolStripMenuItem });
LandTilesContextMenuStrip.Name = "contextMenuStrip1";
LandTilesContextMenuStrip.Size = new System.Drawing.Size(201, 270);
LandTilesContextMenuStrip.Opening += LandTilesContextMenuStrip_Opening;
@@ -114,7 +116,14 @@ private void InitializeComponent()
findNextFreeSlotToolStripMenuItem.Size = new System.Drawing.Size(200, 22);
findNextFreeSlotToolStripMenuItem.Text = "Find Next Free Slot";
findNextFreeSlotToolStripMenuItem.Click += OnClickFindFree;
- //
+ //
+ // changeBackgroundColorToolStripMenuItem
+ //
+ changeBackgroundColorToolStripMenuItem.Name = "changeBackgroundColorToolStripMenuItem";
+ changeBackgroundColorToolStripMenuItem.Size = new System.Drawing.Size(200, 22);
+ changeBackgroundColorToolStripMenuItem.Text = "Change background color";
+ changeBackgroundColorToolStripMenuItem.Click += ChangeBackgroundColorToolStripMenuItem_Click;
+ //
// toolStripSeparator6
//
toolStripSeparator6.Name = "toolStripSeparator6";
@@ -483,5 +492,7 @@ private void InitializeComponent()
private System.Windows.Forms.ToolStripSeparator toolStripSeparator5;
private System.Windows.Forms.Panel panel;
private TileViewControl LandTilesTileView;
+ private System.Windows.Forms.ToolStripMenuItem changeBackgroundColorToolStripMenuItem;
+ private System.Windows.Forms.ColorDialog colorDialog;
}
}
diff --git a/UoFiddler.Controls/UserControls/LandTilesControl.cs b/UoFiddler.Controls/UserControls/LandTilesControl.cs
index 4c49278..9616c60 100644
--- a/UoFiddler.Controls/UserControls/LandTilesControl.cs
+++ b/UoFiddler.Controls/UserControls/LandTilesControl.cs
@@ -170,6 +170,7 @@ private void OnLoad(object sender, EventArgs e)
ControlEvents.FilePathChangeEvent += OnFilePathChangeEvent;
ControlEvents.LandTileChangeEvent += OnLandTileChangeEvent;
ControlEvents.TileDataChangeEvent += OnTileDataChangeEvent;
+ ControlEvents.PreviewBackgroundColorChangeEvent += OnPreviewBackgroundColorChanged;
}
IsLoaded = true;
@@ -181,6 +182,12 @@ private void OnFilePathChangeEvent()
Reload();
}
+ private void OnPreviewBackgroundColorChanged()
+ {
+ LandTilesTileView.BackColor = Options.PreviewBackgroundColor;
+ LandTilesTileView.Invalidate();
+ }
+
private void UpdateToolStripLabels(int graphic)
{
if (!IsLoaded)
@@ -659,6 +666,17 @@ private void ExportAllLandTiles(ImageFormat imageFormat)
}
}
+ private void ChangeBackgroundColorToolStripMenuItem_Click(object sender, EventArgs e)
+ {
+ if (colorDialog.ShowDialog() != DialogResult.OK)
+ {
+ return;
+ }
+
+ Options.PreviewBackgroundColor = colorDialog.Color;
+ ControlEvents.FirePreviewBackgroundColorChangeEvent();
+ }
+
private void LandTilesTileView_DrawItem(object sender, TileView.TileViewControl.DrawTileListItemEventArgs e)
{
if (IsAncestorSiteInDesignMode || FormsDesignerHelper.IsInDesignMode())
@@ -675,6 +693,12 @@ private void LandTilesTileView_DrawItem(object sender, TileView.TileViewControl.
e.Graphics.Clip = new Region(itemRec);
+ var selected = LandTilesTileView.SelectedIndices.Contains(e.Index);
+ if (!selected)
+ {
+ e.Graphics.Clear(Options.PreviewBackgroundColor);
+ }
+
Bitmap bitmap = Art.GetLand(_tileList[e.Index], out bool patched);
if (bitmap == null)
@@ -824,6 +848,8 @@ public void UpdateTileView()
? Color.Transparent
: Color.Gray;
+ LandTilesTileView.BackColor = Options.PreviewBackgroundColor;
+
var sameFocusColor = LandTilesTileView.TileFocusColor == Options.TileFocusColor;
var sameSelectionColor = LandTilesTileView.TileHighlightColor == Options.TileSelectionColor;
if (sameFocusColor && sameSelectionColor)
@@ -898,8 +924,82 @@ private void SearchByIdToolStripTextBox_KeyUp(object sender, KeyEventArgs e)
SelectedGraphicId = indexValue;
}
+ protected override bool ProcessCmdKey(ref Message msg, Keys keyData)
+ {
+ if (keyData == Keys.F3 || keyData == (Keys.F3 | Keys.Shift))
+ {
+ if (searchByNameToolStripTextBox.TextBox.Focused)
+ {
+ return false;
+ }
+
+ if (!string.IsNullOrEmpty(searchByNameToolStripTextBox.Text))
+ {
+ if (keyData == Keys.F3)
+ {
+ SearchName(searchByNameToolStripTextBox.Text, true);
+ }
+ else
+ {
+ SearchNamePrevious(searchByNameToolStripTextBox.Text);
+ }
+ }
+ return true;
+ }
+
+ return base.ProcessCmdKey(ref msg, keyData);
+ }
+
+ public static bool SearchNamePrevious(string name)
+ {
+ var searchMethod = SearchHelper.GetSearchMethod();
+
+ int index = _refMarker._tileList.Count - 1;
+ if (_refMarker._selectedGraphicId >= 0)
+ {
+ index = _refMarker._tileList.IndexOf(_refMarker._selectedGraphicId) - 1;
+ if (index < 0)
+ {
+ index = _refMarker._tileList.Count - 1;
+ }
+ }
+
+ for (int i = index; i >= 0; --i)
+ {
+ var searchResult = searchMethod(name, TileData.LandTable[_refMarker._tileList[i]].Name);
+ if (searchResult.HasErrors)
+ {
+ break;
+ }
+
+ if (!searchResult.EntryFound)
+ {
+ continue;
+ }
+
+ _refMarker.LandTilesTileView.FocusIndex = -1;
+ _refMarker.SelectedGraphicId = _refMarker._tileList[i];
+ return true;
+ }
+
+ return false;
+ }
+
private void SearchByNameToolStripTextBox_KeyUp(object sender, KeyEventArgs e)
{
+ if (e.KeyCode == Keys.F3)
+ {
+ if (e.Shift)
+ {
+ SearchNamePrevious(searchByNameToolStripTextBox.Text);
+ }
+ else
+ {
+ SearchName(searchByNameToolStripTextBox.Text, true);
+ }
+ return;
+ }
+
SearchName(searchByNameToolStripTextBox.Text, false);
}
diff --git a/UoFiddler.Controls/UserControls/MultisControl.cs b/UoFiddler.Controls/UserControls/MultisControl.cs
index 875dafc..fbe14c9 100644
--- a/UoFiddler.Controls/UserControls/MultisControl.cs
+++ b/UoFiddler.Controls/UserControls/MultisControl.cs
@@ -48,7 +48,6 @@ public MultisControl()
private bool _loaded;
private bool _showFreeSlots;
private readonly MultisControl _refMarker;
- private Color _backgroundImageColor = Color.White;
private bool _useTransparencyForPng = true;
///
@@ -138,6 +137,7 @@ private void OnLoad(object sender, EventArgs e)
{
ControlEvents.FilePathChangeEvent += OnFilePathChangeEvent;
ControlEvents.MultiChangeEvent += OnMultiChangeEvent;
+ ControlEvents.PreviewBackgroundColorChangeEvent += OnPreviewBackgroundColorChanged;
}
_loaded = true;
@@ -149,6 +149,11 @@ private void OnFilePathChangeEvent()
Reload();
}
+ private void OnPreviewBackgroundColorChanged()
+ {
+ MultiPictureBox.BackColor = Options.PreviewBackgroundColor;
+ }
+
private void OnMultiChangeEvent(object sender, int id)
{
if (!_loaded)
@@ -346,22 +351,22 @@ private void ChangeComponentList(MultiComponentList multi)
private void Extract_Image_ClickBmp(object sender, EventArgs e)
{
- ExtractMultiImage(ImageFormat.Bmp, _backgroundImageColor);
+ ExtractMultiImage(ImageFormat.Bmp, Options.PreviewBackgroundColor);
}
private void Extract_Image_ClickTiff(object sender, EventArgs e)
{
- ExtractMultiImage(ImageFormat.Tiff, _backgroundImageColor);
+ ExtractMultiImage(ImageFormat.Tiff, Options.PreviewBackgroundColor);
}
private void Extract_Image_ClickJpg(object sender, EventArgs e)
{
- ExtractMultiImage(ImageFormat.Jpeg, _backgroundImageColor);
+ ExtractMultiImage(ImageFormat.Jpeg, Options.PreviewBackgroundColor);
}
private void Extract_Image_ClickPng(object sender, EventArgs e)
{
- ExtractMultiImage(ImageFormat.Png, _useTransparencyForPng ? Color.Transparent : _backgroundImageColor);
+ ExtractMultiImage(ImageFormat.Png, _useTransparencyForPng ? Color.Transparent : Options.PreviewBackgroundColor);
}
private void ExtractMultiImage(ImageFormat imageFormat, Color backgroundColor)
@@ -593,22 +598,22 @@ private void OnClickImport(object sender, EventArgs e)
private void OnClick_SaveAllBmp(object sender, EventArgs e)
{
- ExportAllMultis(ImageFormat.Bmp, _backgroundImageColor);
+ ExportAllMultis(ImageFormat.Bmp, Options.PreviewBackgroundColor);
}
private void OnClick_SaveAllTiff(object sender, EventArgs e)
{
- ExportAllMultis(ImageFormat.Tiff, _backgroundImageColor);
+ ExportAllMultis(ImageFormat.Tiff, Options.PreviewBackgroundColor);
}
private void OnClick_SaveAllJpg(object sender, EventArgs e)
{
- ExportAllMultis(ImageFormat.Jpeg, _backgroundImageColor);
+ ExportAllMultis(ImageFormat.Jpeg, Options.PreviewBackgroundColor);
}
private void OnClick_SaveAllPng(object sender, EventArgs e)
{
- ExportAllMultis(ImageFormat.Png, _useTransparencyForPng ? Color.Transparent : _backgroundImageColor);
+ ExportAllMultis(ImageFormat.Png, _useTransparencyForPng ? Color.Transparent : Options.PreviewBackgroundColor);
}
private void ExportAllMultis(ImageFormat imageFormat, Color backgroundColor)
@@ -865,8 +870,8 @@ private void ChangeBackgroundColorToolStripMenuItem_Click(object sender, EventAr
return;
}
- _backgroundImageColor = colorDialog.Color;
- MultiPictureBox.BackColor = _backgroundImageColor;
+ Options.PreviewBackgroundColor = colorDialog.Color;
+ ControlEvents.FirePreviewBackgroundColorChangeEvent();
}
private void UseTransparencyForPNGToolStripMenuItem_CheckedChanged(object sender, EventArgs e)
diff --git a/UoFiddler.Controls/UserControls/MultisControl.resx b/UoFiddler.Controls/UserControls/MultisControl.resx
index 32ae015..49fba34 100644
--- a/UoFiddler.Controls/UserControls/MultisControl.resx
+++ b/UoFiddler.Controls/UserControls/MultisControl.resx
@@ -1,7 +1,7 @@
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+ text/microsoft-resx
+
+
+ 2.0
+
+
+ System.Resources.ResXResourceReader, System.Windows.Forms, Version=4.0.0.0, Culture=neutral, PublicKeyToken=b77a5c561934e089
+
+
+ System.Resources.ResXResourceWriter, System.Windows.Forms, Version=4.0.0.0, Culture=neutral, PublicKeyToken=b77a5c561934e089
+
+
\ No newline at end of file
diff --git a/UoFiddler.Plugin.MultiEditor/UoFiddler.Plugin.MultiEditor.csproj b/UoFiddler.Plugin.MultiEditor/UoFiddler.Plugin.MultiEditor.csproj
index 7a83079..4cfa059 100644
--- a/UoFiddler.Plugin.MultiEditor/UoFiddler.Plugin.MultiEditor.csproj
+++ b/UoFiddler.Plugin.MultiEditor/UoFiddler.Plugin.MultiEditor.csproj
@@ -25,6 +25,12 @@
Off
+
+ Form
+
+
+ ShortcutsHelpForm.cs
+
UserControl
@@ -48,6 +54,9 @@
+
+ ShortcutsHelpForm.cs
+
MultiEditorControl.cs
diff --git a/UoFiddler.Plugin.MultiEditor/UserControls/MultiEditorControl.Designer.cs b/UoFiddler.Plugin.MultiEditor/UserControls/MultiEditorControl.Designer.cs
index 801fc61..487334a 100644
--- a/UoFiddler.Plugin.MultiEditor/UserControls/MultiEditorControl.Designer.cs
+++ b/UoFiddler.Plugin.MultiEditor/UserControls/MultiEditorControl.Designer.cs
@@ -70,6 +70,7 @@ private void InitializeComponent()
BTN_Save = new System.Windows.Forms.Button();
splitContainer1 = new System.Windows.Forms.SplitContainer();
splitContainer3 = new System.Windows.Forms.SplitContainer();
+ brushSizeLabel = new System.Windows.Forms.Label();
BTN_RectFill = new System.Windows.Forms.CheckBox();
imageListTools = new System.Windows.Forms.ImageList(components);
BTN_LineDraw = new System.Windows.Forms.CheckBox();
@@ -111,9 +112,10 @@ private void InitializeComponent()
SelectedTileLabel = new System.Windows.Forms.ToolStripLabel();
toolStripLabelCoord = new System.Windows.Forms.ToolStripLabel();
toolStripBtnZoom = new System.Windows.Forms.ToolStripButton();
+ toolStripSeparatorHelp = new System.Windows.Forms.ToolStripSeparator();
+ toolStripBtnHelp = new System.Windows.Forms.ToolStripButton();
toolTip1 = new System.Windows.Forms.ToolTip(components);
FloatingPreviewPanel = new System.Windows.Forms.Panel();
- brushSizeLabel = new System.Windows.Forms.Label();
TC_MultiEditorToolbox.SuspendLayout();
tileTab.SuspendLayout();
((System.ComponentModel.ISupportInitialize)splitContainer4).BeginInit();
@@ -540,6 +542,15 @@ private void InitializeComponent()
splitContainer3.SplitterWidth = 2;
splitContainer3.TabIndex = 1;
//
+ // brushSizeLabel
+ //
+ brushSizeLabel.AutoSize = true;
+ brushSizeLabel.Location = new System.Drawing.Point(68, 62);
+ brushSizeLabel.Name = "brushSizeLabel";
+ brushSizeLabel.Size = new System.Drawing.Size(62, 15);
+ brushSizeLabel.TabIndex = 22;
+ brushSizeLabel.Text = "Brush size:";
+ //
// BTN_RectFill
//
BTN_RectFill.Appearance = System.Windows.Forms.Appearance.Button;
@@ -551,7 +562,7 @@ private void InitializeComponent()
BTN_RectFill.Name = "BTN_RectFill";
BTN_RectFill.Size = new System.Drawing.Size(24, 24);
BTN_RectFill.TabIndex = 17;
- toolTip1.SetToolTip(BTN_RectFill, "Rectangle Fill");
+ toolTip1.SetToolTip(BTN_RectFill, "Rectangle Fill [B]");
BTN_RectFill.UseVisualStyleBackColor = true;
BTN_RectFill.CheckStateChanged += BTN_Toolbox_CheckedChanged;
BTN_RectFill.Click += BTN_RectFill_Click;
@@ -591,7 +602,7 @@ private void InitializeComponent()
BTN_LineDraw.Name = "BTN_LineDraw";
BTN_LineDraw.Size = new System.Drawing.Size(24, 24);
BTN_LineDraw.TabIndex = 18;
- toolTip1.SetToolTip(BTN_LineDraw, "Line Draw");
+ toolTip1.SetToolTip(BTN_LineDraw, "Line Draw [L]");
BTN_LineDraw.UseVisualStyleBackColor = true;
BTN_LineDraw.CheckStateChanged += BTN_Toolbox_CheckedChanged;
BTN_LineDraw.Click += BTN_LineDraw_Click;
@@ -651,7 +662,7 @@ private void InitializeComponent()
BTN_Trans.Name = "BTN_Trans";
BTN_Trans.Size = new System.Drawing.Size(24, 24);
BTN_Trans.TabIndex = 15;
- toolTip1.SetToolTip(BTN_Trans, "Switch Transparent");
+ toolTip1.SetToolTip(BTN_Trans, "Switch Transparent [T]");
BTN_Trans.UseVisualStyleBackColor = true;
BTN_Trans.CheckStateChanged += BTN_Toolbox_CheckedChanged;
BTN_Trans.Click += BTN_Trans_Clicked;
@@ -667,7 +678,7 @@ private void InitializeComponent()
BTN_Pipette.Name = "BTN_Pipette";
BTN_Pipette.Size = new System.Drawing.Size(24, 24);
BTN_Pipette.TabIndex = 14;
- toolTip1.SetToolTip(BTN_Pipette, "Pick A Tile");
+ toolTip1.SetToolTip(BTN_Pipette, "Pick A Tile [P]");
BTN_Pipette.UseVisualStyleBackColor = true;
BTN_Pipette.CheckStateChanged += BTN_Toolbox_CheckedChanged;
BTN_Pipette.Click += BTN_Pipette_Click;
@@ -683,7 +694,7 @@ private void InitializeComponent()
BTN_Floor.Name = "BTN_Floor";
BTN_Floor.Size = new System.Drawing.Size(24, 24);
BTN_Floor.TabIndex = 13;
- toolTip1.SetToolTip(BTN_Floor, "Draw Virtual Floor");
+ toolTip1.SetToolTip(BTN_Floor, "Draw Virtual Floor [F]");
BTN_Floor.UseVisualStyleBackColor = true;
BTN_Floor.CheckStateChanged += BTN_Toolbox_CheckedChanged;
BTN_Floor.Click += BTN_Floor_Clicked;
@@ -699,7 +710,7 @@ private void InitializeComponent()
BTN_Z.Name = "BTN_Z";
BTN_Z.Size = new System.Drawing.Size(24, 24);
BTN_Z.TabIndex = 12;
- toolTip1.SetToolTip(BTN_Z, "Apply Z Level");
+ toolTip1.SetToolTip(BTN_Z, "Apply Z Level [E]");
BTN_Z.UseVisualStyleBackColor = true;
BTN_Z.CheckStateChanged += BTN_Toolbox_CheckedChanged;
BTN_Z.Click += BTN_Z_Click;
@@ -715,7 +726,7 @@ private void InitializeComponent()
BTN_Remove.Name = "BTN_Remove";
BTN_Remove.Size = new System.Drawing.Size(24, 24);
BTN_Remove.TabIndex = 11;
- toolTip1.SetToolTip(BTN_Remove, "Remove A Tile");
+ toolTip1.SetToolTip(BTN_Remove, "Remove A Tile [R]");
BTN_Remove.UseVisualStyleBackColor = true;
BTN_Remove.CheckStateChanged += BTN_Toolbox_CheckedChanged;
BTN_Remove.Click += BTN_Remove_Click;
@@ -731,7 +742,7 @@ private void InitializeComponent()
BTN_Draw.Name = "BTN_Draw";
BTN_Draw.Size = new System.Drawing.Size(24, 24);
BTN_Draw.TabIndex = 10;
- toolTip1.SetToolTip(BTN_Draw, "Draw A Tile");
+ toolTip1.SetToolTip(BTN_Draw, "Draw A Tile [D]");
BTN_Draw.UseVisualStyleBackColor = true;
BTN_Draw.CheckStateChanged += BTN_Toolbox_CheckedChanged;
BTN_Draw.Click += BTN_Draw_Click;
@@ -749,7 +760,7 @@ private void InitializeComponent()
BTN_Select.Name = "BTN_Select";
BTN_Select.Size = new System.Drawing.Size(24, 24);
BTN_Select.TabIndex = 9;
- toolTip1.SetToolTip(BTN_Select, "Select A Tile");
+ toolTip1.SetToolTip(BTN_Select, "Select A Tile [S]");
BTN_Select.UseVisualStyleBackColor = true;
BTN_Select.CheckStateChanged += BTN_Toolbox_CheckedChanged;
BTN_Select.Click += BTN_Select_Click;
@@ -910,7 +921,7 @@ private void InitializeComponent()
pictureBoxMinimap.Anchor = System.Windows.Forms.AnchorStyles.Bottom | System.Windows.Forms.AnchorStyles.Right;
pictureBoxMinimap.BackColor = System.Drawing.Color.DimGray;
pictureBoxMinimap.BorderStyle = System.Windows.Forms.BorderStyle.FixedSingle;
- pictureBoxMinimap.Location = new System.Drawing.Point(342, 280);
+ pictureBoxMinimap.Location = new System.Drawing.Point(342, 277);
pictureBoxMinimap.Name = "pictureBoxMinimap";
pictureBoxMinimap.Size = new System.Drawing.Size(155, 100);
pictureBoxMinimap.TabIndex = 10;
@@ -957,7 +968,7 @@ private void InitializeComponent()
//
toolStrip1.Dock = System.Windows.Forms.DockStyle.Bottom;
toolStrip1.GripStyle = System.Windows.Forms.ToolStripGripStyle.Hidden;
- toolStrip1.Items.AddRange(new System.Windows.Forms.ToolStripItem[] { toolStripDropDownButton1, toolStripSeparator2, DrawTileLabel, toolStripSeparator1, SelectedTileLabel, toolStripLabelCoord, toolStripBtnZoom });
+ toolStrip1.Items.AddRange(new System.Windows.Forms.ToolStripItem[] { toolStripDropDownButton1, toolStripSeparator2, DrawTileLabel, toolStripSeparator1, SelectedTileLabel, toolStripLabelCoord, toolStripBtnZoom, toolStripSeparatorHelp, toolStripBtnHelp });
toolStrip1.Location = new System.Drawing.Point(0, 455);
toolStrip1.Name = "toolStrip1";
toolStrip1.RenderMode = System.Windows.Forms.ToolStripRenderMode.System;
@@ -1046,6 +1057,22 @@ private void InitializeComponent()
toolStripBtnZoom.ToolTipText = "Zoom — click or Ctrl+0 to reset to 100%";
toolStripBtnZoom.Click += ToolStripBtnZoom_Click;
//
+ // toolStripSeparatorHelp
+ //
+ toolStripSeparatorHelp.Alignment = System.Windows.Forms.ToolStripItemAlignment.Right;
+ toolStripSeparatorHelp.Name = "toolStripSeparatorHelp";
+ toolStripSeparatorHelp.Size = new System.Drawing.Size(6, 25);
+ //
+ // toolStripBtnHelp
+ //
+ toolStripBtnHelp.Alignment = System.Windows.Forms.ToolStripItemAlignment.Right;
+ toolStripBtnHelp.DisplayStyle = System.Windows.Forms.ToolStripItemDisplayStyle.Image;
+ toolStripBtnHelp.Image = (System.Drawing.Image)resources.GetObject("toolStripBtnHelp.Image");
+ toolStripBtnHelp.Name = "toolStripBtnHelp";
+ toolStripBtnHelp.Size = new System.Drawing.Size(23, 22);
+ toolStripBtnHelp.ToolTipText = "Keyboard Shortcuts";
+ toolStripBtnHelp.Click += ToolStripBtnHelp_Click;
+ //
// FloatingPreviewPanel
//
FloatingPreviewPanel.BackgroundImageLayout = System.Windows.Forms.ImageLayout.Center;
@@ -1056,15 +1083,6 @@ private void InitializeComponent()
FloatingPreviewPanel.Size = new System.Drawing.Size(233, 115);
FloatingPreviewPanel.TabIndex = 4;
//
- // brushSizeLabel
- //
- brushSizeLabel.AutoSize = true;
- brushSizeLabel.Location = new System.Drawing.Point(68, 62);
- brushSizeLabel.Name = "brushSizeLabel";
- brushSizeLabel.Size = new System.Drawing.Size(62, 15);
- brushSizeLabel.TabIndex = 22;
- brushSizeLabel.Text = "Brush size:";
- //
// MultiEditorControl
//
AutoScaleDimensions = new System.Drawing.SizeF(7F, 15F);
@@ -1200,5 +1218,7 @@ private void InitializeComponent()
private System.Windows.Forms.Button BTN_Export_UOX3;
private System.Windows.Forms.Button BTN_Export_XML;
private System.Windows.Forms.Label brushSizeLabel;
+ private System.Windows.Forms.ToolStripSeparator toolStripSeparatorHelp;
+ private System.Windows.Forms.ToolStripButton toolStripBtnHelp;
}
}
diff --git a/UoFiddler.Plugin.MultiEditor/UserControls/MultiEditorControl.cs b/UoFiddler.Plugin.MultiEditor/UserControls/MultiEditorControl.cs
index 1fee56b..d41f44a 100644
--- a/UoFiddler.Plugin.MultiEditor/UserControls/MultiEditorControl.cs
+++ b/UoFiddler.Plugin.MultiEditor/UserControls/MultiEditorControl.cs
@@ -19,6 +19,7 @@
using Ultima;
using UoFiddler.Controls.Classes;
using UoFiddler.Plugin.MultiEditor.Classes;
+using UoFiddler.Plugin.MultiEditor.Forms;
namespace UoFiddler.Plugin.MultiEditor.UserControls
{
@@ -2196,6 +2197,19 @@ protected override bool ProcessCmdKey(ref Message msg, Keys keyData)
SetZoom(1.0f);
return true;
}
+
+ if (ActiveControl is not TextBox && ActiveControl is not NumericUpDown)
+ {
+ if (keyData == Keys.S) { BTN_Select_Click(null, EventArgs.Empty); return true; }
+ if (keyData == Keys.D) { BTN_Draw_Click(null, EventArgs.Empty); return true; }
+ if (keyData == Keys.R) { BTN_Remove_Click(null, EventArgs.Empty); return true; }
+ if (keyData == Keys.E) { BTN_Z_Click(null, EventArgs.Empty); return true; }
+ if (keyData == Keys.F) { BTN_Floor.Checked = !BTN_Floor.Checked; return true; }
+ if (keyData == Keys.P) { BTN_Pipette_Click(null, EventArgs.Empty); return true; }
+ if (keyData == Keys.T) { BTN_Trans_Clicked(null, EventArgs.Empty); return true; }
+ if (keyData == Keys.B) { BTN_RectFill_Click(null, EventArgs.Empty); return true; }
+ if (keyData == Keys.L) { BTN_LineDraw_Click(null, EventArgs.Empty); return true; }
+ }
}
return base.ProcessCmdKey(ref msg, keyData);
@@ -2230,6 +2244,12 @@ private void ToolStripBtnZoom_Click(object sender, EventArgs e)
SetZoom(1.0f);
}
+ private void ToolStripBtnHelp_Click(object sender, EventArgs e)
+ {
+ using var form = new ShortcutsHelpForm();
+ form.ShowDialog(this);
+ }
+
private void UpdateTrackBarAfterZChange()
{
MaxHeightTrackBar.Minimum = _compList.ZMin;
diff --git a/UoFiddler.Plugin.MultiEditor/UserControls/MultiEditorControl.resx b/UoFiddler.Plugin.MultiEditor/UserControls/MultiEditorControl.resx
index b8143ae..3cb5013 100644
--- a/UoFiddler.Plugin.MultiEditor/UserControls/MultiEditorControl.resx
+++ b/UoFiddler.Plugin.MultiEditor/UserControls/MultiEditorControl.resx
@@ -131,7 +131,7 @@
AAEAAAD/////AQAAAAAAAAAMAgAAAEZTeXN0ZW0uV2luZG93cy5Gb3JtcywgQ3VsdHVyZT1uZXV0cmFs
LCBQdWJsaWNLZXlUb2tlbj1iNzdhNWM1NjE5MzRlMDg5BQEAAAAmU3lzdGVtLldpbmRvd3MuRm9ybXMu
SW1hZ2VMaXN0U3RyZWFtZXIBAAAABERhdGEHAgIAAAAJAwAAAA8DAAAARKoAAAJNU0Z0AUkBTAIBARIB
- AAEMAQEBDAEBARIBAAESAQAE/wEhAQAI/wFCAU0BNgcAATYDAAEoAwABSAMAAVoDAAEBAQABIAUAAUAB
+ AAEkAQEBJAEBARIBAAESAQAE/wEhAQAI/wFCAU0BNgcAATYDAAEoAwABSAMAAVoDAAEBAQABIAUAAUAB
ZRIAAcgB0AHUAf8ByAHQAdQB/wHIAdAB1AH/AcgB0AHUAf8ByAHQAdQB/wHIAdAB1AH/AcgB0AHUAf8B
yAHQAdQB/wHIAdAB1AH/AcgB0AHUAf8ByAHQAdQB/wHIAdAB1AH/AckB0AHUAf8BywHTAdYB/wHLAdMB
1gH/AcoB0gHWAf8BxwHPAdQB/wHIAdAB1AH/ATkBOwE8Af8BOQE7ATwB/wE5ATsBPAH/ATkBOwE8Af8B
@@ -860,9 +860,24 @@
BBYAA///AP8A/wD/AD0ACw==
+
+ 261, 17
+
162, 17
+
+
+
+ iVBORw0KGgoAAAANSUhEUgAAABAAAAAQCAYAAAAf8/9hAAAAAXNSR0IArs4c6QAAAARnQU1BAACxjwv8
+ YQUAAAAJcEhZcwAACxIAAAsSAdLdfvwAAAEPSURBVDhPxZK7SgNBFEC3MNporOx8oHVKm6D5GlGxEvwU
+ EWJl56NOEYKNH2CRH9BEUL9ABK2Sc2YybLK7io3kwGHuLDuz97HZf9DCO3zHb3zDW9zDX1nANj7jIa5j
+ bbIe4QAv0Pcq8XAXl8OujM976CUlTPsJ0+FFvMJP7GMDZQWHWCrHmk07cYodXMUDfMTEMd7EMMeGWWti
+ F7djmK3hRwwDm2hjZ7Dbpl1kBx/wMuwiS/gVwxwz2IjhDC94htOd38LXGOY4Z0f1F07wOoY5++j87fI0
+ o8maqKNZNcOugPN1zsVLEh6+x/Owq8A6vcQ5Oyp7YmPtumn7ZQ//+Ccm/Emcs41yOq7WXJn2vMmyMZYp
+ L1AlAbCnAAAAAElFTkSuQmCC
+
+
52
diff --git a/UoFiddler.Plugin.MultiEditor/images/Help-Icon-16.png b/UoFiddler.Plugin.MultiEditor/images/Help-Icon-16.png
new file mode 100644
index 0000000..6efed7e
Binary files /dev/null and b/UoFiddler.Plugin.MultiEditor/images/Help-Icon-16.png differ
diff --git a/UoFiddler/Classes/FiddlerOptions.cs b/UoFiddler/Classes/FiddlerOptions.cs
index d457ad9..0854e2e 100644
--- a/UoFiddler/Classes/FiddlerOptions.cs
+++ b/UoFiddler/Classes/FiddlerOptions.cs
@@ -152,17 +152,17 @@ public static void SaveProfile()
elem.SetAttribute("value", ColorTranslator.ToHtml(Options.TileSelectionColor));
sr.AppendChild(elem);
- comment = dom.CreateComment("Use tile background color as tile view background color");
- sr.AppendChild(comment);
- elem = dom.CreateElement("OverrideBackgroundColorFromTile");
- elem.SetAttribute("active", Options.OverrideBackgroundColorFromTile.ToString());
- sr.AppendChild(elem);
-
comment = dom.CreateComment("Remove tile border in tile views");
sr.AppendChild(comment);
elem = dom.CreateElement("RemoveTileBorder");
elem.SetAttribute("active", Options.RemoveTileBorder.ToString());
sr.AppendChild(elem);
+
+ comment = dom.CreateComment("Preview background color for items and multis");
+ sr.AppendChild(comment);
+ elem = dom.CreateElement("PreviewBackgroundColor");
+ elem.SetAttribute("value", ColorTranslator.ToHtml(Options.PreviewBackgroundColor));
+ sr.AppendChild(elem);
// - Colors
comment = dom.CreateComment("NewMapSize Felucca/Trammel width 7168?");
sr.AppendChild(comment);
@@ -356,16 +356,16 @@ public static void LoadProfile(string filename)
Options.TileSelectionColor = ColorTranslator.FromHtml(elem.GetAttribute("value"));
}
- elem = (XmlElement)xOptions.SelectSingleNode("OverrideBackgroundColorFromTile");
+ elem = (XmlElement)xOptions.SelectSingleNode("RemoveTileBorder");
if (elem != null)
{
- Options.OverrideBackgroundColorFromTile = bool.Parse(elem.GetAttribute("active"));
+ Options.RemoveTileBorder = bool.Parse(elem.GetAttribute("active"));
}
- elem = (XmlElement)xOptions.SelectSingleNode("RemoveTileBorder");
+ elem = (XmlElement)xOptions.SelectSingleNode("PreviewBackgroundColor");
if (elem != null)
{
- Options.RemoveTileBorder = bool.Parse(elem.GetAttribute("active"));
+ Options.PreviewBackgroundColor = ColorTranslator.FromHtml(elem.GetAttribute("value"));
}
elem = (XmlElement)xOptions.SelectSingleNode("NewMapSize");
diff --git a/UoFiddler/Forms/AboutBoxForm.resx b/UoFiddler/Forms/AboutBoxForm.resx
index 2e799d4..052eab9 100644
--- a/UoFiddler/Forms/AboutBoxForm.resx
+++ b/UoFiddler/Forms/AboutBoxForm.resx
@@ -118,7 +118,17 @@
System.Resources.ResXResourceWriter, System.Windows.Forms, Version=4.0.0.0, Culture=neutral, PublicKeyToken=b77a5c561934e089
- Version 4.18.0
+ Version 4.18.1
+- Mass import plugin now allows importing PNG and JPEG.
+- Invalid entries in Animationlist.xml will now be skipped nad will result in a message about the problem.
+- Multi editor now has additional form with shortcut list.
+- Tiledata control now has additional form with some descriptions for fields and flags (data needs further updates).
+- Option to change background color for some controls is now consolidated under options and is saved in profile file. You can still make adjustments from respective controls.
+- Fix: added Gumplist.xml to UOFiddler main folder (missed in previous version).
+- You can use F3 and Shift F3 to search next/previous in: Clilocs, Speech, Dress, Items, Land tiles, Sounds and Tiledata tabs.
+- Map preview has new options to generate preview with altitude (little bit slow but works).
+
+Version 4.18.0
- Small fix for animdata control layout
- Verdata preview tab added to browse contents of verdata.mul (if present). It's still work in progress.
- Main windows tabs can now be scrolled with mouse wheel.
diff --git a/UoFiddler/Forms/OptionsForm.Designer.cs b/UoFiddler/Forms/OptionsForm.Designer.cs
index 26b6d75..9d36b03 100644
--- a/UoFiddler/Forms/OptionsForm.Designer.cs
+++ b/UoFiddler/Forms/OptionsForm.Designer.cs
@@ -41,13 +41,13 @@ private void InitializeComponent()
{
components = new System.ComponentModel.Container();
groupBox1 = new System.Windows.Forms.GroupBox();
- checkBoxOverrideBackgroundColorFromTile = new System.Windows.Forms.CheckBox();
numericUpDownItemSizeHeight = new System.Windows.Forms.NumericUpDown();
checkBoxItemClip = new System.Windows.Forms.CheckBox();
label1 = new System.Windows.Forms.Label();
numericUpDownItemSizeWidth = new System.Windows.Forms.NumericUpDown();
checkBoxCacheData = new System.Windows.Forms.CheckBox();
groupBox2 = new System.Windows.Forms.GroupBox();
+ checkBoxNewClilocFormat = new System.Windows.Forms.CheckBox();
checkBoxPolSoundIdOffset = new System.Windows.Forms.CheckBox();
checkBoxuseDiff = new System.Windows.Forms.CheckBox();
checkBoxNewMapSize = new System.Windows.Forms.CheckBox();
@@ -81,8 +81,9 @@ private void InitializeComponent()
RestoreDefaultsButton = new System.Windows.Forms.Button();
TileSelectionColorComboBox = new System.Windows.Forms.ComboBox();
TileFocusColorComboBox = new System.Windows.Forms.ComboBox();
+ PreviewBackgroundColorLabel = new System.Windows.Forms.Label();
+ PreviewBackgroundColorButton = new System.Windows.Forms.Button();
buttonClose = new System.Windows.Forms.Button();
- checkBoxNewClilocFormat = new System.Windows.Forms.CheckBox();
groupBox1.SuspendLayout();
((System.ComponentModel.ISupportInitialize)numericUpDownItemSizeHeight).BeginInit();
((System.ComponentModel.ISupportInitialize)numericUpDownItemSizeWidth).BeginInit();
@@ -94,7 +95,6 @@ private void InitializeComponent()
//
// groupBox1
//
- groupBox1.Controls.Add(checkBoxOverrideBackgroundColorFromTile);
groupBox1.Controls.Add(numericUpDownItemSizeHeight);
groupBox1.Controls.Add(checkBoxItemClip);
groupBox1.Controls.Add(label1);
@@ -103,21 +103,11 @@ private void InitializeComponent()
groupBox1.Margin = new System.Windows.Forms.Padding(4, 3, 4, 3);
groupBox1.Name = "groupBox1";
groupBox1.Padding = new System.Windows.Forms.Padding(4, 3, 4, 3);
- groupBox1.Size = new System.Drawing.Size(258, 130);
+ groupBox1.Size = new System.Drawing.Size(258, 118);
groupBox1.TabIndex = 1;
groupBox1.TabStop = false;
groupBox1.Text = "Item Tab";
//
- // checkBoxOverrideBackgroundColorFromTile
- //
- checkBoxOverrideBackgroundColorFromTile.Location = new System.Drawing.Point(10, 80);
- checkBoxOverrideBackgroundColorFromTile.Margin = new System.Windows.Forms.Padding(4, 3, 4, 3);
- checkBoxOverrideBackgroundColorFromTile.Name = "checkBoxOverrideBackgroundColorFromTile";
- checkBoxOverrideBackgroundColorFromTile.Size = new System.Drawing.Size(225, 36);
- checkBoxOverrideBackgroundColorFromTile.TabIndex = 17;
- checkBoxOverrideBackgroundColorFromTile.Text = "Set background color same as tile background";
- checkBoxOverrideBackgroundColorFromTile.UseVisualStyleBackColor = true;
- //
// numericUpDownItemSizeHeight
//
numericUpDownItemSizeHeight.Location = new System.Drawing.Point(155, 22);
@@ -193,6 +183,18 @@ private void InitializeComponent()
groupBox2.TabStop = false;
groupBox2.Text = "Misc";
//
+ // checkBoxNewClilocFormat
+ //
+ checkBoxNewClilocFormat.AutoSize = true;
+ checkBoxNewClilocFormat.Location = new System.Drawing.Point(7, 123);
+ checkBoxNewClilocFormat.Margin = new System.Windows.Forms.Padding(4, 3, 4, 3);
+ checkBoxNewClilocFormat.Name = "checkBoxNewClilocFormat";
+ checkBoxNewClilocFormat.Size = new System.Drawing.Size(120, 19);
+ checkBoxNewClilocFormat.TabIndex = 8;
+ checkBoxNewClilocFormat.Text = "New cliloc format";
+ toolTip1.SetToolTip(checkBoxNewClilocFormat, "For client version 7.0.104 and newer this needs to be checked. It allows reading of new cliloc format. This option has only partial support so saving file will only produce old cliloc format.");
+ checkBoxNewClilocFormat.UseVisualStyleBackColor = true;
+ //
// checkBoxPolSoundIdOffset
//
checkBoxPolSoundIdOffset.AutoSize = true;
@@ -231,7 +233,7 @@ private void InitializeComponent()
//
// buttonApply
//
- buttonApply.Location = new System.Drawing.Point(321, 463);
+ buttonApply.Location = new System.Drawing.Point(318, 476);
buttonApply.Margin = new System.Windows.Forms.Padding(4, 3, 4, 3);
buttonApply.Name = "buttonApply";
buttonApply.Size = new System.Drawing.Size(88, 27);
@@ -372,7 +374,7 @@ private void InitializeComponent()
groupBox3.Margin = new System.Windows.Forms.Padding(4, 3, 4, 3);
groupBox3.Name = "groupBox3";
groupBox3.Padding = new System.Windows.Forms.Padding(4, 3, 4, 3);
- groupBox3.Size = new System.Drawing.Size(220, 288);
+ groupBox3.Size = new System.Drawing.Size(220, 276);
groupBox3.TabIndex = 5;
groupBox3.TabStop = false;
groupBox3.Text = "Map";
@@ -446,7 +448,7 @@ private void InitializeComponent()
groupBox4.Controls.Add(button2);
groupBox4.Controls.Add(textBoxOutputPath);
groupBox4.Controls.Add(label10);
- groupBox4.Location = new System.Drawing.Point(16, 405);
+ groupBox4.Location = new System.Drawing.Point(16, 419);
groupBox4.Margin = new System.Windows.Forms.Padding(4, 3, 4, 3);
groupBox4.Name = "groupBox4";
groupBox4.Padding = new System.Windows.Forms.Padding(4, 3, 4, 3);
@@ -457,7 +459,7 @@ private void InitializeComponent()
//
// button2
//
- button2.Location = new System.Drawing.Point(443, 16);
+ button2.Location = new System.Drawing.Point(442, 17);
button2.Margin = new System.Windows.Forms.Padding(4, 3, 4, 3);
button2.Name = "button2";
button2.Size = new System.Drawing.Size(28, 27);
@@ -468,7 +470,7 @@ private void InitializeComponent()
//
// textBoxOutputPath
//
- textBoxOutputPath.Location = new System.Drawing.Point(89, 20);
+ textBoxOutputPath.Location = new System.Drawing.Point(87, 19);
textBoxOutputPath.Margin = new System.Windows.Forms.Padding(4, 3, 4, 3);
textBoxOutputPath.Name = "textBoxOutputPath";
textBoxOutputPath.Size = new System.Drawing.Size(347, 23);
@@ -492,11 +494,13 @@ private void InitializeComponent()
ColorsGroupBox.Controls.Add(TileSelectionColorComboBox);
ColorsGroupBox.Controls.Add(FocusColorLabel);
ColorsGroupBox.Controls.Add(TileFocusColorComboBox);
- ColorsGroupBox.Location = new System.Drawing.Point(16, 301);
+ ColorsGroupBox.Controls.Add(PreviewBackgroundColorLabel);
+ ColorsGroupBox.Controls.Add(PreviewBackgroundColorButton);
+ ColorsGroupBox.Location = new System.Drawing.Point(16, 288);
ColorsGroupBox.Margin = new System.Windows.Forms.Padding(4, 3, 4, 3);
ColorsGroupBox.Name = "ColorsGroupBox";
ColorsGroupBox.Padding = new System.Windows.Forms.Padding(4, 3, 4, 3);
- ColorsGroupBox.Size = new System.Drawing.Size(486, 97);
+ ColorsGroupBox.Size = new System.Drawing.Size(486, 125);
ColorsGroupBox.TabIndex = 7;
ColorsGroupBox.TabStop = false;
ColorsGroupBox.Text = "Tile view settings";
@@ -541,9 +545,30 @@ private void InitializeComponent()
TileFocusColorComboBox.Size = new System.Drawing.Size(153, 23);
TileFocusColorComboBox.TabIndex = 9;
//
+ // PreviewBackgroundColorLabel
+ //
+ PreviewBackgroundColorLabel.AutoSize = true;
+ PreviewBackgroundColorLabel.Location = new System.Drawing.Point(14, 91);
+ PreviewBackgroundColorLabel.Margin = new System.Windows.Forms.Padding(4, 0, 4, 0);
+ PreviewBackgroundColorLabel.Name = "PreviewBackgroundColorLabel";
+ PreviewBackgroundColorLabel.Size = new System.Drawing.Size(101, 15);
+ PreviewBackgroundColorLabel.TabIndex = 18;
+ PreviewBackgroundColorLabel.Text = "Background color";
+ //
+ // PreviewBackgroundColorButton
+ //
+ PreviewBackgroundColorButton.FlatStyle = System.Windows.Forms.FlatStyle.Flat;
+ PreviewBackgroundColorButton.Location = new System.Drawing.Point(123, 87);
+ PreviewBackgroundColorButton.Margin = new System.Windows.Forms.Padding(4, 3, 4, 3);
+ PreviewBackgroundColorButton.Name = "PreviewBackgroundColorButton";
+ PreviewBackgroundColorButton.Size = new System.Drawing.Size(134, 23);
+ PreviewBackgroundColorButton.TabIndex = 19;
+ PreviewBackgroundColorButton.UseVisualStyleBackColor = false;
+ PreviewBackgroundColorButton.Click += PreviewBackgroundColorButton_Click;
+ //
// buttonClose
//
- buttonClose.Location = new System.Drawing.Point(415, 463);
+ buttonClose.Location = new System.Drawing.Point(414, 476);
buttonClose.Margin = new System.Windows.Forms.Padding(4, 3, 4, 3);
buttonClose.Name = "buttonClose";
buttonClose.Size = new System.Drawing.Size(88, 27);
@@ -552,23 +577,11 @@ private void InitializeComponent()
buttonClose.UseVisualStyleBackColor = true;
buttonClose.Click += OnClickClose;
//
- // checkBoxNewClilocFormat
- //
- checkBoxNewClilocFormat.AutoSize = true;
- checkBoxNewClilocFormat.Location = new System.Drawing.Point(7, 123);
- checkBoxNewClilocFormat.Margin = new System.Windows.Forms.Padding(4, 3, 4, 3);
- checkBoxNewClilocFormat.Name = "checkBoxNewClilocFormat";
- checkBoxNewClilocFormat.Size = new System.Drawing.Size(120, 19);
- checkBoxNewClilocFormat.TabIndex = 8;
- checkBoxNewClilocFormat.Text = "New cliloc format";
- toolTip1.SetToolTip(checkBoxNewClilocFormat, "For client version 7.0.104 and newer this needs to be checked. It allows reading of new cliloc format. This option has only partial support so saving file will only produce old cliloc format.");
- checkBoxNewClilocFormat.UseVisualStyleBackColor = true;
- //
// OptionsForm
//
AutoScaleDimensions = new System.Drawing.SizeF(7F, 15F);
AutoScaleMode = System.Windows.Forms.AutoScaleMode.Font;
- ClientSize = new System.Drawing.Size(518, 501);
+ ClientSize = new System.Drawing.Size(518, 514);
Controls.Add(buttonClose);
Controls.Add(ColorsGroupBox);
Controls.Add(groupBox4);
@@ -641,7 +654,8 @@ private void InitializeComponent()
private System.Windows.Forms.CheckBox checkBoxPolSoundIdOffset;
private System.Windows.Forms.Button buttonClose;
private System.Windows.Forms.CheckBox checkboxRemoveTileBorder;
- private System.Windows.Forms.CheckBox checkBoxOverrideBackgroundColorFromTile;
private System.Windows.Forms.CheckBox checkBoxNewClilocFormat;
+ private System.Windows.Forms.Label PreviewBackgroundColorLabel;
+ private System.Windows.Forms.Button PreviewBackgroundColorButton;
}
}
\ No newline at end of file
diff --git a/UoFiddler/Forms/OptionsForm.cs b/UoFiddler/Forms/OptionsForm.cs
index ce9ccfd..ad2ba77 100644
--- a/UoFiddler/Forms/OptionsForm.cs
+++ b/UoFiddler/Forms/OptionsForm.cs
@@ -62,11 +62,12 @@ public OptionsForm(Action updateAllTileViewsAction,
.Where(x => x.PropertyType == typeof(Color))
.Select(x => x.GetValue(null)).ToList();
- checkBoxOverrideBackgroundColorFromTile.Checked = Options.OverrideBackgroundColorFromTile;
checkboxRemoveTileBorder.Checked = Options.RemoveTileBorder;
TileSelectionColorComboBox.SelectedItem = Options.TileSelectionColor;
+ PreviewBackgroundColorButton.BackColor = Options.PreviewBackgroundColor;
+
checkBoxCacheData.Checked = Files.CacheData;
checkBoxNewMapSize.Checked = Map.Felucca.Width == 7168;
checkBoxuseDiff.Checked = Map.UseDiff;
@@ -154,18 +155,17 @@ private void OnClickApply(object sender, EventArgs e)
_updateAllTileViewsAction();
}
- if (checkBoxOverrideBackgroundColorFromTile.Checked != Options.OverrideBackgroundColorFromTile)
+ if (checkboxRemoveTileBorder.Checked != Options.RemoveTileBorder)
{
- Options.OverrideBackgroundColorFromTile = checkBoxOverrideBackgroundColorFromTile.Checked;
+ Options.RemoveTileBorder = checkboxRemoveTileBorder.Checked;
_updateAllTileViewsAction();
}
- if (checkboxRemoveTileBorder.Checked != Options.RemoveTileBorder)
+ if (PreviewBackgroundColorButton.BackColor != Options.PreviewBackgroundColor)
{
- Options.RemoveTileBorder = checkboxRemoveTileBorder.Checked;
-
- _updateAllTileViewsAction();
+ Options.PreviewBackgroundColor = PreviewBackgroundColorButton.BackColor;
+ ControlEvents.FirePreviewBackgroundColorChangeEvent();
}
if (map0Nametext.Text != Options.MapNames[0]
@@ -269,11 +269,20 @@ private void RestoreDefaultsButton_Click(object sender, EventArgs e)
return;
}
- checkBoxOverrideBackgroundColorFromTile.Checked = false;
checkboxRemoveTileBorder.Checked = false;
TileFocusColorComboBox.SelectedItem = Color.DarkRed;
TileSelectionColorComboBox.SelectedItem = Color.DodgerBlue;
+ PreviewBackgroundColorButton.BackColor = Color.White;
+ }
+
+ private void PreviewBackgroundColorButton_Click(object sender, EventArgs e)
+ {
+ using var dlg = new ColorDialog { Color = PreviewBackgroundColorButton.BackColor };
+ if (dlg.ShowDialog() == DialogResult.OK)
+ {
+ PreviewBackgroundColorButton.BackColor = dlg.Color;
+ }
}
private void OnClickClose(object sender, EventArgs e)
diff --git a/UoFiddler/Forms/OptionsForm.resx b/UoFiddler/Forms/OptionsForm.resx
index 513212e..3af9780 100644
--- a/UoFiddler/Forms/OptionsForm.resx
+++ b/UoFiddler/Forms/OptionsForm.resx
@@ -120,4 +120,7 @@
17, 17
+
+ 17, 17
+
\ No newline at end of file
diff --git a/UoFiddler/UoFiddler.csproj b/UoFiddler/UoFiddler.csproj
index 1cb8529..a075b9b 100644
--- a/UoFiddler/UoFiddler.csproj
+++ b/UoFiddler/UoFiddler.csproj
@@ -9,9 +9,9 @@
UoFiddler
UoFiddler
Copyright © 2026
- 4.18.0
- 4.18.0
- 4.18.0
+ 4.18.1
+ 4.18.1
+ 4.18.1
true
@@ -156,8 +156,11 @@
-
- PreserveNewest
-
+
+ PreserveNewest
+
+
+ PreserveNewest
+
\ No newline at end of file