Skip to content

Commit

Permalink
Merge pull request #94 from arannya/unnofficial-fix-window-drag
Browse files Browse the repository at this point in the history
Fix window dragging issue in 1.6
  • Loading branch information
JoeStrout authored May 11, 2024
2 parents 8e77e16 + b433373 commit ec64c74
Showing 1 changed file with 3 additions and 2 deletions.
5 changes: 3 additions & 2 deletions Farmtronics/Bot/UIMenu.cs
Original file line number Diff line number Diff line change
Expand Up @@ -6,6 +6,7 @@ 2. The bot inventory
3. A MiniScript console.
*/

using System.Threading;
using Microsoft.Xna.Framework;
using Microsoft.Xna.Framework.Graphics;
using Microsoft.Xna.Framework.Input;
Expand Down Expand Up @@ -191,9 +192,9 @@ public override void performHoverAction(int x, int y) {
/// Return whether the given screen position is in our draggable area.
/// </summary>
bool inDragArea(int x, int y) {
// ModEntry.instance.Monitor.Log($"inDragArea: x={x} y={y}, in botInventoryBounds: {botInventoryBounds().Contains(x, y)}, in consoleBounds: {consoleBounds().Contains(x, y)}");
//ModEntry.instance.Monitor.Log($"inDragArea: x={x} y={y}, in botInventoryBounds: {botInventoryBounds().Contains(x, y)}, in consoleBounds: {consoleBounds().Contains(x, y)}");
if (botInventoryBounds().Contains(x,y)) return false;
if (consoleBounds().Contains(x,y)) return false;
if (consoleBounds().Contains(x+30,y-90)) return false;

var playerInv = inventory;
Rectangle invRect = new Rectangle(playerInv.xPositionOnScreen, playerInv.yPositionOnScreen, width, height);
Expand Down

0 comments on commit ec64c74

Please sign in to comment.