Advertisement
DESAG

For u

Jun 27th, 2017
65
0
Never
Not a member of Pastebin yet? Sign Up, it unlocks many cool features!
C++ 0.79 KB | None | 0 0
  1. void Api::Border(short x, short y, short w, short h, int c)
  2. {
  3.     const char drA = (int)218;
  4.     const char ulA = (int)217;
  5.     const char urA = (int)192;
  6.     const char dlA = (int)191;
  7.     const char hL = (int)196;
  8.     const char vL = (int)179;
  9.     setlocale(LC_ALL, "C");
  10.     SetConsoleCursorPosition(GetStdHandle(STD_OUTPUT_HANDLE), {x,y});
  11.     cout << drA;
  12.     for (int i = 2; i < w; i++)
  13.     {
  14.         cout << hL;
  15.     }
  16.     cout << dlA;
  17.     for (short i = 1; i < h - 1; i++)
  18.     {
  19.         SetConsoleCursorPosition(GetStdHandle(STD_OUTPUT_HANDLE), { x,y + i});
  20.         cout << vL;
  21.         SetConsoleCursorPosition(GetStdHandle(STD_OUTPUT_HANDLE), { x + w - 1,y + i });
  22.         cout << vL;
  23.     }
  24.     SetConsoleCursorPosition(GetStdHandle(STD_OUTPUT_HANDLE), { x,y + h - 1});
  25.     cout << urA;
  26.     for (int i = 2; i < w; i++)
  27.     {
  28.         cout << hL;
  29.     }
  30.     cout << ulA;
  31. }
Advertisement
Add Comment
Please, Sign In to add comment
Advertisement