mirror of
https://github.com/MihailRis/voxelcore.git
synced 2026-10-12 22:41: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,15 +94,18 @@ void GUI::act(float delta) {
|
||||||
for (auto key : Events::pressedKeys) {
|
for (auto key : Events::pressedKeys) {
|
||||||
focus->keyPressed(key);
|
focus->keyPressed(key);
|
||||||
}
|
}
|
||||||
if (Events::clicked(mousecode::BUTTON_1)) {
|
|
||||||
int mx = Events::x;
|
if (!Events::_cursor_locked) {
|
||||||
int my = Events::y;
|
if (Events::clicked(mousecode::BUTTON_1)) {
|
||||||
focus->mouseMove(this, mx, my);
|
int mx = Events::x;
|
||||||
}
|
int my = Events::y;
|
||||||
if (prevfocus == focus){
|
focus->mouseMove(this, mx, my);
|
||||||
for (int i = mousecode::BUTTON_1; i < mousecode::BUTTON_1+12; i++) {
|
}
|
||||||
if (Events::jclicked(i)) {
|
if (prevfocus == focus){
|
||||||
focus->clicked(this, i);
|
for (int i = mousecode::BUTTON_1; i < mousecode::BUTTON_1+12; i++) {
|
||||||
|
if (Events::jclicked(i)) {
|
||||||
|
focus->clicked(this, i);
|
||||||
|
}
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
|
|
|
||||||
Loading…
Add table
Add a link
Reference in a new issue