[ADD] added a on/off for hand detection in menu

you can switch between mouse and hand detection now
This commit is contained in:
Jasper
2021-06-08 11:14:07 +02:00
parent c94f798a9d
commit e7a9cda9dd
3 changed files with 37 additions and 32 deletions

View File

@@ -76,12 +76,12 @@ namespace gui
{
double x_pos, y_pos;
glfwGetCursorPos(window, &x_pos, &y_pos);
std::cout << "Cursor pos in method: " << x_pos <<"::" << y_pos << std::endl;
//std::cout << "Cursor pos in method: " << x_pos <<"::" << y_pos << std::endl;
const float x_rel = (x_pos / SCALED_WIDTH / DEFAULT_WIDTH) * 2.0f - 1.0f;
const float y_rel = -((y_pos / SCALED_HEIGHT / DEFAULT_HEIGHT) * 2.0f - 1.0f);
std::cout << "x_rel And y_rel in method: " << x_rel << "::" << y_rel << std::endl;
//std::cout << "x_rel And y_rel in method: " << x_rel << "::" << y_rel << std::endl;
if (x_rel >= minXY.x && x_rel <= maxXY.x &&