Advertisement
Not a member of Pastebin yet?
Sign Up,
it unlocks many cool features!
- void Api::Border(short x, short y, short w, short h, int c)
- {
- const char drA = (int)218;
- const char ulA = (int)217;
- const char urA = (int)192;
- const char dlA = (int)191;
- const char hL = (int)196;
- const char vL = (int)179;
- setlocale(LC_ALL, "C");
- SetConsoleCursorPosition(GetStdHandle(STD_OUTPUT_HANDLE), {x,y});
- cout << drA;
- for (int i = 2; i < w; i++)
- {
- cout << hL;
- }
- cout << dlA;
- for (short i = 1; i < h - 1; i++)
- {
- SetConsoleCursorPosition(GetStdHandle(STD_OUTPUT_HANDLE), { x,y + i});
- cout << vL;
- SetConsoleCursorPosition(GetStdHandle(STD_OUTPUT_HANDLE), { x + w - 1,y + i });
- cout << vL;
- }
- SetConsoleCursorPosition(GetStdHandle(STD_OUTPUT_HANDLE), { x,y + h - 1});
- cout << urA;
- for (int i = 2; i < w; i++)
- {
- cout << hL;
- }
- cout << ulA;
- }
Advertisement
Add Comment
Please, Sign In to add comment
Advertisement