mirror of
https://github.com/MihailRis/voxelcore.git
synced 2026-10-05 11:01:49 +00:00
minor refactor
This commit is contained in:
parent
69779f0cc0
commit
04b6b6b546
29 changed files with 130 additions and 91 deletions
|
|
@ -111,11 +111,11 @@ bool UINode::isInside(glm::vec2 point) {
|
|||
point.x < pos.x + size.x && point.y < pos.y + size.y);
|
||||
}
|
||||
|
||||
std::shared_ptr<UINode> UINode::getAt(glm::vec2 point, std::shared_ptr<UINode> self) {
|
||||
std::shared_ptr<UINode> UINode::getAt(const glm::vec2& point, const std::shared_ptr<UINode>& self) {
|
||||
if (!isInteractive() || !enabled) {
|
||||
return nullptr;
|
||||
}
|
||||
return isInside(point) ? std::move(self) : nullptr;
|
||||
return isInside(point) ? self : nullptr;
|
||||
}
|
||||
|
||||
bool UINode::isInteractive() const {
|
||||
|
|
|
|||
Loading…
Add table
Add a link
Reference in a new issue