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