eurêka !

This commit is contained in:
Louis-Guillaume DUBOIS 2015-05-01 23:00:48 +02:00
parent 286dbb36bf
commit e237bfd695
3 changed files with 8 additions and 4 deletions

View file

@ -1,5 +1,5 @@
#include "curses.h"
#include <ncurses.h>
#include "curses.h"
const int Curses::kbd_lines = 12;
const int Curses::kbd_columns = 50;
@ -11,7 +11,7 @@ Curses::Curses() {
cbreak();
noecho();
kbd = newwin(kbd_lines, kbd_columns, 0, 0);
kbd = newwin(speed_lines, speed_columns,
speed = newwin(speed_lines, speed_columns,
kbd_lines+1, 0);
}
@ -22,6 +22,8 @@ Curses::~Curses() {
}
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, 1, 0); waddstr(kbd, "takeoff>| t|⇑ y|↖ u|↑ i|↗ o|");
wmove(kbd, 2, 0); waddstr(kbd, " |---|---|---|---|---|----");

View file

@ -1,5 +1,5 @@
#ifndef CURSES
#define CURSES
#ifndef CURSES_TEST
#define CURSES_TEST
#include <ncurses.h>

View file

@ -1,6 +1,8 @@
#include "curses.h"
#include "locale.h"
int main()
{
setlocale(LC_ALL, "");
Curses term;
term.print_kbd();
for(;;) ;