Adding objects GUI initial. Changing TODO. Some fixes along side

This commit is contained in:
IlushaShurupov 2023-08-03 22:04:42 +03:00 committed by Ilya Shurupov
parent f579a969ce
commit 17ad239692
18 changed files with 1345 additions and 56 deletions

View file

@ -0,0 +1,50 @@
#include "NewPlacement.hpp"
#include "Window.hpp"
#include "GUI.h"
using namespace tp;
using namespace obj;
class GUIWindow {
Window* window;
ObjectsGUI gui;
public:
GUIWindow() {
tp::HeapAllocGlobal::startIgnore();
window = Window::createWindow(1500, 900, "Objects GUI");
tp::HeapAllocGlobal::stopIgnore();
gui.cd(NDO->create("dict"), "root");
}
void run() {
while (!window->shouldClose()) {
window->processEvents();
gui.draw();
window->draw();
}
}
~GUIWindow() {
Window::destroyWindow(window);
}
};
int main() {
tp::ModuleManifest* deps[] = { &gModuleObjects, &gModuleGraphics, nullptr };
tp::ModuleManifest module("ObjectsTests", nullptr, nullptr, deps);
if (module.initialize()) {
{
GUIWindow window;
window.run();
}
module.deinitialize();
}
return 0;
}