Files
Archimedes/modules/Archimedes-Modules/TestNotCurses/TestNotCurses.cpp
2026-02-03 21:17:12 -06:00

29 lines
530 B
C++

#include "TestNotCurses.h"
TestNotCurses::TestNotCurses(Archimedes::App* a, void* h) : Archimedes::Module(a, h) {
name = "TestNotCurses";
}
TestNotCurses::~TestNotCurses() {
notcurses_stop(ncInstance);
}
void TestNotCurses::onLoad() {
setlocale(LC_ALL, "");
notcurses_options opts;
ncInstance = notcurses_init(&opts, NULL);
if(!ncInstance) {
app->emitEvent(new Archimedes::DoUnloadModuleEvent(name));
return;
}
}
void TestNotCurses::run() {
notcurses_render(ncInstance);
}