added input, some changes

This commit is contained in:
ProgramSnail 2021-04-19 20:03:12 +03:00
parent 733bcbd99d
commit 76c85016d8
10 changed files with 54 additions and 4 deletions

View file

@ -6,10 +6,13 @@
#include "input.hpp"
namespace init {
WINDOW* stdscr;
void begin() {
initscr();
stdscr = initscr();
noecho();
curs_set(false);
nodelay(stdscr, true);
draw::begin();
input::begin();
}

View file

@ -14,7 +14,7 @@ namespace input {
}
void step() {
lastInput = getch();
}
void end() {

View file

@ -1,8 +1,10 @@
#include <cstdint>
#include <curses.h>
#pragma once
namespace input {
char lastInput = ERR;
void begin();

View file

@ -0,0 +1,12 @@
#include <set>
#pragma once
// add keyboard to keys rebinding for each InputController
class InputController {
private:
public:
InputController()
};