Fix d'un bug suite au changement de la couleurs du background, lorsqu'on retourne dans le menu principal.
This commit is contained in:
@@ -88,7 +88,6 @@ void curseur(bool interrupteur) {
|
||||
====================================*/
|
||||
//fonction pour choisir le mot de facon random
|
||||
void choisirMot(string nomFichier, int maximum) {
|
||||
|
||||
int numeroLigne = rand() % (maximum)+1;
|
||||
|
||||
fstream monFlux;
|
||||
@@ -110,6 +109,7 @@ string goToLine(fstream& monFlux, int numeroLigne) {
|
||||
====================================*/
|
||||
void background(int couleur) {
|
||||
HANDLE hConsole = GetStdHandle(STD_OUTPUT_HANDLE);
|
||||
|
||||
switch (couleur) {
|
||||
case '1':
|
||||
SetConsoleTextAttribute(hConsole, BACKGROUND_RED | BACKGROUND_INTENSITY);
|
||||
@@ -141,8 +141,12 @@ void background(int couleur) {
|
||||
}
|
||||
|
||||
int demanderBackground() {
|
||||
system("cls");
|
||||
cout << "Choix";
|
||||
int choix = _getche();
|
||||
return choix;
|
||||
}
|
||||
|
||||
void backgroundDefault() {
|
||||
HANDLE hConsole = GetStdHandle(STD_OUTPUT_HANDLE);
|
||||
SetConsoleTextAttribute(hConsole, 0x0F);
|
||||
}
|
||||
Reference in New Issue
Block a user