diff --git a/include/Utils/Console/Console.h b/include/Utils/Console/Console.h index 4f75b83..7af4f22 100644 --- a/include/Utils/Console/Console.h +++ b/include/Utils/Console/Console.h @@ -11,6 +11,7 @@ Use global variable Console like that: #include #include +#include #ifdef TARGET_WIN32 #include diff --git a/src/GUIManager/KeyboardWidget.cpp b/src/GUIManager/KeyboardWidget.cpp index 5114006..dd30c60 100644 --- a/src/GUIManager/KeyboardWidget.cpp +++ b/src/GUIManager/KeyboardWidget.cpp @@ -131,6 +131,8 @@ namespace SE bool TKeyboardWidget::CheckClick(vec2 mousePos) { + mousePos -= LeftBottomPos; + return (mousePos.v[0] >= 0.f && mousePos.v[1] >= 0.f && mousePos.v[0] <= 320.f && mousePos.v[1] <= 216.f); } @@ -140,6 +142,8 @@ namespace SE void TKeyboardWidget::OnTapUp(vec2 pos) { + pos -= LeftBottomPos; + BOOST_FOREACH(auto& visualKeyElement, VisualKeyArr) { if (std::get<0>(visualKeyElement).CheckClicked(ivec2(pos.v[0], pos.v[1])))