Not a member of Pastebin yet?
Sign Up,
it unlocks many cool features!
- #include <framework/application.h>
- #include <framework/core/clock.h>
- #include <framework/ui/uimanager.h>
- #include <framework/ui/uiframecounter.h>
- #include <framework/graphics/fontmanager.h>
- #include <framework/core/modulemanager.h>
- #include <framework/core/resourcemanager.h>
- class MyApp : public Application
- {
- public:
- MyApp() : Application("MyApp") { }
- void init(const std::vector<std::string>& args) {
- Application::init(args, Fw::AppEnableGraphics);
- g_resources.addToSearchPath("/home/bart/projects/otclient/modules");
- g_modules.discoverModule("/core_fonts/core_fonts.otmod")->load();
- UIFrameCounterPtr frameCounter(new UIFrameCounter);
- frameCounter->resize(Size(80, 20));
- frameCounter->moveTo(Point(4,4));
- g_ui.getRootWidget()->addChild(frameCounter);
- }
- void render() {
- Application::render();
- }
- };
- int main(int argc, const char* argv[])
- {
- std::vector<std::string> args(argv, argv + argc);
- MyApp app;
- app.init(args);
- app.run();
- app.terminate();
- return 0;
- }
Add Comment
Please, Sign In to add comment