remove event target
This commit is contained in:
@@ -113,7 +113,7 @@ namespace VE
|
||||
{
|
||||
glfwSetKeyCallback(m_win, [](GLFWwindow* w, int key, int scancode, int action, int mods)
|
||||
{
|
||||
event e{ event_target::VE, action, key };
|
||||
event e{ action, key };
|
||||
|
||||
// HERE
|
||||
// тут одноврекменно срабатывает только один сигнал
|
||||
@@ -148,7 +148,7 @@ namespace VE
|
||||
{
|
||||
glfwSetMouseButtonCallback(m_win, [](GLFWwindow* w, int button, int action, int mods)
|
||||
{
|
||||
event e{ event_target::VE, action, button };
|
||||
event e{ action, button };
|
||||
|
||||
switch (action)
|
||||
{
|
||||
@@ -180,7 +180,7 @@ namespace VE
|
||||
{
|
||||
try
|
||||
{
|
||||
event e{ event_target::VE, event_type::MOUSE_SCROLL, std::pair<float, float>{ static_cast<float>(xOffset), static_cast<float>(yOffset) } };
|
||||
event e{ event_type::MOUSE_SCROLL, std::pair<float, float>{ static_cast<float>(xOffset), static_cast<float>(yOffset) } };
|
||||
VE_EMIT(e);
|
||||
}
|
||||
catch(std::exception& e)
|
||||
@@ -193,7 +193,7 @@ namespace VE
|
||||
{
|
||||
try
|
||||
{
|
||||
event e{ event_target::VE, event_type::MOUSE_CURSOR_POSITION, std::pair<float, float>{ static_cast<float>(xPos), static_cast<float>(yPos) } };
|
||||
event e{ event_type::MOUSE_CURSOR_POSITION, std::pair<float, float>{ static_cast<float>(xPos), static_cast<float>(yPos) } };
|
||||
VE_EMIT(e);
|
||||
}
|
||||
catch(std::exception& e)
|
||||
@@ -215,7 +215,7 @@ namespace VE
|
||||
|
||||
try
|
||||
{
|
||||
event e{ event_target::VE, event_type::WINDOW_RESIZE, std::pair<float, float>{ static_cast<float>(width), static_cast<float>(height) } };
|
||||
event e{ event_type::WINDOW_RESIZE, std::pair<float, float>{ static_cast<float>(width), static_cast<float>(height) } };
|
||||
VE_EMIT(e);
|
||||
}
|
||||
catch(std::exception& e)
|
||||
@@ -228,7 +228,7 @@ namespace VE
|
||||
{
|
||||
try
|
||||
{
|
||||
event e{ event_target::VE, event_type::WINDOW_CLOSE, nullptr };
|
||||
event e{ event_type::WINDOW_CLOSE, nullptr };
|
||||
VE_EMIT(e);
|
||||
}
|
||||
catch(std::exception& e)
|
||||
@@ -241,7 +241,7 @@ namespace VE
|
||||
{
|
||||
try
|
||||
{
|
||||
event e{ event_target::VE, event_type::WINDOW_FOCUS, focused };
|
||||
event e{ event_type::WINDOW_FOCUS, focused };
|
||||
VE_EMIT(e);
|
||||
}
|
||||
catch(std::exception& e)
|
||||
|
||||
Reference in New Issue
Block a user