Fix UI focus
This commit is contained in:
parent
4222f4eb14
commit
c6232b7691
@ -69,7 +69,9 @@ static void doUIMouseClick(double x, double y, GLFWMouseButton button) {
|
||||
clickedElement->clickAll(clickedAt, UIPoint((int) x, (int) y), button);
|
||||
|
||||
if(button == GLFWMouseButton::LEFT) {
|
||||
clickedElement->focusEnterAll(clickedAt, UIPoint((int) x, (int) y));
|
||||
if(!clickedElement->focusEnterAll(clickedAt, UIPoint((int) x, (int) y))) {
|
||||
UI::unfocusElement(kekData.ui->focusedElement);
|
||||
}
|
||||
}
|
||||
} else {
|
||||
UI::unfocusElement(kekData.ui->focusedElement);
|
||||
|
Loading…
Reference in New Issue
Block a user