utf drawing test
This commit is contained in:
@@ -1,5 +1,6 @@
|
|||||||
#include <algorithm>
|
#include <algorithm>
|
||||||
#include <chrono>
|
#include <chrono>
|
||||||
|
#include <clocale>
|
||||||
#include <cstdio>
|
#include <cstdio>
|
||||||
#include <ctime>
|
#include <ctime>
|
||||||
#include <functional>
|
#include <functional>
|
||||||
@@ -61,13 +62,11 @@ public:
|
|||||||
}
|
}
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
|
|
||||||
|
|
||||||
};
|
};
|
||||||
|
|
||||||
void myupdatedisplay(const timer &timer_input) {
|
void myupdatedisplay(const timer &timer_input) {
|
||||||
mvprintw(timer_input.triggercounter, timer_input.triggercounter, "hello %d",
|
int x_offset = COLS / 4;
|
||||||
timer_input.triggercounter);
|
mvprintw(timer_input.triggercounter, timer_input.triggercounter+x_offset, "test: █");
|
||||||
}
|
}
|
||||||
|
|
||||||
// manage collection of timers
|
// manage collection of timers
|
||||||
@@ -93,9 +92,18 @@ public:
|
|||||||
};
|
};
|
||||||
|
|
||||||
int main() {
|
int main() {
|
||||||
|
setlocale(LC_ALL, "");
|
||||||
initscr();
|
initscr();
|
||||||
nodelay(stdscr, FALSE);
|
nodelay(stdscr, FALSE);
|
||||||
refresh();
|
refresh();
|
||||||
|
start_color();
|
||||||
|
init_pair(1, COLOR_BLUE, COLOR_WHITE);
|
||||||
|
attron(COLOR_PAIR(1));
|
||||||
|
printw("Hello World! 🌍 テスト 测试");
|
||||||
|
const wchar_t wc = L'█';
|
||||||
|
cchar_t c_char;
|
||||||
|
setcchar(&c_char, &wc, A_NORMAL, 0, NULL);
|
||||||
|
mvwvline_set(stdscr, 1, 1, &c_char, 5);
|
||||||
// printf("verification\n");
|
// printf("verification\n");
|
||||||
|
|
||||||
auto starttime = std::chrono::steady_clock::now(); // initial starttime
|
auto starttime = std::chrono::steady_clock::now(); // initial starttime
|
||||||
|
|||||||
Reference in New Issue
Block a user