/// <summary>
 /// Left Click Favorite Menu.
 /// </summary>
 /// <param name="x">X position of the mouse</param>
 /// <param name="y">Y position of the mouse</param>
 public void LeftClickFavoriteMenu(int x, int y)
 {
     if (FavoriteMenuTab.containsPoint(x, y))
     {
         Menu.TakeSnapshot();
         Game1.activeClickableMenu = new FavoriteMenu(Entry, Menu.PlayerLoader, Menu);
     }
 }
Пример #2
0
        /// <summary>
        /// Event that is called when a button is pressed.
        /// </summary>
        /// <param name="sender"> The object</param>
        /// <param name="e"> The Button Pressed Event argument</param>
        private void OnButtonPressed(object sender, ButtonPressedEventArgs e)
        {
            // Check if the button is the Menu key and there is no menu
            if (e.Button.Equals(Config.OpenGlamMenuKey) && Game1.activeClickableMenu is null)
            {
                // Take a Snapshot
                Menu.TakeSnapshot();

                // Change player direction and open the menu
                ChangePlayerDirection();
            }

            // Check if the user clicked on the dresser
            Dresser.DresserInteractCheck(e.Button);
        }
Пример #3
0
        /// <summary>
        /// Event that is called when a button is pressed.
        /// </summary>
        /// <param name="sender"> The object</param>
        /// <param name="e"> The Button Pressed Event argument</param>
        private void OnButtonPressed(object sender, ButtonPressedEventArgs e)
        {
            // Check if the button is the Menu key and there is no menu
            if (e.Button.Equals(Config.OpenGlamMenuKey) && Game1.activeClickableMenu is null)
            {
                Menu.TakeSnapshot();
                ChangePlayerDirection();
                OpenGlamMenu();
            }

            Dresser.DresserInteractCheck(e.Button);

            if (IsJsonAssetsInstalled)
            {
                DresserJson.CheckJsonInput(sender, e);
            }
        }
Пример #4
0
        /// <summary>Event that is called when a button is pressed.</summary>
        /// <param name="sender">The object</param>
        /// <param name="e">The Button Pressed Event argument</param>
        private void OnButtonPressed(object sender, ButtonPressedEventArgs e)
        {
            //Check if the button is the Menu key and their is no menu
            if (e.Button.Equals(Config.OpenGlamMenuKey) && Game1.activeClickableMenu is null)
            {
                //Take a Snapshot
                Menu.TakeSnapshot();

                //Change player direction and open the menu
                Game1.player.faceDirection(2);
                Game1.player.FarmerSprite.StopAnimation();
                Game1.player.completelyStopAnimatingOrDoingAction();
                Game1.activeClickableMenu = Menu;
            }

            //Check if the user clicked on the dresser
            Dresser.DresserInteractCheck(e.Button);
        }