private void ControlEvents_MouseChanged(object sender, StardewModdingAPI.Events.EventArgsMouseStateChanged e) { if (Game1.activeClickableMenu == null) { return; } var MouseState = Mouse.GetState(); if (Game1.activeClickableMenu is StardewValley.Menus.ItemGrabMenu && MouseState.LeftButton == ButtonState.Released) { (Game1.activeClickableMenu as StardewValley.Menus.ItemGrabMenu).ItemsToGrabMenu.populateClickableComponentList(); for (int index = 0; index < (Game1.activeClickableMenu as StardewValley.Menus.ItemGrabMenu).ItemsToGrabMenu.inventory.Count; ++index) { if ((Game1.activeClickableMenu as StardewValley.Menus.ItemGrabMenu).ItemsToGrabMenu.inventory[index] != null) { (Game1.activeClickableMenu as StardewValley.Menus.ItemGrabMenu).ItemsToGrabMenu.inventory[index].myID += 53910; (Game1.activeClickableMenu as StardewValley.Menus.ItemGrabMenu).ItemsToGrabMenu.inventory[index].upNeighborID += 53910; (Game1.activeClickableMenu as StardewValley.Menus.ItemGrabMenu).ItemsToGrabMenu.inventory[index].rightNeighborID += 53910; (Game1.activeClickableMenu as StardewValley.Menus.ItemGrabMenu).ItemsToGrabMenu.inventory[index].downNeighborID = -7777; (Game1.activeClickableMenu as StardewValley.Menus.ItemGrabMenu).ItemsToGrabMenu.inventory[index].leftNeighborID += 53910; (Game1.activeClickableMenu as StardewValley.Menus.ItemGrabMenu).ItemsToGrabMenu.inventory[index].fullyImmutable = true; } } // (Game1.activeClickableMenu as ItemGrabMenu).inventory.playerInventory = false; // Game1.activeClickableMenu =Game1.activeClickableMenu;//new ItemGrabMenu((Game1.activeClickableMenu as ItemGrabMenu).ItemsToGrabMenu.actualInventory,true,true,null,null,null,null,false,false,true,true,true,1,null,-1,null); } }
private void ControlEvents_MouseChanged(object sender, StardewModdingAPI.Events.EventArgsMouseStateChanged e) { if (!Context.IsWorldReady) { return; } if (e.PriorState.MiddleButton == ButtonState.Pressed) { if (e.NewState.MiddleButton == ButtonState.Released && Game1.player.CurrentTool != null && Game1.player.CurrentTool is SkeletonWand && Game1.activeClickableMenu == null) { (Game1.player.CurrentTool as SkeletonWand).goToNextWandMode(); } } }
private void ControlEvents_MouseChanged(object sender, StardewModdingAPI.Events.EventArgsMouseStateChanged e) { MState = e.NewState; if (!Game1.hasLoadedGame || Game1.activeClickableMenu != null) { return; } if (Game1.didPlayerJustLeftClick()) { if (ClickRect.Intersects(TargRect)) { Game1.activeClickableMenu = new Billboard(); } } }