Update widgets module. Raster example initial.
This commit is contained in:
parent
aa10424fbb
commit
90244934d9
48 changed files with 1169 additions and 530 deletions
|
|
@ -8,30 +8,25 @@ using namespace tp;
|
|||
|
||||
class Sketch3DApplication : public Application {
|
||||
public:
|
||||
Sketch3DApplication() : mGui(*mGraphics->getCanvas(), {1920, 1080}) {}
|
||||
Sketch3DApplication() :
|
||||
mGui(*mGraphics->getCanvas(), { 1920, 1080 }) {}
|
||||
|
||||
void processFrame(EventHandler* eventHandler) override {
|
||||
auto rec = RectF( { 0, 0 }, mWindow->getSize() );
|
||||
auto rec = RectF({ 0, 0 }, mWindow->getSize());
|
||||
mGui.updateConfigCache(mWidgetManager);
|
||||
mGui.proc(*eventHandler, rec, rec);
|
||||
}
|
||||
|
||||
void drawFrame(Canvas* canvas) override {
|
||||
mGui.draw(*canvas);
|
||||
}
|
||||
void drawFrame(Canvas* canvas) override { mGui.draw(*canvas); }
|
||||
|
||||
private:
|
||||
WidgetManager mWidgetManager;
|
||||
Sketch3DGUI<EventHandler, Canvas> mGui;
|
||||
};
|
||||
|
||||
|
||||
void runApp() {
|
||||
tp::GlobalGUIConfig config;
|
||||
tp::gGlobalGUIConfig = &config;
|
||||
|
||||
Sketch3DApplication app;
|
||||
app.run();
|
||||
}
|
||||
|
||||
int main() {
|
||||
runApp();
|
||||
}
|
||||
int main() { runApp(); }
|
||||
Loading…
Add table
Add a link
Reference in a new issue