linux-wallpaperengine/src/WallpaperEngine/Irrlicht/CEventReceiver.cpp
Alexis Maiquez dc36adb200 + added mouse input handling and mouse position variable to shaders
+ added vector2 pointer class for shader parameters

Signed-off-by: Alexis Maiquez <almamu@almamu.com>
2019-09-10 13:55:12 +02:00

20 lines
488 B
C++

#include "CEventReceiver.h"
using namespace WallpaperEngine::Irrlicht;
bool CEventReceiver::OnEvent(const irr::SEvent &event)
{
if (event.EventType == irr::EET_MOUSE_INPUT_EVENT && event.MouseInput.Event == irr::EMIE_MOUSE_MOVED)
{
this->m_position.X = event.MouseInput.X;
this->m_position.Y = event.MouseInput.Y;
return true;
}
return false;
}
const irr::core::position2di& CEventReceiver::getPosition () const
{
return this->m_position;
}