Обновление примера согласно реализации движка.
This commit is contained in:
parent
2bab6fc3e9
commit
c43ef1e908
3 changed files with 54 additions and 17 deletions
|
|
@ -1,24 +1,13 @@
|
|||
import ncui;
|
||||
|
||||
import std.stdio : writeln;
|
||||
import simple;
|
||||
|
||||
void main()
|
||||
{
|
||||
auto config = SessionConfig(InputMode.raw, Cursor.normal, Echo.on, Keypad.on);
|
||||
Session session;
|
||||
try {
|
||||
session = new Session(config);
|
||||
} catch (Exception e) {
|
||||
writeln("Не удалось инициализировать сессию:\n\t", e.msg);
|
||||
return;
|
||||
}
|
||||
|
||||
try {
|
||||
session.close();
|
||||
} catch (Exception e) {
|
||||
writeln("Не удалось закрыть сессию:\n\t", e.msg);
|
||||
return;
|
||||
}
|
||||
setLogLevel(LogLevel.info);
|
||||
|
||||
writeln("OK");
|
||||
auto config = SessionConfig(InputMode.raw, Cursor.hidden, Echo.off, Keypad.on);
|
||||
NCUI ncui = new NCUI(config);
|
||||
auto window = new Simple();
|
||||
ncui.run(window);
|
||||
}
|
||||
|
|
|
|||
Loading…
Add table
Add a link
Reference in a new issue