diff --git a/sandbox/src/sandbox.cpp b/sandbox/src/sandbox.cpp index dfc916f..e87c892 100644 --- a/sandbox/src/sandbox.cpp +++ b/sandbox/src/sandbox.cpp @@ -1,15 +1,48 @@ -#include #include #include #include #include +#include + +//USE THE FUCKING NAMESPACE OR BREAK + +class TestLayer : public Bk::Layer +{ + public: + TestLayer() + : Layer("Test") {} + + void on_attach() override + { + BK_INFO("Layer {} attached", name); + } + + void on_detach() override + { + BK_INFO("Layer {} detached", name); + } + + void on_event(Bk::Event& e) override + { + BK_INFO("Layer {} event", name); + } + + void on_update() override + { + BK_INFO("Layer {} updated", name); + } +}; class Sandbox : public Bk::Application { public: Sandbox() - { + { + push_layer(new TestLayer()); + push_layer(new TestLayer()); + std::unique_ptr layer = pop_overlay(); + BK_INFO("Layer retirer et récupérer {0}", layer->to_string()); } @@ -19,6 +52,8 @@ class Sandbox : public Bk::Application } }; + + std::unique_ptr Bk::create_app() { return std::unique_ptr(new Sandbox()); } \ No newline at end of file