Replace Old Widgets
This commit is contained in:
parent
cce8f0e1bc
commit
fcd5eb2d2a
81 changed files with 388 additions and 278 deletions
40
.back/WidBack/examples/SimpleGUI.cpp
Normal file
40
.back/WidBack/examples/SimpleGUI.cpp
Normal file
|
|
@ -0,0 +1,40 @@
|
|||
|
||||
#include "SimpleGUI.hpp"
|
||||
|
||||
#include "GraphicApplication.hpp"
|
||||
|
||||
|
||||
using namespace tp;
|
||||
|
||||
class SimpleGUI : public Application {
|
||||
public:
|
||||
SimpleGUI() {
|
||||
// mGui.mPreview = true;
|
||||
}
|
||||
|
||||
void processFrame(EventHandler* eventHandler, halnf) override {
|
||||
const auto rec = RectF({ 0, 0 }, mWindow->getSize());
|
||||
|
||||
mGui.setArea(rec);
|
||||
mGui.updateConfigWrapper(mWidgetManager);
|
||||
mGui.procWrapper(*eventHandler, rec);
|
||||
}
|
||||
|
||||
void drawFrame(Canvas* canvas) override {
|
||||
canvas->rect(mGui.mArea, { 0.1f, 0.1f, 0.1f, 1.f });
|
||||
mGui.drawWrapper(*canvas);
|
||||
}
|
||||
|
||||
private:
|
||||
WidgetManager mWidgetManager;
|
||||
|
||||
// DockSpaceWidget mGui;
|
||||
SimpleWidget3 mGui;
|
||||
};
|
||||
|
||||
int main() {
|
||||
{
|
||||
SimpleGUI gui;
|
||||
gui.run();
|
||||
}
|
||||
}
|
||||
Loading…
Add table
Add a link
Reference in a new issue