eurêka !
This commit is contained in:
parent
286dbb36bf
commit
e237bfd695
3 changed files with 8 additions and 4 deletions
|
@ -1,5 +1,5 @@
|
||||||
#include "curses.h"
|
|
||||||
#include <ncurses.h>
|
#include <ncurses.h>
|
||||||
|
#include "curses.h"
|
||||||
|
|
||||||
const int Curses::kbd_lines = 12;
|
const int Curses::kbd_lines = 12;
|
||||||
const int Curses::kbd_columns = 50;
|
const int Curses::kbd_columns = 50;
|
||||||
|
@ -11,7 +11,7 @@ Curses::Curses() {
|
||||||
cbreak();
|
cbreak();
|
||||||
noecho();
|
noecho();
|
||||||
kbd = newwin(kbd_lines, kbd_columns, 0, 0);
|
kbd = newwin(kbd_lines, kbd_columns, 0, 0);
|
||||||
kbd = newwin(speed_lines, speed_columns,
|
speed = newwin(speed_lines, speed_columns,
|
||||||
kbd_lines+1, 0);
|
kbd_lines+1, 0);
|
||||||
}
|
}
|
||||||
|
|
||||||
|
@ -22,6 +22,8 @@ Curses::~Curses() {
|
||||||
}
|
}
|
||||||
|
|
||||||
void Curses::print_kbd() {
|
void Curses::print_kbd() {
|
||||||
|
wprintw(kbd,"%s", L"tuiiaueakeoff>| t|⇑ y|↖ u|↑ i|↗ o|");
|
||||||
|
wprintw(kbd,"%s", "tuiiaueakeoff>| t|⇑ y|↖ u|↑ i|↗ o|");
|
||||||
wmove(kbd, 0, 0); waddstr(kbd, " ---------------------");
|
wmove(kbd, 0, 0); waddstr(kbd, " ---------------------");
|
||||||
wmove(kbd, 1, 0); waddstr(kbd, "takeoff>| t|⇑ y|↖ u|↑ i|↗ o|");
|
wmove(kbd, 1, 0); waddstr(kbd, "takeoff>| t|⇑ y|↖ u|↑ i|↗ o|");
|
||||||
wmove(kbd, 2, 0); waddstr(kbd, " |---|---|---|---|---|----");
|
wmove(kbd, 2, 0); waddstr(kbd, " |---|---|---|---|---|----");
|
||||||
|
|
|
@ -1,5 +1,5 @@
|
||||||
#ifndef CURSES
|
#ifndef CURSES_TEST
|
||||||
#define CURSES
|
#define CURSES_TEST
|
||||||
|
|
||||||
#include <ncurses.h>
|
#include <ncurses.h>
|
||||||
|
|
||||||
|
|
|
@ -1,6 +1,8 @@
|
||||||
#include "curses.h"
|
#include "curses.h"
|
||||||
|
#include "locale.h"
|
||||||
int main()
|
int main()
|
||||||
{
|
{
|
||||||
|
setlocale(LC_ALL, "");
|
||||||
Curses term;
|
Curses term;
|
||||||
term.print_kbd();
|
term.print_kbd();
|
||||||
for(;;) ;
|
for(;;) ;
|
||||||
|
|
Loading…
Reference in a new issue