I am writing a console application and I want to have menus that the user navigates through via getch() (so none of the "press 1 for this, 2 for that" nonsense), so the same kind of menu you would see in any controller-based video game. i am using text color to display which option is selecting, using GetStdHandle(STD_OUTPUT_HANDLE) and SetConsoleTextAttribute to do so, green being selected and default light gray for everything else. I am also already using gotoxy() quite a bit in this program
So I have several methods of printing the menu. i could clear the screen and print the entire thing every time the user gives input and then overwrite the selected option in green, i could print the whole thing one time and then on user input use gotoxy to overwrite previously selected option in gray and the newly selected option in green, i could clear the screen like in the first option but then print each option one by one running a check on each option as to which color it should be, and a few other options i thought of earlier but cant remember.
i know how to implement all of these options, but what i want to know is which one is the most efficient for the computer to process. i know for a simple console app like this it doesn't really matter how efficient it is because any computer built in the last decade will print anything i throw at it practically instantly, but im trying to hammer into my brain efficient coding practices for when i start building larger programs