From 9d832c909fa8f39ac830df6ce6909be8a7424164 Mon Sep 17 00:00:00 2001 From: Arufonsu <17498701+Arufonsu@users.noreply.github.com> Date: Sun, 27 Aug 2023 14:55:57 -0400 Subject: [PATCH] feat: map editor cursor sprites (#1797) * feat: map editor cursor sprites * Feature can be toggled within the editor -> File -> Options -> General - Cursor sprite changes when the user switches between tools. - Moving the cursor out of the map editor sets the cursor back to normal. - Editor tool's custom sprites are modifiable. - Editor tool's cursor click-points are configurable. * Fixed issues when switching from selection tool to other tools. * March 14th, 2023: Updated to NET7 Branch and reviews: - ToolCursor doesn't needs IConfigurable. - ToolCursor uses a dictionary for improved performance. - Better performance and structure as overall. - Code clean up according to previous reviews. * review: defer ToolCursor initialization in Load() method --- Intersect.Editor/Configuration/ToolCursor.cs | 58 +++++ Intersect.Editor/Core/Database.cs | 3 +- Intersect.Editor/Core/Graphics.cs | 24 +-- .../DockingElements/frmMapEditor.Designer.cs | 2 + .../Forms/DockingElements/frmMapEditor.cs | 203 +++++++++++++----- .../Forms/DockingElements/frmMapList.cs | 2 +- Intersect.Editor/Forms/frmMain.Designer.cs | 29 ++- Intersect.Editor/Forms/frmMain.cs | 94 ++++---- Intersect.Editor/Forms/frmMain.resx | 66 +++--- Intersect.Editor/Forms/frmOptions.Designer.cs | 110 ++++------ Intersect.Editor/Forms/frmOptions.cs | 7 + Intersect.Editor/General/Enums.cs | 2 +- Intersect.Editor/General/Globals.cs | 4 +- Intersect.Editor/Localization/Strings.cs | 19 +- Intersect.Editor/Maps/MapGrid.cs | 2 +- .../Properties/Resources.Designer.cs | 11 - Intersect.Editor/Properties/Resources.resx | 3 - Intersect.Editor/Resources/paintbrush.png | Bin 410 -> 0 bytes 18 files changed, 387 insertions(+), 252 deletions(-) create mode 100644 Intersect.Editor/Configuration/ToolCursor.cs delete mode 100644 Intersect.Editor/Resources/paintbrush.png diff --git a/Intersect.Editor/Configuration/ToolCursor.cs b/Intersect.Editor/Configuration/ToolCursor.cs new file mode 100644 index 0000000000..85d6caf7a0 --- /dev/null +++ b/Intersect.Editor/Configuration/ToolCursor.cs @@ -0,0 +1,58 @@ +using System; +using System.Collections.Generic; +using System.IO; +using Newtonsoft.Json; +using Intersect.Editor.General; + +namespace Intersect.Editor.Configuration +{ + public sealed class ToolCursor + { + public Point CursorClickPoint { get; set; } + + private static readonly Dictionary _toolCursorDict; + + public static IReadOnlyDictionary ToolCursorDict => _toolCursorDict; + + static ToolCursor() + { + _toolCursorDict = new Dictionary + { + { EditingTool.Brush, new ToolCursor() }, + { EditingTool.Dropper, new ToolCursor() }, + { EditingTool.Erase, new ToolCursor() }, + { EditingTool.Fill, new ToolCursor() }, + { EditingTool.Rectangle, new ToolCursor() }, + { EditingTool.Selection, new ToolCursor() } + }; + } + + public static void Load() + { + foreach (EditingTool tool in Enum.GetValues(typeof(EditingTool))) + { + var fileName = $"resources/cursors/editor_{tool.ToString().ToLowerInvariant()}.json"; + ToolCursor toolCursor; + + if (File.Exists(fileName)) + { + if (!_toolCursorDict.TryGetValue(tool, out toolCursor)) + { + continue; + } + + var json = File.ReadAllText(fileName); + toolCursor = JsonConvert.DeserializeObject(json); + } + else + { + toolCursor = new ToolCursor(); + var json = JsonConvert.SerializeObject(toolCursor); + File.WriteAllText(fileName, json); + } + + _toolCursorDict[tool] = toolCursor; + } + } + } +} \ No newline at end of file diff --git a/Intersect.Editor/Core/Database.cs b/Intersect.Editor/Core/Database.cs index 74245d891e..6a6b31fcab 100644 --- a/Intersect.Editor/Core/Database.cs +++ b/Intersect.Editor/Core/Database.cs @@ -3,7 +3,7 @@ using System.IO; using Intersect.Configuration; - +using Intersect.Editor.Configuration; using Mono.Data.Sqlite; namespace Intersect.Editor @@ -57,6 +57,7 @@ public static void LoadOptions() /* Load configuration */ ClientConfiguration.LoadAndSave(ClientConfiguration.DefaultPath); + ToolCursor.Load(); } //Map Cache DB diff --git a/Intersect.Editor/Core/Graphics.cs b/Intersect.Editor/Core/Graphics.cs index 9f1ac181e8..b68599210d 100644 --- a/Intersect.Editor/Core/Graphics.cs +++ b/Intersect.Editor/Core/Graphics.cs @@ -504,8 +504,8 @@ RenderTarget2D renderTarget2D int x1 = 0, y1 = 0, x2 = 0, y2 = 0, xoffset = 0, yoffset = 0; int dragxoffset = 0, dragyoffset = 0; - if (Globals.CurrentTool == (int) EditingTool.Rectangle || - Globals.CurrentTool == (int) EditingTool.Selection) + if (Globals.CurrentTool == EditingTool.Rectangle || + Globals.CurrentTool == EditingTool.Selection) { if (selW < 0) { @@ -585,7 +585,7 @@ RenderTarget2D renderTarget2D //Lets Create the Preview //Mimic Mouse Down tmpMap = TilePreviewStruct; - if (Globals.CurrentTool == (int) EditingTool.Selection && Globals.Dragging) + if (Globals.CurrentTool == EditingTool.Selection && Globals.Dragging) { Globals.MapEditorWindow.ProcessSelectionMovement(tmpMap, false, true); } @@ -593,11 +593,11 @@ RenderTarget2D renderTarget2D { if (Globals.CurrentLayer == LayerOptions.Attributes) { - if (Globals.CurrentTool == (int) EditingTool.Brush) + if (Globals.CurrentTool == EditingTool.Brush) { Globals.MapLayersWindow.PlaceAttribute(tmpMap, Globals.CurTileX, Globals.CurTileY); } - else if (Globals.CurrentTool == (int) EditingTool.Rectangle) + else if (Globals.CurrentTool == EditingTool.Rectangle) { for (var x = selX; x < selX + selW + 1; x++) { @@ -626,7 +626,7 @@ RenderTarget2D renderTarget2D } else if (Globals.CurrentTileset != null) { - if (Globals.CurrentTool == (int) EditingTool.Brush) + if (Globals.CurrentTool == EditingTool.Brush) { if (Globals.Autotilemode == 0) { @@ -659,7 +659,7 @@ RenderTarget2D renderTarget2D tmpMap.Autotiles.UpdateCliffAutotiles(tmpMap, Globals.CurrentLayer); } - else if (Globals.CurrentTool == (int) EditingTool.Rectangle) + else if (Globals.CurrentTool == EditingTool.Rectangle) { var x = 0; var y = 0; @@ -861,8 +861,8 @@ private static void DrawSelectionRect() selH = Globals.CurMapSelH; int dragxoffset = 0, dragyoffset = 0; - if (Globals.CurrentTool == (int) EditingTool.Rectangle || - Globals.CurrentTool == (int) EditingTool.Selection) + if (Globals.CurrentTool == EditingTool.Rectangle || + Globals.CurrentTool == EditingTool.Selection) { if (selW < 0) { @@ -1007,7 +1007,7 @@ private static void DrawSelectionRect() } } - if (Globals.CurrentTool == (int) EditingTool.Selection && Globals.Dragging) + if (Globals.CurrentTool == EditingTool.Selection && Globals.Dragging) { DrawBoxOutline( CurrentView.Left + Globals.CurTileX * Options.TileWidth, @@ -1016,8 +1016,8 @@ private static void DrawSelectionRect() ); } - if (Globals.CurrentTool == (int) EditingTool.Rectangle || - Globals.CurrentTool == (int) EditingTool.Selection) + if (Globals.CurrentTool == EditingTool.Rectangle || + Globals.CurrentTool == EditingTool.Selection) { DrawBoxOutline( CurrentView.Left + (selX + dragxoffset) * Options.TileWidth, diff --git a/Intersect.Editor/Forms/DockingElements/frmMapEditor.Designer.cs b/Intersect.Editor/Forms/DockingElements/frmMapEditor.Designer.cs index 210f59525c..87a2840b43 100644 --- a/Intersect.Editor/Forms/DockingElements/frmMapEditor.Designer.cs +++ b/Intersect.Editor/Forms/DockingElements/frmMapEditor.Designer.cs @@ -66,8 +66,10 @@ private void InitializeComponent() this.picMap.DoubleClick += new System.EventHandler(this.picMap_DoubleClick); this.picMap.MouseDown += new System.Windows.Forms.MouseEventHandler(this.picMap_MouseDown); this.picMap.MouseEnter += new System.EventHandler(this.picMap_MouseEnter); + this.picMap.MouseLeave += new System.EventHandler(this.picMap_MouseLeave); this.picMap.MouseMove += new System.Windows.Forms.MouseEventHandler(this.picMap_MouseMove); this.picMap.MouseUp += new System.Windows.Forms.MouseEventHandler(this.picMap_MouseUp); + this.picMap.KeyDown += new System.Windows.Forms.KeyEventHandler(this.picMap_KeyDown); this.picMap.Resize += new System.EventHandler(this.picMap_Resize); // // tooltipMapAttribute diff --git a/Intersect.Editor/Forms/DockingElements/frmMapEditor.cs b/Intersect.Editor/Forms/DockingElements/frmMapEditor.cs index 7a5b2e53de..62c7aab5da 100644 --- a/Intersect.Editor/Forms/DockingElements/frmMapEditor.cs +++ b/Intersect.Editor/Forms/DockingElements/frmMapEditor.cs @@ -1,12 +1,14 @@ using System; using System.Collections.Generic; using System.Drawing; +using System.IO; using System.Linq; +using System.Runtime.InteropServices; using System.Windows.Forms; - using DarkUI.Forms; using Intersect.Config; using Intersect.Editor.Classes.Maps; +using Intersect.Editor.Configuration; using Intersect.Editor.Core; using Intersect.Editor.Forms.Editors.Events; using Intersect.Editor.General; @@ -18,9 +20,7 @@ using Intersect.GameObjects.Events; using Intersect.GameObjects.Maps; using Intersect.Logging; - using Microsoft.Xna.Framework.Graphics; - using WeifenLuo.WinFormsUI.Docking; using MapAttribute = Intersect.Enums.MapAttribute; @@ -42,6 +42,36 @@ public partial class FrmMapEditor : DockContent private bool mMapChanged; + // MapGrid Cursor + private Bitmap mCurSprite; + + private string mCurPath; + + private Point mCurClickPoint; + + public struct IconInfo + { + public bool FIcon; + + public int XHotspot; + + public int YHotspot; + + public IntPtr HbmMask; + + public IntPtr HbmColor; + } + + [DllImport("user32.dll")] + [return: MarshalAs(UnmanagedType.Bool)] + private static extern bool GetIconInfo(IntPtr hIcon, ref IconInfo pIconInfo); + + [DllImport("user32.dll")] + private static extern IntPtr CreateIconIndirect(ref IconInfo icon); + + [DllImport("user32.dll")] + private static extern bool DestroyIcon(IntPtr hIcon); + //Init/Form Functions public FrmMapEditor() { @@ -179,13 +209,11 @@ public void AddUndoState() } //PicMap Functions - public void picMap_MouseDown(object sender, MouseEventArgs e) + private void picMap_MouseDown(object sender, MouseEventArgs e) { - if (!Globals.MapEditorWindow.DockPanel.Focused) + if (Globals.CurrentEditor != -1 || Globals.EditingLight != null || !picMap.Focused) { - Globals.MapEditorWindow.DockPanel.Focus(); - - return; + picMap.Focus(); } if (Globals.EditingLight != null) @@ -219,7 +247,7 @@ public void picMap_MouseDown(object sender, MouseEventArgs e) { case MouseButtons.Left: Globals.MouseButton = 0; - if (Globals.CurrentTool == (int) EditingTool.Droppler) + if (Globals.CurrentTool == EditingTool.Dropper) { foreach (var layer in Enumerable.Reverse(Options.Instance.MapOpts.Layers.All)) { @@ -233,15 +261,16 @@ public void picMap_MouseDown(object sender, MouseEventArgs e) Globals.CurSelX = tmpMap.Layers[layer][Globals.CurTileX, Globals.CurTileY].X; Globals.CurSelY = tmpMap.Layers[layer][Globals.CurTileX, Globals.CurTileY].Y; - Globals.CurrentTool = (int)EditingTool.Brush; + Globals.CurrentTool = EditingTool.Brush; Globals.MapLayersWindow.SetLayer(layer); + SetCursorSpriteInGrid(); break; } } return; } - else if (Globals.CurrentTool == (int) EditingTool.Selection) + else if (Globals.CurrentTool == EditingTool.Selection) { if (Globals.Dragging == true) { @@ -289,14 +318,14 @@ public void picMap_MouseDown(object sender, MouseEventArgs e) } } } - else if (Globals.CurrentTool == (int) EditingTool.Rectangle) + else if (Globals.CurrentTool == EditingTool.Rectangle) { Globals.CurMapSelX = Globals.CurTileX; Globals.CurMapSelY = Globals.CurTileY; Globals.CurMapSelW = 0; Globals.CurMapSelH = 0; } - else if (Globals.CurrentTool == (int) EditingTool.Fill) + else if (Globals.CurrentTool == EditingTool.Fill) { if (Globals.CurrentLayer == LayerOptions.Attributes) { @@ -309,7 +338,7 @@ public void picMap_MouseDown(object sender, MouseEventArgs e) Globals.MouseButton = -1; } - else if (Globals.CurrentTool == (int) EditingTool.Erase) + else if (Globals.CurrentTool == EditingTool.Erase) { if (Globals.CurrentLayer == LayerOptions.Attributes) { @@ -388,7 +417,7 @@ public void picMap_MouseDown(object sender, MouseEventArgs e) case MouseButtons.Right: Globals.MouseButton = 1; - if (Globals.CurrentTool == (int) EditingTool.Selection) + if (Globals.CurrentTool == EditingTool.Selection) { if (Globals.Dragging) { @@ -398,7 +427,7 @@ public void picMap_MouseDown(object sender, MouseEventArgs e) } } - if (Globals.CurrentTool == (int) EditingTool.Fill) + if (Globals.CurrentTool == EditingTool.Fill) { if (Options.Instance.MapOpts.Layers.All.Contains(Globals.CurrentLayer)) { @@ -407,7 +436,7 @@ public void picMap_MouseDown(object sender, MouseEventArgs e) Globals.MouseButton = -1; } - else if (Globals.CurrentTool == (int) EditingTool.Erase) + else if (Globals.CurrentTool == EditingTool.Erase) { if (Options.Instance.MapOpts.Layers.All.Contains(Globals.CurrentLayer)) { @@ -418,7 +447,7 @@ public void picMap_MouseDown(object sender, MouseEventArgs e) } else if (Globals.CurrentLayer == LayerOptions.Attributes) { - if (Globals.CurrentTool == (int) EditingTool.Brush) + if (Globals.CurrentTool == EditingTool.Brush) { if (Globals.MapLayersWindow.RemoveAttribute( Globals.CurrentMap, Globals.CurTileX, Globals.CurTileY @@ -427,8 +456,8 @@ public void picMap_MouseDown(object sender, MouseEventArgs e) mMapChanged = true; } } - else if (Globals.CurrentTool == (int) EditingTool.Rectangle || - Globals.CurrentTool == (int) EditingTool.Selection) + else if (Globals.CurrentTool == EditingTool.Rectangle || + Globals.CurrentTool == EditingTool.Selection) { Globals.CurMapSelX = Globals.CurTileX; Globals.CurMapSelY = Globals.CurTileY; @@ -460,15 +489,15 @@ public void picMap_MouseDown(object sender, MouseEventArgs e) } else { - if (Globals.CurrentTool == (int) EditingTool.Brush) + if (Globals.CurrentTool == EditingTool.Brush) { tmpMap.Layers[Globals.CurrentLayer][Globals.CurTileX, Globals.CurTileY].TilesetId = Guid.Empty; tmpMap.Layers[Globals.CurrentLayer][Globals.CurTileX, Globals.CurTileY].Autotile = 0; tmpMap.InitAutotiles(); mMapChanged = true; } - else if (Globals.CurrentTool == (int) EditingTool.Rectangle || - Globals.CurrentTool == (int) EditingTool.Selection) + else if (Globals.CurrentTool == EditingTool.Rectangle || + Globals.CurrentTool == EditingTool.Selection) { Globals.CurMapSelX = Globals.CurTileX; Globals.CurMapSelY = Globals.CurTileY; @@ -619,11 +648,11 @@ private void picMap_MouseMove(object sender, MouseEventArgs e) Core.Graphics.TilePreviewUpdated = true; } - if (Globals.CurrentTool == (int) EditingTool.Erase || - Globals.CurrentTool == (int) EditingTool.Fill || - Globals.CurrentTool == (int) EditingTool.Droppler) + if (Globals.CurrentTool == EditingTool.Erase || + Globals.CurrentTool == EditingTool.Fill || + Globals.CurrentTool == EditingTool.Dropper) { - return; //No click/drag with fill, erase, or droppler tools + return; //No click/drag with fill, erase, or dropper tools } if (Globals.MouseButton > -1) @@ -631,7 +660,7 @@ private void picMap_MouseMove(object sender, MouseEventArgs e) var tmpMap = Globals.CurrentMap; if (Globals.MouseButton == 0) { - if (Globals.CurrentTool == (int) EditingTool.Selection) + if (Globals.CurrentTool == EditingTool.Selection) { if (!Globals.Dragging) { @@ -639,7 +668,7 @@ private void picMap_MouseMove(object sender, MouseEventArgs e) Globals.CurMapSelH = Globals.CurTileY - Globals.CurMapSelY; } } - else if (Globals.CurrentTool == (int) EditingTool.Rectangle) + else if (Globals.CurrentTool == EditingTool.Rectangle) { Globals.CurMapSelW = Globals.CurTileX - Globals.CurMapSelX; Globals.CurMapSelH = Globals.CurTileY - Globals.CurMapSelY; @@ -747,12 +776,12 @@ private void picMap_MouseMove(object sender, MouseEventArgs e) } else if (Globals.MouseButton == 1) { - if (Globals.CurrentTool == (int) EditingTool.Rectangle) + if (Globals.CurrentTool == EditingTool.Rectangle) { Globals.CurMapSelW = Globals.CurTileX - Globals.CurMapSelX; Globals.CurMapSelH = Globals.CurTileY - Globals.CurMapSelY; } - else if (Globals.CurrentTool == (int) EditingTool.Brush) + else if (Globals.CurrentTool == EditingTool.Brush) { if (Globals.CurrentLayer == LayerOptions.Attributes) { @@ -760,7 +789,7 @@ private void picMap_MouseMove(object sender, MouseEventArgs e) } else if (Options.Instance.MapOpts.Layers.All.Contains(Globals.CurrentLayer)) { - if (Globals.CurrentTool == (int) EditingTool.Brush) + if (Globals.CurrentTool == EditingTool.Brush) { tmpMap.Layers[Globals.CurrentLayer][Globals.CurTileX, Globals.CurTileY].TilesetId = Guid.Empty; @@ -806,7 +835,7 @@ private void picMap_MouseMove(object sender, MouseEventArgs e) } else { - if (Globals.CurrentTool != (int) EditingTool.Selection) + if (Globals.CurrentTool != EditingTool.Selection) { Globals.CurMapSelX = Globals.CurTileX; Globals.CurMapSelY = Globals.CurTileY; @@ -822,7 +851,7 @@ public void picMap_MouseUp(object sender, MouseEventArgs e) } var tmpMap = Globals.CurrentMap; - if (Globals.CurrentTool == (int) EditingTool.Rectangle) + if (Globals.CurrentTool == EditingTool.Rectangle) { int selX = Globals.CurMapSelX, selY = Globals.CurMapSelY, @@ -958,7 +987,7 @@ public void picMap_MouseUp(object sender, MouseEventArgs e) mMapChanged = false; } - if (Globals.CurrentTool != (int) EditingTool.Selection) + if (Globals.CurrentTool != EditingTool.Selection) { Globals.CurMapSelX = Globals.CurTileX; Globals.CurMapSelY = Globals.CurTileY; @@ -1250,17 +1279,9 @@ private void picMap_DoubleClick(object sender, EventArgs e) Core.Graphics.TilePreviewUpdated = true; } - private void picMap_MouseEnter(object sender, EventArgs e) - { - if (Globals.CurrentEditor == -1) - { - Globals.MapEditorWindow.DockPanel.Focus(); - } - } - private void SaveMap() { - if (Globals.CurrentTool == (int) EditingTool.Selection) + if (Globals.CurrentTool == EditingTool.Selection) { if (Globals.Dragging == true) { @@ -1741,8 +1762,8 @@ public void ProcessSelectionMovement(MapInstance tmpMap, bool ignoreMouse = fals selH = Globals.CurMapSelH; int dragxoffset = 0, dragyoffset = 0; - if (Globals.CurrentTool == (int) EditingTool.Rectangle || - Globals.CurrentTool == (int) EditingTool.Selection) + if (Globals.CurrentTool == EditingTool.Rectangle || + Globals.CurrentTool == EditingTool.Selection) { if (selW < 0) { @@ -1922,8 +1943,8 @@ private void WipeCurrentSelection(MapBase tmpMap) selH = Globals.CurMapSelH; int dragxoffset = 0, dragyoffset = 0; - if (Globals.CurrentTool == (int) EditingTool.Rectangle || - Globals.CurrentTool == (int) EditingTool.Selection) + if (Globals.CurrentTool == EditingTool.Rectangle || + Globals.CurrentTool == EditingTool.Selection) { if (selW < 0) { @@ -2073,8 +2094,8 @@ public void FlipVertical() MapUndoStates.Add(CurrentMapState); - if (Globals.CurrentTool == (int) EditingTool.Rectangle || - Globals.CurrentTool == (int) EditingTool.Selection) + if (Globals.CurrentTool == EditingTool.Rectangle || + Globals.CurrentTool == EditingTool.Selection) { if (selW < 0) { @@ -2147,8 +2168,8 @@ public void FlipHorizontal() MapUndoStates.Add(CurrentMapState); - if (Globals.CurrentTool == (int) EditingTool.Rectangle || - Globals.CurrentTool == (int) EditingTool.Selection) + if (Globals.CurrentTool == EditingTool.Rectangle || + Globals.CurrentTool == EditingTool.Selection) { if (selW < 0) { @@ -2229,7 +2250,7 @@ public void Cut() public void Copy() { - if (Globals.CurrentTool == (int) EditingTool.Selection) + if (Globals.CurrentTool == EditingTool.Selection) { Globals.CopySource = new MapInstance(Globals.CurrentMap); Globals.CopyMapSelH = Globals.CurMapSelH; @@ -2258,7 +2279,7 @@ public void Paste() { if (Globals.HasCopy && Globals.CopySource != null) { - Globals.CurrentTool = (int) EditingTool.Selection; + Globals.CurrentTool = EditingTool.Selection; int selX1 = Globals.CurMapSelX, selY1 = Globals.CurMapSelY, selW1 = Globals.CurMapSelW, @@ -2344,6 +2365,78 @@ private void picMap_Paint(object sender, PaintEventArgs e) { } - } + private void picMap_MouseEnter(object sender, EventArgs e) + { + SetCursorSpriteInGrid(); + } + + private void picMap_MouseLeave(object sender, EventArgs e) + { + var enableCursorSprites = Preferences.LoadPreference("EnableCursorSprites"); + + if (!(!string.IsNullOrEmpty(enableCursorSprites) && Convert.ToBoolean(enableCursorSprites))) + { + return; + } + + if (mCurSprite == default) + { + return; + } + + mCurSprite.Dispose(); + DestroyIcon(Cursor.Handle); + Cursor = Cursors.Default; + } + + private void picMap_KeyDown(object sender, KeyEventArgs e) + { + var toolKeyIsPressed = (e.KeyData == Keys.B || e.KeyData == Keys.M || e.KeyData == Keys.R || + e.KeyData == Keys.F || e.KeyData == Keys.E || e.KeyData == Keys.I); + if (toolKeyIsPressed) + { + SetCursorSpriteInGrid(); + } + } + + private void SetCursorSpriteInGrid() + { + var enableCursorSprites = Preferences.LoadPreference("EnableCursorSprites"); + if (!(!string.IsNullOrEmpty(enableCursorSprites) && Convert.ToBoolean(enableCursorSprites)) || + Globals.CurrentEditor != -1) + { + return; + } + + picMap.Focus(); + + mCurPath = $"resources/cursors/editor_{Globals.CurrentTool.ToString().ToLowerInvariant()}.png"; + mCurClickPoint = ToolCursor.ToolCursorDict[Globals.CurrentTool].CursorClickPoint; + + if (string.IsNullOrEmpty(mCurPath) || !File.Exists(mCurPath)) + { + return; + } + + mCurSprite = new Bitmap(mCurPath); + Cursor = CreateCursorInGrid(mCurSprite, mCurClickPoint); + } + + /// + /// Creates a cursor from a bitmap depending on the user preferences and selected tool. + /// + private Cursor CreateCursorInGrid(Bitmap bmp, Point curHotSpot) + { + DestroyIcon(Cursor.Handle); + IntPtr ptr = bmp.GetHicon(); + IconInfo tmp = new IconInfo(); + GetIconInfo(ptr, ref tmp); + tmp.XHotspot = curHotSpot.X; + tmp.YHotspot = curHotSpot.Y; + tmp.FIcon = false; + ptr = CreateIconIndirect(ref tmp); + return new Cursor(ptr); + } + } } diff --git a/Intersect.Editor/Forms/DockingElements/frmMapList.cs b/Intersect.Editor/Forms/DockingElements/frmMapList.cs index 607dabf56b..5df9c78d3a 100644 --- a/Intersect.Editor/Forms/DockingElements/frmMapList.cs +++ b/Intersect.Editor/Forms/DockingElements/frmMapList.cs @@ -47,7 +47,7 @@ private void NodeDoubleClick(object sender, TreeNodeMouseClickEventArgs e) private void SaveMap() { - if (Globals.CurrentTool == (int) EditingTool.Selection) + if (Globals.CurrentTool == EditingTool.Selection) { if (Globals.Dragging == true) { diff --git a/Intersect.Editor/Forms/frmMain.Designer.cs b/Intersect.Editor/Forms/frmMain.Designer.cs index aa915fd681..99e61e602c 100644 --- a/Intersect.Editor/Forms/frmMain.Designer.cs +++ b/Intersect.Editor/Forms/frmMain.Designer.cs @@ -60,7 +60,7 @@ private void InitializeComponent() this.toolStripSeparator4 = new System.Windows.Forms.ToolStripSeparator(); this.toolStripBtnFill = new System.Windows.Forms.ToolStripButton(); this.toolStripBtnErase = new System.Windows.Forms.ToolStripButton(); - this.toolStripBtnEyeDrop = new System.Windows.Forms.ToolStripButton(); + this.toolStripBtnDropper = new System.Windows.Forms.ToolStripButton(); this.toolStripSeparator5 = new System.Windows.Forms.ToolStripSeparator(); this.toolStripTimeButton = new System.Windows.Forms.ToolStripDropDownButton(); this.toolStripSeparator6 = new System.Windows.Forms.ToolStripSeparator(); @@ -312,7 +312,7 @@ private void InitializeComponent() this.toolStripBtnBrush.CheckState = System.Windows.Forms.CheckState.Checked; this.toolStripBtnBrush.DisplayStyle = System.Windows.Forms.ToolStripItemDisplayStyle.Image; this.toolStripBtnBrush.ForeColor = System.Drawing.Color.FromArgb(((int)(((byte)(220)))), ((int)(((byte)(220)))), ((int)(((byte)(220))))); - this.toolStripBtnBrush.Image = global::Intersect.Editor.Properties.Resources.paintbrush; + this.toolStripBtnBrush.Image = ((System.Drawing.Image)(resources.GetObject("toolStripBtnBrush.Image"))); this.toolStripBtnBrush.ImageTransparentColor = System.Drawing.Color.Magenta; this.toolStripBtnBrush.Name = "toolStripBtnBrush"; this.toolStripBtnBrush.Size = new System.Drawing.Size(23, 22); @@ -370,17 +370,17 @@ private void InitializeComponent() this.toolStripBtnErase.Text = "Clear Layer"; this.toolStripBtnErase.Click += new System.EventHandler(this.toolStripBtnErase_Click); // - // toolStripBtnEyeDrop + // toolStripBtnDropper // - this.toolStripBtnEyeDrop.DisplayStyle = System.Windows.Forms.ToolStripItemDisplayStyle.Image; - this.toolStripBtnEyeDrop.Enabled = false; - this.toolStripBtnEyeDrop.ForeColor = System.Drawing.Color.FromArgb(((int)(((byte)(220)))), ((int)(((byte)(220)))), ((int)(((byte)(220))))); - this.toolStripBtnEyeDrop.Image = ((System.Drawing.Image)(resources.GetObject("toolStripBtnEyeDrop.Image"))); - this.toolStripBtnEyeDrop.ImageTransparentColor = System.Drawing.Color.Magenta; - this.toolStripBtnEyeDrop.Name = "toolStripBtnEyeDrop"; - this.toolStripBtnEyeDrop.Size = new System.Drawing.Size(23, 22); - this.toolStripBtnEyeDrop.Text = "Eye Drop Tool"; - this.toolStripBtnEyeDrop.Click += new System.EventHandler(this.toolStripBtnEyeDrop_Click); + this.toolStripBtnDropper.DisplayStyle = System.Windows.Forms.ToolStripItemDisplayStyle.Image; + this.toolStripBtnDropper.Enabled = false; + this.toolStripBtnDropper.ForeColor = System.Drawing.Color.FromArgb(((int)(((byte)(220)))), ((int)(((byte)(220)))), ((int)(((byte)(220))))); + this.toolStripBtnDropper.Image = ((System.Drawing.Image)(resources.GetObject("toolStripBtnDropper.Image"))); + this.toolStripBtnDropper.ImageTransparentColor = System.Drawing.Color.Magenta; + this.toolStripBtnDropper.Name = "toolStripBtnDropper"; + this.toolStripBtnDropper.Size = new System.Drawing.Size(23, 22); + this.toolStripBtnDropper.Text = "Dropper"; + this.toolStripBtnDropper.Click += new System.EventHandler(this.toolStripBtnDropper_Click); // // toolStripSeparator5 // @@ -524,7 +524,7 @@ private void InitializeComponent() this.toolStripSeparator5, this.toolStripBtnFill, this.toolStripBtnErase, - this.toolStripBtnEyeDrop, + this.toolStripBtnDropper, this.toolStripSeparator6, this.toolStripTimeButton, this.toolStripSeparator13, @@ -1035,7 +1035,6 @@ private void InitializeComponent() } #endregion - private System.Windows.Forms.ToolStripMenuItem hihiToolStripMenuItem; private DarkStatusStrip statusStrip1; public ToolStripStatusLabel toolStripLabelCoords; private ToolStripSeparator toolStripSeparator7; @@ -1061,7 +1060,7 @@ private void InitializeComponent() private ToolStripSeparator toolStripSeparator4; public ToolStripButton toolStripBtnFill; public ToolStripButton toolStripBtnErase; - private ToolStripButton toolStripBtnEyeDrop; + private ToolStripButton toolStripBtnDropper; private ToolStripSeparator toolStripSeparator5; private ToolStripDropDownButton toolStripTimeButton; private ToolStripSeparator toolStripSeparator6; diff --git a/Intersect.Editor/Forms/frmMain.cs b/Intersect.Editor/Forms/frmMain.cs index b2b9d30b0c..100f9de2dc 100644 --- a/Intersect.Editor/Forms/frmMain.cs +++ b/Intersect.Editor/Forms/frmMain.cs @@ -241,7 +241,7 @@ private void InitLocalizationToolstrip() toolStripBtnFill.Text = Strings.MainForm.Fill; toolStripBtnErase.Text = Strings.MainForm.Erase; - toolStripBtnEyeDrop.Text = Strings.MainForm.EyeDroppler; + toolStripBtnDropper.Text = Strings.MainForm.Dropper; toolStripTimeButton.Text = Strings.MainForm.lighting; @@ -347,36 +347,36 @@ private void FrmMain_KeyDown(object sender, KeyEventArgs e) break; // Shortcuts: Map grid Tools. - case Keys.B: // Brush Tool. + case Keys.B: // Brush. toolStripBtnBrush_Click(null, null); break; - case Keys.M: // Marquee Selection Tool. + case Keys.M: // Marquee Selection. toolStripBtnSelect_Click(null, null); break; - case Keys.R: // Rectangle Fill Tool. + case Keys.R: // Rectangle. toolStripBtnRect_Click(null, null); break; - case Keys.PageUp: // Vertical Flip Selection Tool. + case Keys.PageUp: // Vertical Flip Selection. toolStripBtnFlipVertical_Click(null, null); break; - case Keys.PageDown: // Horizontal Flip Selection Tool. + case Keys.PageDown: // Horizontal Flip Selection. toolStripBtnFlipHorizontal_Click(null, null); break; - case Keys.F: // Fill Layer Tool. + case Keys.F: // Fill Tool. toolStripBtnFill_Click(null, null); break; - case Keys.E: // Erase Tool. + case Keys.E: // Erase. toolStripBtnErase_Click(null, null); break; - case Keys.I: // Eyedropper Tool. - toolStripBtnEyeDrop_Click(null, null); + case Keys.I: // Dropper Tool. + toolStripBtnDropper_Click(null, null); break; case Keys.Delete: // Delete Selection. @@ -615,7 +615,7 @@ public void Update() toolStripBtnBrush.Enabled = false; toolStripBtnSelect.Enabled = true; toolStripBtnRect.Enabled = false; - toolStripBtnEyeDrop.Enabled = false; + toolStripBtnDropper.Enabled = false; if (Globals.CurrentLayer == LayerOptions.Attributes) { toolStripBtnBrush.Enabled = true; @@ -623,26 +623,26 @@ public void Update() } else if (Globals.CurrentLayer == LayerOptions.Lights) { - Globals.CurrentTool = (int) EditingTool.Selection; + Globals.CurrentTool = EditingTool.Selection; } else if (Globals.CurrentLayer == LayerOptions.Events) { - Globals.CurrentTool = (int) EditingTool.Selection; + Globals.CurrentTool = EditingTool.Selection; } else if (Globals.CurrentLayer == LayerOptions.Npcs) { - Globals.CurrentTool = (int) EditingTool.Selection; + Globals.CurrentTool = EditingTool.Selection; } else { toolStripBtnBrush.Enabled = true; toolStripBtnRect.Enabled = true; - toolStripBtnEyeDrop.Enabled = true; + toolStripBtnDropper.Enabled = true; } switch (Globals.CurrentTool) { - case (int) EditingTool.Brush: + case EditingTool.Brush: if (!toolStripBtnBrush.Checked) { toolStripBtnBrush.Checked = true; @@ -668,9 +668,9 @@ public void Update() toolStripBtnErase.Checked = false; } - if (toolStripBtnEyeDrop.Checked) + if (toolStripBtnDropper.Checked) { - toolStripBtnEyeDrop.Checked = false; + toolStripBtnDropper.Checked = false; } if (toolStripBtnCut.Enabled) @@ -694,7 +694,7 @@ public void Update() } break; - case (int) EditingTool.Selection: + case EditingTool.Selection: if (toolStripBtnBrush.Checked) { toolStripBtnBrush.Checked = false; @@ -720,9 +720,9 @@ public void Update() toolStripBtnErase.Checked = false; } - if (toolStripBtnEyeDrop.Checked) + if (toolStripBtnDropper.Checked) { - toolStripBtnEyeDrop.Checked = false; + toolStripBtnDropper.Checked = false; } if (!toolStripBtnCut.Enabled) @@ -746,7 +746,7 @@ public void Update() } break; - case (int) EditingTool.Rectangle: + case EditingTool.Rectangle: if (toolStripBtnBrush.Checked) { toolStripBtnBrush.Checked = false; @@ -772,9 +772,9 @@ public void Update() toolStripBtnErase.Checked = false; } - if (toolStripBtnEyeDrop.Checked) + if (toolStripBtnDropper.Checked) { - toolStripBtnEyeDrop.Checked = false; + toolStripBtnDropper.Checked = false; } if (toolStripBtnCut.Enabled) @@ -798,7 +798,7 @@ public void Update() } break; - case (int) EditingTool.Fill: + case EditingTool.Fill: if (toolStripBtnBrush.Checked) { toolStripBtnBrush.Checked = false; @@ -824,9 +824,9 @@ public void Update() toolStripBtnErase.Checked = false; } - if (toolStripBtnEyeDrop.Checked) + if (toolStripBtnDropper.Checked) { - toolStripBtnEyeDrop.Checked = false; + toolStripBtnDropper.Checked = false; } if (toolStripBtnCut.Enabled) @@ -850,7 +850,7 @@ public void Update() } break; - case (int) EditingTool.Erase: + case EditingTool.Erase: if (toolStripBtnBrush.Checked) { toolStripBtnBrush.Checked = false; @@ -876,9 +876,9 @@ public void Update() toolStripBtnErase.Checked = true; } - if (toolStripBtnEyeDrop.Checked) + if (toolStripBtnDropper.Checked) { - toolStripBtnEyeDrop.Checked = false; + toolStripBtnDropper.Checked = false; } if (toolStripBtnCut.Enabled) @@ -902,7 +902,7 @@ public void Update() } break; - case (int) EditingTool.Droppler: + case EditingTool.Dropper: if (toolStripBtnBrush.Checked) { toolStripBtnBrush.Checked = false; @@ -928,9 +928,9 @@ public void Update() toolStripBtnErase.Checked = false; } - if (!toolStripBtnEyeDrop.Checked) + if (!toolStripBtnDropper.Checked) { - toolStripBtnEyeDrop.Checked = true; + toolStripBtnDropper.Checked = true; } if (toolStripBtnCut.Enabled) @@ -1032,7 +1032,7 @@ private void saveMapToolStripMenuItem_Click(object sender, EventArgs e) private static void SaveMap() { - if (Globals.CurrentTool == (int) EditingTool.Selection) + if (Globals.CurrentTool == EditingTool.Selection) { if (Globals.Dragging) { @@ -1387,12 +1387,12 @@ private void toolStripBtnRedo_Click(object sender, EventArgs e) private void toolStripBtnFill_Click(object sender, EventArgs e) { - Globals.CurrentTool = (int) EditingTool.Fill; + Globals.CurrentTool = EditingTool.Fill; } private void toolStripBtnErase_Click(object sender, EventArgs e) { - Globals.CurrentTool = (int) EditingTool.Erase; + Globals.CurrentTool = EditingTool.Erase; } private void toolStripBtnScreenshot_Click(object sender, EventArgs e) @@ -1417,31 +1417,37 @@ private void toolStripBtnScreenshot_Click(object sender, EventArgs e) private void toolStripBtnBrush_Click(object sender, EventArgs e) { - Globals.CurrentTool = (int) EditingTool.Brush; + Globals.CurrentTool = EditingTool.Brush; } private void toolStripBtnSelect_Click(object sender, EventArgs e) { - Globals.CurrentTool = (int) EditingTool.Selection; + Globals.CurrentTool = EditingTool.Selection; + Globals.CurMapSelX = 0; + Globals.CurMapSelY = 0; + Globals.CurMapSelW = 0; + Globals.CurMapSelH = 0; } private void toolStripBtnRect_Click(object sender, EventArgs e) { - Globals.CurrentTool = (int) EditingTool.Rectangle; + Globals.CurrentTool = EditingTool.Rectangle; Globals.CurMapSelX = 0; Globals.CurMapSelY = 0; + Globals.CurMapSelW = 0; + Globals.CurMapSelH = 0; } - private void toolStripBtnEyeDrop_Click(object sender, EventArgs e) + private void toolStripBtnDropper_Click(object sender, EventArgs e) { - Globals.CurrentTool = (int) EditingTool.Droppler; + Globals.CurrentTool = EditingTool.Dropper; Globals.CurMapSelX = 0; Globals.CurMapSelY = 0; } private void toolStripBtnCopy_Click(object sender, EventArgs e) { - if (Globals.CurrentTool != (int) EditingTool.Selection) + if (Globals.CurrentTool != EditingTool.Selection) { return; } @@ -1461,7 +1467,7 @@ private void toolStripBtnPaste_Click(object sender, EventArgs e) private void toolStripBtnCut_Click(object sender, EventArgs e) { - if (Globals.CurrentTool != (int) EditingTool.Selection) + if (Globals.CurrentTool != EditingTool.Selection) { return; } @@ -1471,7 +1477,7 @@ private void toolStripBtnCut_Click(object sender, EventArgs e) private static void ToolKeyDelete() { - if (Globals.CurrentTool != (int)EditingTool.Selection) + if (Globals.CurrentTool != EditingTool.Selection) { return; } diff --git a/Intersect.Editor/Forms/frmMain.resx b/Intersect.Editor/Forms/frmMain.resx index 9f1b1cfd79..08625284e0 100644 --- a/Intersect.Editor/Forms/frmMain.resx +++ b/Intersect.Editor/Forms/frmMain.resx @@ -179,45 +179,50 @@ iVBORw0KGgoAAAANSUhEUgAAABAAAAAQCAYAAAAf8/9hAAAAAXNSR0IArs4c6QAAAARnQU1BAACxjwv8 - YQUAAAAJcEhZcwAADsMAAA7DAcdvqGQAAAHBSURBVDhPjVJNSwJhEN4ygiIKgi7VqfoBUfYfomsfEAVB - dYiuWmQfdOjQKbwUeMjMoo9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R7sT97+TChTtlyIxpoGAbX9KF + 2N+ScQ/4HIOg1vqO8PceFlt02AM6whVf32i8GANcnTHczp8Dx2cMTojZx6BY7AHgmk+BFT6gZWv85uoM + P1cxV9bssmTjs29TOAYbQCoGRZwrFQsi4VNQKQ9dv0QWVSbdNgAAAABJRU5ErkJggg== diff --git a/Intersect.Editor/Forms/frmOptions.Designer.cs b/Intersect.Editor/Forms/frmOptions.Designer.cs index 86a3b3c5ca..90bab5c8de 100644 --- a/Intersect.Editor/Forms/frmOptions.Designer.cs +++ b/Intersect.Editor/Forms/frmOptions.Designer.cs @@ -35,6 +35,7 @@ private void InitializeComponent() this.chkSuppressTilesetWarning = new DarkUI.Controls.DarkCheckBox(); this.btnGeneralOptions = new DarkUI.Controls.DarkButton(); this.pnlGeneral = new System.Windows.Forms.Panel(); + this.chkCursorSprites = new DarkUI.Controls.DarkCheckBox(); this.grpClientPath = new DarkUI.Controls.DarkGroupBox(); this.btnUpdateOptions = new DarkUI.Controls.DarkButton(); this.pnlUpdate = new System.Windows.Forms.Panel(); @@ -77,7 +78,7 @@ private void InitializeComponent() // // chkSuppressTilesetWarning // - this.chkSuppressTilesetWarning.Location = new System.Drawing.Point(8, 5); + this.chkSuppressTilesetWarning.Location = new System.Drawing.Point(8, 16); this.chkSuppressTilesetWarning.Name = "chkSuppressTilesetWarning"; this.chkSuppressTilesetWarning.Size = new System.Drawing.Size(332, 17); this.chkSuppressTilesetWarning.TabIndex = 0; @@ -96,17 +97,24 @@ private void InitializeComponent() // // pnlGeneral // - this.pnlGeneral.Anchor = ((System.Windows.Forms.AnchorStyles)((((System.Windows.Forms.AnchorStyles.Top | System.Windows.Forms.AnchorStyles.Bottom) - | System.Windows.Forms.AnchorStyles.Left) - | System.Windows.Forms.AnchorStyles.Right))); + this.pnlGeneral.Anchor = ((System.Windows.Forms.AnchorStyles)((((System.Windows.Forms.AnchorStyles.Top | System.Windows.Forms.AnchorStyles.Bottom) | System.Windows.Forms.AnchorStyles.Left) | System.Windows.Forms.AnchorStyles.Right))); this.pnlGeneral.BorderStyle = System.Windows.Forms.BorderStyle.FixedSingle; + this.pnlGeneral.Controls.Add(this.chkCursorSprites); this.pnlGeneral.Controls.Add(this.chkSuppressTilesetWarning); this.pnlGeneral.Controls.Add(this.grpClientPath); this.pnlGeneral.Location = new System.Drawing.Point(4, 26); this.pnlGeneral.Name = "pnlGeneral"; - this.pnlGeneral.Size = new System.Drawing.Size(357, 149); + this.pnlGeneral.Size = new System.Drawing.Size(357, 163); this.pnlGeneral.TabIndex = 20; // + // chkCursorSprites + // + this.chkCursorSprites.Location = new System.Drawing.Point(8, 39); + this.chkCursorSprites.Name = "chkCursorSprites"; + this.chkCursorSprites.Size = new System.Drawing.Size(332, 17); + this.chkCursorSprites.TabIndex = 5; + this.chkCursorSprites.Text = "Enable cursor sprites for map tools"; + // // grpClientPath // this.grpClientPath.BackColor = System.Drawing.Color.FromArgb(((int)(((byte)(45)))), ((int)(((byte)(45)))), ((int)(((byte)(48))))); @@ -114,7 +122,7 @@ private void InitializeComponent() this.grpClientPath.Controls.Add(this.btnBrowseClient); this.grpClientPath.Controls.Add(this.txtGamePath); this.grpClientPath.ForeColor = System.Drawing.Color.Gainsboro; - this.grpClientPath.Location = new System.Drawing.Point(8, 29); + this.grpClientPath.Location = new System.Drawing.Point(8, 73); this.grpClientPath.Name = "grpClientPath"; this.grpClientPath.Size = new System.Drawing.Size(332, 45); this.grpClientPath.TabIndex = 3; @@ -134,15 +142,13 @@ private void InitializeComponent() // // pnlUpdate // - this.pnlUpdate.Anchor = ((System.Windows.Forms.AnchorStyles)((((System.Windows.Forms.AnchorStyles.Top | System.Windows.Forms.AnchorStyles.Bottom) - | System.Windows.Forms.AnchorStyles.Left) - | System.Windows.Forms.AnchorStyles.Right))); + this.pnlUpdate.Anchor = ((System.Windows.Forms.AnchorStyles)((((System.Windows.Forms.AnchorStyles.Top | System.Windows.Forms.AnchorStyles.Bottom) | System.Windows.Forms.AnchorStyles.Left) | System.Windows.Forms.AnchorStyles.Right))); this.pnlUpdate.BorderStyle = System.Windows.Forms.BorderStyle.FixedSingle; this.pnlUpdate.Controls.Add(this.grpAssetPackingOptions); this.pnlUpdate.Controls.Add(this.chkPackageAssets); this.pnlUpdate.Location = new System.Drawing.Point(4, 26); this.pnlUpdate.Name = "pnlUpdate"; - this.pnlUpdate.Size = new System.Drawing.Size(357, 149); + this.pnlUpdate.Size = new System.Drawing.Size(357, 163); this.pnlUpdate.TabIndex = 22; // // grpAssetPackingOptions @@ -156,9 +162,9 @@ private void InitializeComponent() this.grpAssetPackingOptions.Controls.Add(this.lblMusicBatch); this.grpAssetPackingOptions.Controls.Add(this.lblSoundBatch); this.grpAssetPackingOptions.ForeColor = System.Drawing.Color.Gainsboro; - this.grpAssetPackingOptions.Location = new System.Drawing.Point(14, 29); + this.grpAssetPackingOptions.Location = new System.Drawing.Point(8, 48); this.grpAssetPackingOptions.Name = "grpAssetPackingOptions"; - this.grpAssetPackingOptions.Size = new System.Drawing.Size(332, 112); + this.grpAssetPackingOptions.Size = new System.Drawing.Size(332, 101); this.grpAssetPackingOptions.TabIndex = 4; this.grpAssetPackingOptions.TabStop = false; this.grpAssetPackingOptions.Text = "Asset Packing Options"; @@ -176,15 +182,8 @@ private void InitializeComponent() this.cmbTextureSize.FlatStyle = System.Windows.Forms.FlatStyle.Flat; this.cmbTextureSize.ForeColor = System.Drawing.Color.Gainsboro; this.cmbTextureSize.FormattingEnabled = true; - this.cmbTextureSize.Items.AddRange(new object[] { - "1", - "256", - "512", - "1024", - "2048", - "4096", - "8192"}); - this.cmbTextureSize.Location = new System.Drawing.Point(261, 14); + this.cmbTextureSize.Items.AddRange(new object[] { "1", "256", "512", "1024", "2048", "4096", "8192" }); + this.cmbTextureSize.Location = new System.Drawing.Point(261, 20); this.cmbTextureSize.Name = "cmbTextureSize"; this.cmbTextureSize.Size = new System.Drawing.Size(59, 21); this.cmbTextureSize.TabIndex = 52; @@ -195,7 +194,7 @@ private void InitializeComponent() // this.lblTextureSize.AutoSize = true; this.lblTextureSize.ForeColor = System.Drawing.Color.White; - this.lblTextureSize.Location = new System.Drawing.Point(6, 20); + this.lblTextureSize.Location = new System.Drawing.Point(6, 26); this.lblTextureSize.Name = "lblTextureSize"; this.lblTextureSize.Size = new System.Drawing.Size(179, 13); this.lblTextureSize.TabIndex = 51; @@ -205,56 +204,32 @@ private void InitializeComponent() // this.nudMusicBatch.BackColor = System.Drawing.Color.FromArgb(((int)(((byte)(69)))), ((int)(((byte)(73)))), ((int)(((byte)(74))))); this.nudMusicBatch.ForeColor = System.Drawing.Color.Gainsboro; - this.nudMusicBatch.Location = new System.Drawing.Point(261, 41); - this.nudMusicBatch.Maximum = new decimal(new int[] { - 999999999, - 0, - 0, - 0}); - this.nudMusicBatch.Minimum = new decimal(new int[] { - 1, - 0, - 0, - 0}); + this.nudMusicBatch.Location = new System.Drawing.Point(261, 47); + this.nudMusicBatch.Maximum = new decimal(new int[] { 999999999, 0, 0, 0 }); + this.nudMusicBatch.Minimum = new decimal(new int[] { 1, 0, 0, 0 }); this.nudMusicBatch.Name = "nudMusicBatch"; this.nudMusicBatch.Size = new System.Drawing.Size(59, 20); this.nudMusicBatch.TabIndex = 50; - this.nudMusicBatch.Value = new decimal(new int[] { - 8, - 0, - 0, - 0}); + this.nudMusicBatch.Value = new decimal(new int[] { 8, 0, 0, 0 }); // // nudSoundBatch // this.nudSoundBatch.BackColor = System.Drawing.Color.FromArgb(((int)(((byte)(69)))), ((int)(((byte)(73)))), ((int)(((byte)(74))))); this.nudSoundBatch.ForeColor = System.Drawing.Color.Gainsboro; - this.nudSoundBatch.Location = new System.Drawing.Point(261, 67); - this.nudSoundBatch.Maximum = new decimal(new int[] { - 999999999, - 0, - 0, - 0}); - this.nudSoundBatch.Minimum = new decimal(new int[] { - 1, - 0, - 0, - 0}); + this.nudSoundBatch.Location = new System.Drawing.Point(261, 73); + this.nudSoundBatch.Maximum = new decimal(new int[] { 999999999, 0, 0, 0 }); + this.nudSoundBatch.Minimum = new decimal(new int[] { 1, 0, 0, 0 }); this.nudSoundBatch.Name = "nudSoundBatch"; this.nudSoundBatch.Size = new System.Drawing.Size(59, 20); this.nudSoundBatch.TabIndex = 49; - this.nudSoundBatch.Value = new decimal(new int[] { - 8, - 0, - 0, - 0}); + this.nudSoundBatch.Value = new decimal(new int[] { 8, 0, 0, 0 }); this.nudSoundBatch.ValueChanged += new System.EventHandler(this.nudSoundBatch_ValueChanged); // // lblMusicBatch // this.lblMusicBatch.AutoSize = true; this.lblMusicBatch.ForeColor = System.Drawing.Color.White; - this.lblMusicBatch.Location = new System.Drawing.Point(6, 43); + this.lblMusicBatch.Location = new System.Drawing.Point(6, 49); this.lblMusicBatch.Name = "lblMusicBatch"; this.lblMusicBatch.Size = new System.Drawing.Size(137, 13); this.lblMusicBatch.TabIndex = 8; @@ -264,7 +239,7 @@ private void InitializeComponent() // this.lblSoundBatch.AutoSize = true; this.lblSoundBatch.ForeColor = System.Drawing.Color.White; - this.lblSoundBatch.Location = new System.Drawing.Point(6, 69); + this.lblSoundBatch.Location = new System.Drawing.Point(6, 75); this.lblSoundBatch.Name = "lblSoundBatch"; this.lblSoundBatch.Size = new System.Drawing.Size(140, 13); this.lblSoundBatch.TabIndex = 7; @@ -272,7 +247,7 @@ private void InitializeComponent() // // chkPackageAssets // - this.chkPackageAssets.Location = new System.Drawing.Point(14, 5); + this.chkPackageAssets.Location = new System.Drawing.Point(8, 15); this.chkPackageAssets.Name = "chkPackageAssets"; this.chkPackageAssets.Size = new System.Drawing.Size(332, 17); this.chkPackageAssets.TabIndex = 1; @@ -283,9 +258,9 @@ private void InitializeComponent() this.AutoScaleDimensions = new System.Drawing.SizeF(6F, 13F); this.AutoScaleMode = System.Windows.Forms.AutoScaleMode.Font; this.BackColor = System.Drawing.Color.FromArgb(((int)(((byte)(45)))), ((int)(((byte)(45)))), ((int)(((byte)(48))))); - this.ClientSize = new System.Drawing.Size(373, 180); - this.Controls.Add(this.pnlUpdate); + this.ClientSize = new System.Drawing.Size(373, 194); this.Controls.Add(this.btnUpdateOptions); + this.Controls.Add(this.pnlUpdate); this.Controls.Add(this.pnlGeneral); this.Controls.Add(this.btnGeneralOptions); this.FormBorderStyle = System.Windows.Forms.FormBorderStyle.FixedSingle; @@ -302,25 +277,26 @@ private void InitializeComponent() ((System.ComponentModel.ISupportInitialize)(this.nudMusicBatch)).EndInit(); ((System.ComponentModel.ISupportInitialize)(this.nudSoundBatch)).EndInit(); this.ResumeLayout(false); - } + private DarkUI.Controls.DarkCheckBox chkCursorSprites; + #endregion private DarkTextBox txtGamePath; private DarkButton btnBrowseClient; - private DarkCheckBox chkSuppressTilesetWarning; + private DarkUI.Controls.DarkCheckBox chkSuppressTilesetWarning; private DarkUI.Controls.DarkButton btnGeneralOptions; private System.Windows.Forms.Panel pnlGeneral; - private DarkGroupBox grpClientPath; + private DarkUI.Controls.DarkGroupBox grpClientPath; private DarkButton btnUpdateOptions; private System.Windows.Forms.Panel pnlUpdate; - private DarkCheckBox chkPackageAssets; - private DarkGroupBox grpAssetPackingOptions; + private DarkUI.Controls.DarkCheckBox chkPackageAssets; + private DarkUI.Controls.DarkGroupBox grpAssetPackingOptions; private System.Windows.Forms.Label lblMusicBatch; private System.Windows.Forms.Label lblSoundBatch; - private DarkNumericUpDown nudMusicBatch; - private DarkNumericUpDown nudSoundBatch; + private DarkUI.Controls.DarkNumericUpDown nudMusicBatch; + private DarkUI.Controls.DarkNumericUpDown nudSoundBatch; private System.Windows.Forms.Label lblTextureSize; - private DarkComboBox cmbTextureSize; + private DarkUI.Controls.DarkComboBox cmbTextureSize; } } \ No newline at end of file diff --git a/Intersect.Editor/Forms/frmOptions.cs b/Intersect.Editor/Forms/frmOptions.cs index 03c22897a9..975afd02b0 100644 --- a/Intersect.Editor/Forms/frmOptions.cs +++ b/Intersect.Editor/Forms/frmOptions.cs @@ -28,6 +28,8 @@ private void InitForm() // Load settings for the General tab var suppressTilesetWarning = Preferences.LoadPreference("SuppressTextureWarning"); + var enableCursorSprites = Preferences.LoadPreference("EnableCursorSprites"); + if (suppressTilesetWarning == "") { chkSuppressTilesetWarning.Checked = false; @@ -37,6 +39,9 @@ private void InitForm() chkSuppressTilesetWarning.Checked = Convert.ToBoolean(suppressTilesetWarning); } + chkCursorSprites.Checked = !string.IsNullOrEmpty(enableCursorSprites) && + Convert.ToBoolean(enableCursorSprites); + txtGamePath.Text = Preferences.LoadPreference("ClientPath"); // Load settings for the Update tab @@ -78,6 +83,7 @@ private void InitLocalization() Text = Strings.Options.title; btnGeneralOptions.Text = Strings.Options.generaltab.ToString(Application.ProductVersion); chkSuppressTilesetWarning.Text = Strings.Options.tilesetwarning; + chkCursorSprites.Text = Strings.Options.CursorSprites; grpClientPath.Text = Strings.Options.pathgroup; btnBrowseClient.Text = Strings.Options.browsebtn; btnUpdateOptions.Text = Strings.Options.UpdateTab; @@ -91,6 +97,7 @@ private void InitLocalization() private void frmOptions_FormClosing(object sender, FormClosingEventArgs e) { Preferences.SavePreference("SuppressTextureWarning", chkSuppressTilesetWarning.Checked.ToString()); + Preferences.SavePreference("EnableCursorSprites", chkCursorSprites.Checked.ToString()); Preferences.SavePreference("ClientPath", txtGamePath.Text); Preferences.SavePreference("PackageUpdateAssets", chkPackageAssets.Checked.ToString()); Preferences.SavePreference("SoundPackSize", nudSoundBatch.Value.ToString(CultureInfo.InvariantCulture)); diff --git a/Intersect.Editor/General/Enums.cs b/Intersect.Editor/General/Enums.cs index 9d93a3550f..946071687d 100644 --- a/Intersect.Editor/General/Enums.cs +++ b/Intersect.Editor/General/Enums.cs @@ -56,7 +56,7 @@ public enum EditingTool Erase = 4, - Droppler = 5, + Dropper = 5, } diff --git a/Intersect.Editor/General/Globals.cs b/Intersect.Editor/General/Globals.cs index dde071ee51..54d394a176 100644 --- a/Intersect.Editor/General/Globals.cs +++ b/Intersect.Editor/General/Globals.cs @@ -53,7 +53,7 @@ public static partial class Globals public static TilesetBase CurrentTileset = null; - public static int CurrentTool = (int) EditingTool.Brush; + public static EditingTool CurrentTool = EditingTool.Brush; public static int CurSelH; @@ -134,7 +134,7 @@ public static partial class Globals //Game Object Editors public static FrmResource ResourceEditor; - public static int SavedTool = (int) EditingTool.Brush; + public static EditingTool SavedTool = EditingTool.Brush; public static bool SavingOnClose; diff --git a/Intersect.Editor/Localization/Strings.cs b/Intersect.Editor/Localization/Strings.cs index 85558fd165..524714101d 100644 --- a/Intersect.Editor/Localization/Strings.cs +++ b/Intersect.Editor/Localization/Strings.cs @@ -3881,14 +3881,14 @@ public partial struct MainForm public static LocalizedString darkness = @"Darkness"; [JsonProperty(NullValueHandling = NullValueHandling.Ignore)] - public static LocalizedString EyeDroppler = @"Eyedropper Tool (I)"; + public static LocalizedString Dropper = @"Dropper (I)"; public static LocalizedString edit = @"Edit"; public static LocalizedString editors = @"Game Editors"; [JsonProperty(NullValueHandling = NullValueHandling.Ignore)] - public static LocalizedString Erase = @"Erase Tool (E)"; + public static LocalizedString Erase = @"Erase (E)"; public static LocalizedString exit = @"Exit"; @@ -3897,7 +3897,7 @@ public partial struct MainForm public static LocalizedString file = @"File"; [JsonProperty(NullValueHandling = NullValueHandling.Ignore)] - public static LocalizedString Fill = @"Fill Layer Tool (F)"; + public static LocalizedString Fill = @"Fill (F)"; public static LocalizedString fog = @"Fog"; @@ -3927,7 +3927,7 @@ public partial struct MainForm public static LocalizedString Paste = @"Paste (Ctrl + V)"; [JsonProperty(NullValueHandling = NullValueHandling.Ignore)] - public static LocalizedString Brush = @"Brush Tool (B)"; + public static LocalizedString Brush = @"Brush (B)"; public static LocalizedString postquestion = @"Post Question"; @@ -3936,16 +3936,16 @@ public partial struct MainForm public static LocalizedString questeditor = @"Quest Editor"; [JsonProperty(NullValueHandling = NullValueHandling.Ignore)] - public static LocalizedString Rectangle = @"Rectangle Fill Tool (R)"; + public static LocalizedString Rectangle = @"Rectangle Fill (R)"; [JsonProperty(NullValueHandling = NullValueHandling.Ignore)] public static LocalizedString Redo = @"Redo (Ctrl + Y)"; [JsonProperty(NullValueHandling = NullValueHandling.Ignore)] - public static LocalizedString FlipHorizontal = @"Horizontal Flip Selection Tool (PageDown)"; + public static LocalizedString FlipHorizontal = @"Horizontal Flip Selection (PageDown)"; [JsonProperty(NullValueHandling = NullValueHandling.Ignore)] - public static LocalizedString FlipVertical = @"Vertical Flip Selection Tool (PageUp)"; + public static LocalizedString FlipVertical = @"Vertical Flip Selection (PageUp)"; public static LocalizedString reportbug = @"Report Bug"; @@ -3966,7 +3966,7 @@ public partial struct MainForm public static LocalizedString screenshot = @"Screenshot Map"; [JsonProperty(NullValueHandling = NullValueHandling.Ignore)] - public static LocalizedString Selection = @"Marquee Selection Tool (M)"; + public static LocalizedString Selection = @"Marquee Selection (M)"; public static LocalizedString selectlayers = @"Select..."; @@ -4531,6 +4531,9 @@ public partial struct Options [JsonProperty(NullValueHandling = NullValueHandling.Ignore)] public static LocalizedString TextureSize = @"Max Texture Pack Size (Resolution):"; + + [JsonProperty(NullValueHandling = NullValueHandling.Ignore)] + public static LocalizedString CursorSprites = @"Enable cursor sprites for map tools."; } public partial struct ProgressForm diff --git a/Intersect.Editor/Maps/MapGrid.cs b/Intersect.Editor/Maps/MapGrid.cs index 870cfe2e76..d8195cbf95 100644 --- a/Intersect.Editor/Maps/MapGrid.cs +++ b/Intersect.Editor/Maps/MapGrid.cs @@ -242,7 +242,7 @@ public void DoubleClick(int x, int y) private void SaveMap() { - if (Globals.CurrentTool == (int) EditingTool.Selection) + if (Globals.CurrentTool == EditingTool.Selection) { if (Globals.Dragging == true) { diff --git a/Intersect.Editor/Properties/Resources.Designer.cs b/Intersect.Editor/Properties/Resources.Designer.cs index 90061fe425..f1a1ed7f93 100644 --- a/Intersect.Editor/Properties/Resources.Designer.cs +++ b/Intersect.Editor/Properties/Resources.Designer.cs @@ -1,7 +1,6 @@ //------------------------------------------------------------------------------ // // This code was generated by a tool. -// Runtime Version:4.0.30319.42000 // // Changes to this file may cause incorrect behavior and will be lost if // the code is regenerated. @@ -109,15 +108,5 @@ internal static System.Drawing.Bitmap layer_sel { return ((System.Drawing.Bitmap)(obj)); } } - - /// - /// Looks up a localized resource of type System.Drawing.Bitmap. - /// - internal static System.Drawing.Bitmap paintbrush { - get { - object obj = ResourceManager.GetObject("paintbrush", resourceCulture); - return ((System.Drawing.Bitmap)(obj)); - } - } } } diff --git a/Intersect.Editor/Properties/Resources.resx b/Intersect.Editor/Properties/Resources.resx index 04d4de5412..6fc6d4a2a7 100644 --- a/Intersect.Editor/Properties/Resources.resx +++ b/Intersect.Editor/Properties/Resources.resx @@ -133,7 +133,4 @@ ..\Resources\layer_sel.png;System.Drawing.Bitmap, System.Drawing, Version=4.0.0.0, Culture=neutral, PublicKeyToken=b03f5f7f11d50a3a - - ..\Resources\paintbrush.png;System.Drawing.Bitmap, System.Drawing, Version=4.0.0.0, Culture=neutral, PublicKeyToken=b03f5f7f11d50a3a - \ No newline at end of file diff --git a/Intersect.Editor/Resources/paintbrush.png b/Intersect.Editor/Resources/paintbrush.png deleted file mode 100644 index 0bcac5c0a9f099c41c773da9d4e3382fda7949d9..0000000000000000000000000000000000000000 GIT binary patch literal 0 HcmV?d00001 literal 410 zcmV;L0cHM)P)Px$R7pfZR49>s(n}~rQ5eAS|GBO*li3(4$zn?Gq}kZ9L9vmwl4PS8Qy#^}V-!hI zN>i?~QIjMqyIEL@4I9yPZ>A|L5|Y;l76V$1llKh)r|cuYGITb8z}I%|vLJf_c64#bw- zbzi@mQLaLsKab=Y-^_H!6aK{A)ybY{v7z*@kfq! z-JYpD(k(IT=}vpE-k#LwO?AvQ6}l`0psZi3;#WWKU%c~@v^tP}=Kufz07*qoM6N<$ Ef+!2S0{{R3