From 3834d764c143132a1bf964e5c3c7a690070e987d Mon Sep 17 00:00:00 2001 From: my name Date: Fri, 10 Jul 2026 10:06:04 +0200 Subject: [PATCH] utf drawing test --- cpp/ui/ncurses/hw/hwcurses.cpp | 16 ++++++++++++---- 1 file changed, 12 insertions(+), 4 deletions(-) diff --git a/cpp/ui/ncurses/hw/hwcurses.cpp b/cpp/ui/ncurses/hw/hwcurses.cpp index 3a389cd..83a458e 100644 --- a/cpp/ui/ncurses/hw/hwcurses.cpp +++ b/cpp/ui/ncurses/hw/hwcurses.cpp @@ -1,5 +1,6 @@ #include #include +#include #include #include #include @@ -61,13 +62,11 @@ public: } } } - - }; void myupdatedisplay(const timer &timer_input) { - mvprintw(timer_input.triggercounter, timer_input.triggercounter, "hello %d", - timer_input.triggercounter); + int x_offset = COLS / 4; + mvprintw(timer_input.triggercounter, timer_input.triggercounter+x_offset, "test: โ–ˆ"); } // manage collection of timers @@ -93,9 +92,18 @@ public: }; int main() { + setlocale(LC_ALL, ""); initscr(); nodelay(stdscr, FALSE); 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"); auto starttime = std::chrono::steady_clock::now(); // initial starttime