Fix a minor visual bug
[SmugglerRL.git] / src / curses.d
blob496c56cd09aa4e0976c0d438c4f988df65d8b759
1 public import deimos.ncurses;
2 private import std.string: toStringz;
4 pragma(inline, true):
5 private pure string format(T...)(string s, T args) {
6 import std.array: appender;
7 import std.format: formattedWrite;
8 auto w = appender!string();
9 formattedWrite(w, s, args);
10 return w.data;
13 int print(string...)(string s, string[] args) {
14 foreach (string i; args)
15 s ~= i;
17 return printw(toStringz(s));
20 int printf(T...)(string s, T args) {
21 return printw(toStringz(format(s, args)));
24 int mvprint(T...)(int y, int x, string s, T args) {
25 foreach (string i; args)
26 s ~= i;
28 return mvprintw(y, x, toStringz(s));
31 int mvprintf(T...)(int y, int x, string s, T args) {
32 return mvprintw(y, x, toStringz(format(s, args)));