From 384d69aafe73c8947e22b87214e67ece045f9672 Mon Sep 17 00:00:00 2001 From: JoshuaNavarro Date: Sat, 20 Jul 2019 12:44:47 -0700 Subject: [PATCH] Finished character select screen! --- .../Minigame/SeasideScrambleMinigame/SSCCamera.cs | 5 +++++ .../SSCMenus/CharacterSelectScreen.cs | 14 +++++++++++++- 2 files changed, 18 insertions(+), 1 deletion(-) diff --git a/GeneralMods/Revitalize/Framework/Minigame/SeasideScrambleMinigame/SSCCamera.cs b/GeneralMods/Revitalize/Framework/Minigame/SeasideScrambleMinigame/SSCCamera.cs index 863f25d0..d77256fa 100644 --- a/GeneralMods/Revitalize/Framework/Minigame/SeasideScrambleMinigame/SSCCamera.cs +++ b/GeneralMods/Revitalize/Framework/Minigame/SeasideScrambleMinigame/SSCCamera.cs @@ -54,5 +54,10 @@ namespace Revitalize.Framework.Minigame.SeasideScrambleMinigame { return this.getXNARect().Contains((int)position.X, (int)position.Y); } + + public bool positionInsideViewport(Point position) + { + return this.getXNARect().Contains((int)position.X, (int)position.Y); + } } } diff --git a/GeneralMods/Revitalize/Framework/Minigame/SeasideScrambleMinigame/SSCMenus/CharacterSelectScreen.cs b/GeneralMods/Revitalize/Framework/Minigame/SeasideScrambleMinigame/SSCMenus/CharacterSelectScreen.cs index ac5e21de..4751dbb7 100644 --- a/GeneralMods/Revitalize/Framework/Minigame/SeasideScrambleMinigame/SSCMenus/CharacterSelectScreen.cs +++ b/GeneralMods/Revitalize/Framework/Minigame/SeasideScrambleMinigame/SSCMenus/CharacterSelectScreen.cs @@ -265,7 +265,14 @@ namespace Revitalize.Framework.Minigame.SeasideScrambleMinigame.SSCMenus this.animatedSprites["P1Mouse"].position += new Vector2(state.ThumbSticks.Right.X,state.ThumbSticks.Right.Y*-1)* controllerMouseSensitivity; if (SeasideScramble.self.camera.positionInsideViewport(this.animatedSprites["P1Mouse"].position) == false) { - this.animatedSprites["P1Mouse"].position = this.playerDisplayLocations[player]; + if (SeasideScramble.self.camera.positionInsideViewport(Game1.getMousePosition()) == true) + { + this.animatedSprites["P1Mouse"].position = new Vector2(Game1.getMousePosition().X, Game1.getMousePosition().Y); + } + else + { + this.animatedSprites["P2Mouse"].position = this.playerDisplayLocations[player]; + } } } if (player == SSCEnums.PlayerID.Two) @@ -617,6 +624,11 @@ namespace Revitalize.Framework.Minigame.SeasideScrambleMinigame.SSCMenus Vector2 p4Loc = Game1.dialogueFont.MeasureString("Player 4"); b.DrawString(Game1.dialogueFont, "Player 4", new Vector2(this.playerDisplayLocations[SSCEnums.PlayerID.Four].X - (p4Loc.X / 4), this.playerDisplayLocations[SSCEnums.PlayerID.Four].Y - 64), Color.White); + if (SeasideScramble.self.currentNumberOfPlayers >= 1) + { + Vector2 finish = Game1.dialogueFont.MeasureString("Press start or enter to start the game."); + b.DrawString(Game1.dialogueFont, "Press start or enter to start the game.", new Vector2((this.width / 2) - (menuTitlePos.X / 2), this.height *.25f), Color.White); + } if (SeasideScramble.self.getPlayer(SSCEnums.PlayerID.One) != null) {