Locked cursor gui interaction fix again

This commit is contained in:
MihailRis
2023-11-24 23:10:30 +03:00
parent a14ddceb47
commit 0f32831d01
+3
View File
@@ -94,6 +94,8 @@ void GUI::act(float delta) {
for (auto key : Events::pressedKeys) {
focus->keyPressed(key);
}
if (!Events::_cursor_locked) {
if (Events::clicked(mousecode::BUTTON_1)) {
int mx = Events::x;
int my = Events::y;
@@ -108,6 +110,7 @@ void GUI::act(float delta) {
}
}
}
}
if (focus && !focus->isfocused()) {
focus = nullptr;
}