#include "MiniEngine.h" #include "MiniEngine_Event.h" #include "lua.hpp" #include using namespace MiniEngine; using namespace std; int cc = 0; char buff[1024]; int main() { try { SDLSystem sys({ SDLInitFlag::All }, { IMGInitFlag::PNG }, {}, true); Window wnd("Code World", 1024, 768); Renderer rnd(wnd); Font font("asserts/msyh.ttf", 18); rnd.clear(); rnd.update(); Event e; while (WaitEvent(e)) { switch (e.type) { case SDL_EventType::SDL_KEYDOWN: buff[cc++] = e.key.keysym.sym; rnd.clear(); rnd.copyTo(font.renderText(rnd, buff, RGBA(255, 255, 255, 0)), Point(0, 0)); rnd.update(); break; } } } catch (ErrorViewer& e) { cout << e.getError() << endl; } return 0; }