0

I'm trying to do a Minesweeper in C# using the Rider's Console. At this time, I get the inputs by asking the player to enter coordinates using Console.ReadLine but I want to go to the next level and wait for the player to click on a cell of the board with the mouse.

But how to get mouse inputs, how to get different inputs whether the left or the right click is pressed and most importantly, how to know the coordinates of where the player clicked?

halfer
  • 19,824
  • 17
  • 99
  • 186
Mathis
  • 11
  • 2
  • https://stackoverflow.com/questions/73345595/getting-mouse-and-keyboard-input-in-console-application-c-sharp Maybe check this related issue. – CodeMaybe Sep 22 '22 at 14:16
  • You should really consider using a desktop framework for something like this, such as WPF or the new MAUI (WinForms is mostly still around for legacy reasons, prefer WPF over it). I am unsure if a click event handler is possible for a console application, but even if it was it would certainly be something that is rather "esoteric" as console applications are very much programmed to be keyboard first, if not exclusively – Narish Sep 22 '22 at 14:24
  • Definitely don't use a Console app as a GUI. You'll end up having to go really low level to accomplish your task. Not worth the time and effort... – Idle_Mind Sep 22 '22 at 15:24

0 Answers0