tmp
This commit is contained in:
parent
9e339defd6
commit
a9fbb909ac
21 changed files with 322 additions and 30 deletions
39
GeometryEditor2D/applications/Entry.cpp
Normal file
39
GeometryEditor2D/applications/Entry.cpp
Normal file
|
|
@ -0,0 +1,39 @@
|
|||
|
||||
#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();
|
||||
}
|
||||
}
|
||||
Loading…
Add table
Add a link
Reference in a new issue