add new struct and events
This commit is contained in:
39
bin/main.cpp
39
bin/main.cpp
@@ -1,39 +0,0 @@
|
||||
#include "layers/test_panel/test_panel.hpp"
|
||||
#include "layers/test_panel_2/test_panel_2.hpp"
|
||||
#include "layers/opengl_panel/opengl_panel.hpp"
|
||||
|
||||
namespace sandbox
|
||||
{
|
||||
class test_app : public VE::application
|
||||
{
|
||||
public:
|
||||
test_app(std::string app_name) : VE::application{ app_name } {};
|
||||
~test_app() = default;
|
||||
};
|
||||
}
|
||||
|
||||
namespace VE
|
||||
{
|
||||
inline application& create()
|
||||
{
|
||||
static sandbox::test_app app{ "vertex_engine_sandbox" };
|
||||
|
||||
// ATTENTEION: это слои для отрисовки.
|
||||
// если делается компонент, который является составляющей этих компонентов, то
|
||||
// нужно вызывать метод on_attach внутри хозяев для работы сигнальной системы.
|
||||
// см. пример в test_panel_2
|
||||
app.push_layer(
|
||||
new sandbox::test_panel{},
|
||||
new sandbox::test_panel_2{},
|
||||
new sandbox::opengl_panel{}
|
||||
);
|
||||
|
||||
return app;
|
||||
}
|
||||
}
|
||||
|
||||
auto main(int argc, char* args[]) -> int
|
||||
{
|
||||
decltype(auto) app = VE::create();
|
||||
app.run();
|
||||
}
|
||||
Reference in New Issue
Block a user