This commit is contained in:
IlyaShurupov 2024-04-13 12:28:46 +03:00
parent e161fffc0c
commit 2160dfca34
22 changed files with 339 additions and 157 deletions

View file

@ -1,39 +0,0 @@
#include "EditorWidget.hpp"
#include "GraphicApplication.hpp"
using namespace tp;
class EditorGUI : public Application {
public:
EditorGUI() {
Vec2F renderResolution = { 1000, 1000 };
auto canvas = this->mGraphics->getCanvas();
mGui = new EditorWidget<EventHandler, Canvas>(canvas, &geometry, renderResolution);
//
}
~EditorGUI() override { delete mGui; }
void processFrame(EventHandler* eventHandler) override {
auto rec = RectF({ 0, 0 }, mWindow->getSize());
mGui->proc(*eventHandler, rec, rec);
}
void drawFrame(Canvas* canvas) override { mGui->draw(*canvas); }
private:
Geometry geometry;
EditorWidget<EventHandler, Canvas>* mGui;
};
int main() {
GlobalGUIConfig mConfig;
gGlobalGUIConfig = &mConfig;
{
EditorGUI gui;
gui.run();
}
}