// Click condition function public static bool Click(InputStates i, GameScene.SceneValues sv) { InputStates ni = new InputStates( ); if (ni.MouseReleased(i).Button == MouseButton.LEFT) { return(true); } return(false); }
public void Update(InputStates bef) { // Input Variables to not reinitialize InputStates input = new InputStates( ); MouseClick mr = input.MouseReleased(bef); MouseClick mp = input.MousePressed(bef); if (Game.Vars["langChoose"] == "true") { // Check for LANGCHOOSE inputs if (input.KeyUp(bef, Keys.Enter)) { // Clicked confirm Game.Vars["LANG"] = "1"; Game.Vars["langChoose"] = "false"; Game.Vars.ToggleDebug("langChoose"); Game.RefreshLanguage( ); CL_Action?.Invoke( ); } if (mr.Button == MouseButton.LEFT) { int z = 0; foreach (StringDrawn s in languagesDrawn) { if (input.MouseRectangle.Intersects(s.Border ?? new Rectangle(0, 0, 0, 0))) { Game.Vars["LANG"] = $"{languagesIDs[z]}"; Game.Vars["langChoose"] = "false"; Game.Vars.ToggleDebug("langChoose"); Game.RefreshLanguage( ); CL_Action?.Invoke( ); } z++; } } } else { // Check Game.Vars["UpdateState"] to check what types of input to check } }