Skip to content

Commit da332b3

Browse files
committed
Move camera instead of dragging minimap window when dragging on minimap, unless the window is dragged from the toolbar
1 parent 80f68ca commit da332b3

1 file changed

Lines changed: 4 additions & 1 deletion

File tree

src/TSMapEditor/UI/Windows/MegamapWindow.cs

Lines changed: 4 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -230,16 +230,19 @@ public override void Update(GameTime gameTime)
230230
{
231231
Enabled = false;
232232
WindowManager.RemoveControl(this);
233+
return;
233234
}
234235

235236
if (GetActiveChild() == null)
236237
{
237238
if (IsActive && Cursor.LeftDown)
238239
{
239240
if (!wasLeftDown)
241+
{
242+
CanBeMoved = enableToolbar && GetCursorPoint().Y < textureDrawRectangle.Y;
240243
oldWindowPosition = new Point2D(X, Y);
244+
}
241245

242-
CanBeMoved = !Keyboard.IsShiftHeldDown();
243246
if (!CanBeMoved)
244247
MoveCamera();
245248

0 commit comments

Comments
 (0)