47 lines
883 B
C++
Executable File
47 lines
883 B
C++
Executable File
#include "ui_layer.hpp"
|
|
|
|
#include "utils.hpp"
|
|
|
|
namespace sandbox
|
|
{
|
|
void ui_layer::on_attach()
|
|
{
|
|
VE::CONNECT(this);
|
|
|
|
hack::log()("on_attach");
|
|
}
|
|
|
|
void ui_layer::render()
|
|
{
|
|
// VE::WinPos(m_pos);
|
|
// VE::WinSize(m_pos);
|
|
|
|
VE::Begin("name", m_pos, m_size, m_win_flags);
|
|
VE::End();
|
|
}
|
|
|
|
void ui_layer::on_event(VE::event e)
|
|
{
|
|
// для событий от перефирии
|
|
// if (e.m_type.type() == typeid(VE::event_type))
|
|
// {
|
|
// auto t = std::any_cast<VE::event_type>(e.m_type);
|
|
// if (t != VE::event_type::MOUSE_CURSOR_POSITION)
|
|
// hack::log()((int)t);
|
|
// }
|
|
|
|
if (e.m_type.type() == typeid(test_event))
|
|
{
|
|
auto t = std::any_cast<test_event>(e.m_type);
|
|
if (t == test_event::TEST_EVEN)
|
|
hack::log()(std::any_cast<std::string>(e.m_data));
|
|
}
|
|
}
|
|
|
|
void ui_layer::update()
|
|
{
|
|
|
|
}
|
|
}
|
|
|