mirror of
https://github.com/MihailRis/voxelcore.git
synced 2026-10-04 18:41:51 +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) {
|
||||
focus->keyPressed(key);
|
||||
}
|
||||
if (Events::clicked(mousecode::BUTTON_1)) {
|
||||
int mx = Events::x;
|
||||
int my = Events::y;
|
||||
focus->mouseMove(this, mx, my);
|
||||
}
|
||||
if (prevfocus == focus){
|
||||
for (int i = mousecode::BUTTON_1; i < mousecode::BUTTON_1+12; i++) {
|
||||
if (Events::jclicked(i)) {
|
||||
focus->clicked(this, i);
|
||||
|
||||
if (!Events::_cursor_locked) {
|
||||
if (Events::clicked(mousecode::BUTTON_1)) {
|
||||
int mx = Events::x;
|
||||
int my = Events::y;
|
||||
focus->mouseMove(this, mx, my);
|
||||
}
|
||||
if (prevfocus == focus){
|
||||
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