예제 #1
0
        // Handle keyboard/controller inputs
        private void HandleInput(GameMenu menu, SButton input)
        {
            if (menu.currentTab != GameMenu.mapTab)
            {
                return;
            }

            if (Context.IsMainPlayer)
            {
                if (input.ToString().Equals(Config.MenuKey) || input is SButton.ControllerY)
                {
                    Game1.activeClickableMenu = new ModMenu(
                        SecondaryNpcs,
                        CustomHandler.GetCustomNpcs(),
                        NpcNames,
                        MarkerCrop,
                        this.Helper,
                        this.Config
                        );
                }
            }

            if (input.ToString().Equals(Config.TooltipKey) || input is SButton.RightShoulder)
            {
                ChangeTooltipConfig();
            }
            else if (input.ToString().Equals(Config.TooltipKey) || input is SButton.LeftShoulder)
            {
                ChangeTooltipConfig(false);
            }
        }
예제 #2
0
 // Handle keyboard/controller inputs
 private void HandleInput(GameMenu menu, SButton input)
 {
     if (menu.currentTab != GameMenu.mapTab)
     {
         return;
     }
     if (Context.IsMainPlayer)
     {
         if (input.ToString().Equals(Config.MenuKey) || input is SButton.ControllerY)
         {
             Game1.activeClickableMenu = new ModMenu(
                 Game1.viewport.Width / 2 - (1100 + IClickableMenu.borderWidth * 2) / 2,
                 Game1.viewport.Height / 2 - (725 + IClickableMenu.borderWidth * 2) / 2,
                 1100 + IClickableMenu.borderWidth * 2,
                 650 + IClickableMenu.borderWidth * 2,
                 SecondaryNpcs,
                 CustomHandler.GetCustomNpcs(),
                 NpcNames,
                 MarkerCrop,
                 this.Helper,
                 this.Config
                 );
         }
     }
     if (input.ToString().Equals(Config.TooltipKey) || input is SButton.DPadUp || input is SButton.DPadRight)
     {
         ChangeTooltipConfig();
     }
     else if (input.ToString().Equals(Config.TooltipKey) || input is SButton.DPadDown || input is SButton.DPadLeft)
     {
         ChangeTooltipConfig(false);
     }
 }