Implement MouseDelta check (WIP)
This commit is contained in:
1
main.cpp
1
main.cpp
@@ -11,6 +11,7 @@ void KeyDown(const ReWindow::WindowEvents::KeyDownEvent& e)
|
||||
|
||||
Vector2 mouse_pos;
|
||||
|
||||
// TODO: Move to J3ML::LinearAlgebra::Vector2
|
||||
std::ostream& operator<<(std::ostream& os, const Vector2& v)
|
||||
{
|
||||
return os << "{" << v.x << ", " << v.y << "}";
|
||||
|
@@ -89,6 +89,12 @@ namespace ReWindow {
|
||||
|
||||
void RWindow::refresh() {
|
||||
OnRefresh(0.f);
|
||||
|
||||
int x, y;
|
||||
|
||||
bool mouseAvailable = XQueryPointer(display, window, nullptr, nullptr, &x, &y, nullptr, nullptr, nullptr);
|
||||
|
||||
std::cout << x << ", " << y << std::endl;
|
||||
}
|
||||
|
||||
bool RWindow::getFlag(RWindowFlags flag) const
|
||||
@@ -121,6 +127,7 @@ namespace ReWindow {
|
||||
exit(0);
|
||||
}
|
||||
}
|
||||
|
||||
if (xev.type == FocusIn) {
|
||||
XAutoRepeatOff(display);
|
||||
focusGained.Invoke();
|
||||
|
Reference in New Issue
Block a user