Skip to content

Commit

Permalink
Editor: in RoomEditor Alt + LMB selects the area regardless of tool
Browse files Browse the repository at this point in the history
  • Loading branch information
ivan-mogilko committed Nov 1, 2024
1 parent b56a84c commit b4a5886
Showing 1 changed file with 5 additions and 0 deletions.
Original file line number Diff line number Diff line change
Expand Up @@ -240,6 +240,9 @@ public virtual bool MouseDown(MouseEventArgs e, RoomEditorState state)

AreaDrawMode drawMode = Enabled ? _drawMode : AreaDrawMode.Select;

if ((e.Button == MouseButtons.Left) && (Control.ModifierKeys == Keys.Alt))
drawMode = AreaDrawMode.Select;

if (IsLocked(_selectedArea) && drawMode != AreaDrawMode.Select) return false;

if (drawMode == AreaDrawMode.Freehand)
Expand Down Expand Up @@ -591,6 +594,8 @@ public virtual Cursor GetCursor(int x, int y, RoomEditorState state)
{
if (_drawMode == AreaDrawMode.Select)
return _selectCursor;
if (Control.ModifierKeys == Keys.Alt)
return _selectCursor;
if (!IsLocked(_selectedArea))
return Cursors.Cross;
return RoomSettingsEditor.LockedCursor;
Expand Down

0 comments on commit b4a5886

Please sign in to comment.