public static GamePadState Postfix(GamePadState g, PlayerIndex playerIndex, GamePadState __result) { if (playerIndex.Equals(PlayerIndex.One) && PlayerIndexController._PlayerIndex != PlayerIndex.One) { return(PlayerIndexController.GetRawGamePadState()); } else { return(__result); } }
public override void draw(SpriteBatch spriteBatch) { spriteBatch.Draw(Game1.fadeToBlackRect, Game1.graphics.GraphicsDevice.Viewport.Bounds, Color.Black * 0.75f); #region Primary box //Boundary box IClickableMenu.drawTextureBox(spriteBatch, Game1.mouseCursors, textureSegment, base.xPositionOnScreen, base.yPositionOnScreen, base.width, base.height, Color.White, 4f, true); //Top texts spriteBatch.DrawString(textFont, $"Gamepad player index: {PlayerIndexController.GetIndexAsString()}", playerIndexTextPosition, Game1.textColor); spriteBatch.DrawString(textFont, $"Attached keyboard: { Keyboards.MultipleKeyboardManager.AttachedKeyboardID }", keyboardPointerTextPosition, Game1.textColor); spriteBatch.DrawString(textFont, $"Attached mouse: { Mice.MultipleMiceManager.AttachedMouseID }", mousePointerTextPosition, Game1.textColor); //Mouse/Keyboard buttons attachMouseButton.Draw(spriteBatch); //must be Draw not draw detachMouseButton.Draw(spriteBatch); attachKeyboardButton.Draw(spriteBatch); detachKeyboardButton.Draw(spriteBatch); toggleBordersButton.Draw(spriteBatch); affinityDropdownMenu.Draw(spriteBatch); #endregion #region AHK == null display box IClickableMenu.drawTextureBox(spriteBatch, Game1.mouseCursors, textureSegment, base.xPositionOnScreen, base.yPositionOnScreen + base.height + 13, base.width, 80, Color.White, 3f, true); Game1.drawWithBorder(Mice.MouseDisabler.IsAutoHotKeyNull ? "Warning! This instance can't lock mouse" : "This instance can lock the mouse", Color.White, Mice.MouseDisabler.IsAutoHotKeyNull ? Color.OrangeRed : Color.ForestGreen, new Vector2(base.xPositionOnScreen + 25, base.yPositionOnScreen + base.height + 32)); #endregion //Base draws the exit button base.draw(spriteBatch); Game1.mouseCursorTransparency = 1f; base.drawMouse(spriteBatch); }