Fixes
This commit is contained in:
@@ -94,7 +94,7 @@ void GUI::act(float delta) {
|
||||
for (auto key : Events::pressedKeys) {
|
||||
focus->keyPressed(key);
|
||||
}
|
||||
if (Events::clicked(mousecode::BUTTON_1)) {
|
||||
if (!Events::_cursor_locked && Events::clicked(mousecode::BUTTON_1)) {
|
||||
int mx = Events::x;
|
||||
int my = Events::y;
|
||||
focus->mouseMove(this, mx, my);
|
||||
|
||||
@@ -5,6 +5,7 @@
|
||||
#include "../../window/Window.h"
|
||||
#include "../../assets/Assets.h"
|
||||
#include "../../graphics/Batch2D.h"
|
||||
#include "../../window/Events.h"
|
||||
|
||||
using std::shared_ptr;
|
||||
|
||||
@@ -18,6 +19,7 @@ Container::Container(vec2 coord, vec2 size) : UINode(coord, size) {
|
||||
}
|
||||
|
||||
shared_ptr<UINode> Container::getAt(vec2 pos, shared_ptr<UINode> self) {
|
||||
if (!isInside(vec2(Events::x, Events::y))) return nullptr;
|
||||
for (auto node : nodes) {
|
||||
if (!node->visible())
|
||||
continue;
|
||||
|
||||
Reference in New Issue
Block a user