Advertisement
Not a member of Pastebin yet?
Sign Up,
it unlocks many cool features!
- void SplashScreen() {
- srand(time(NULL));
- HANDLE handle = GetStdHandle(STD_OUTPUT_HANDLE); // получаем дескриптор консоли
- COORD scrn;
- HWND hwnd;
- char Title[1024];
- GetConsoleTitle(Title, 1024);
- hwnd = FindWindow(NULL, Title);
- MoveWindow(hwnd, 750, 250, 1320, 360, TRUE);
- int flag = 0;
- while (flag <=30) {
- int t = rand() % 16;
- int z = rand() % 16;
- if (t != z) {
- SetConsoleTextAttribute(handle, (WORD)((t << 4) | z));
- scrn.X = rand() % 60;
- scrn.Y = rand() % 30;
- SetConsoleCursorPosition(handle, scrn);
- std::cout << "Добро Пожаловать";
- Sleep(600);
- SetConsoleTextAttribute(handle, (WORD)(0 | 0));
- system("cls");
- }
- if (GetAsyncKeyState(VK_SPACE)== true ) {
- break;
- }
- std::cin.clear();
- std::cin.ignore(std::cin.rdbuf()->in_avail());
- flag++;
- }
- SetConsoleTextAttribute(handle, LIGHTGRAY);
- }
Advertisement
Add Comment
Please, Sign In to add comment
Advertisement