mirror of
https://github.com/MihailRis/voxelcore.git
synced 2026-10-14 15:31:49 +00:00
Locked cursor gui interaction fix again
This commit is contained in:
parent
a14ddceb47
commit
0f32831d01
1 changed files with 12 additions and 9 deletions
|
|
@ -94,6 +94,8 @@ void GUI::act(float delta) {
|
||||||
for (auto key : Events::pressedKeys) {
|
for (auto key : Events::pressedKeys) {
|
||||||
focus->keyPressed(key);
|
focus->keyPressed(key);
|
||||||
}
|
}
|
||||||
|
|
||||||
|
if (!Events::_cursor_locked) {
|
||||||
if (Events::clicked(mousecode::BUTTON_1)) {
|
if (Events::clicked(mousecode::BUTTON_1)) {
|
||||||
int mx = Events::x;
|
int mx = Events::x;
|
||||||
int my = Events::y;
|
int my = Events::y;
|
||||||
|
|
@ -108,6 +110,7 @@ void GUI::act(float delta) {
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
|
}
|
||||||
if (focus && !focus->isfocused()) {
|
if (focus && !focus->isfocused()) {
|
||||||
focus = nullptr;
|
focus = nullptr;
|
||||||
}
|
}
|
||||||
|
|
|
||||||
Loading…
Add table
Add a link
Reference in a new issue