diff --git a/source/ncui/core/window.d b/source/ncui/core/window.d index 5d31db9..c0cf97c 100644 --- a/source/ncui/core/window.d +++ b/source/ncui/core/window.d @@ -2,6 +2,9 @@ module ncui.core.window; import deimos.ncurses; +import std.string : toStringz; +import std.conv : to; + import ncui.core.ncwin; import ncui.lib.checks; @@ -15,6 +18,7 @@ public: this(int h, int w, int y, int x) { _window = ncuiNotNull!newwin(h, w, y, x); + ncuiNotErr!keypad(_window, true); } int height() @@ -42,6 +46,10 @@ public: ncuiNotErr!wrefresh(_window); } + void put(int y, int x, string s) { + ncuiNotErr!mvwaddnstr(_window, y, x, s.toStringz, s.length.to!int); + } + @property NCWin handle() { return _window;