Adding objects GUI initial. Changing TODO. Some fixes along side
This commit is contained in:
parent
f9d62c324d
commit
112fea2f04
18 changed files with 1345 additions and 56 deletions
50
Objects/applications/GUIEntry.cpp
Normal file
50
Objects/applications/GUIEntry.cpp
Normal 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;
|
||||
}
|
||||
Loading…
Add table
Add a link
Reference in a new issue