mirror of
https://github.com/MihailRis/voxelcore.git
synced 2026-10-04 18:41:51 +00:00
add history to TextBox
This commit is contained in:
parent
223a846784
commit
4c493aff25
7 changed files with 230 additions and 33 deletions
|
|
@ -17,9 +17,7 @@ Container::~Container() {
|
|||
Container::clear();
|
||||
}
|
||||
|
||||
std::shared_ptr<UINode> Container::getAt(
|
||||
const glm::vec2& pos, const std::shared_ptr<UINode>& self
|
||||
) {
|
||||
std::shared_ptr<UINode> Container::getAt(const glm::vec2& pos) {
|
||||
if (!isInteractive() || !isEnabled()) {
|
||||
return nullptr;
|
||||
}
|
||||
|
|
@ -28,19 +26,19 @@ std::shared_ptr<UINode> Container::getAt(
|
|||
}
|
||||
int diff = (actualLength-size.y);
|
||||
if (scrollable && diff > 0 && pos.x > calcPos().x + getSize().x - scrollBarWidth) {
|
||||
return UINode::getAt(pos, self);
|
||||
return UINode::getAt(pos);
|
||||
}
|
||||
|
||||
for (int i = nodes.size()-1; i >= 0; i--) {
|
||||
auto& node = nodes[i];
|
||||
if (!node->isVisible())
|
||||
continue;
|
||||
auto hover = node->getAt(pos, node);
|
||||
auto hover = node->getAt(pos);
|
||||
if (hover != nullptr) {
|
||||
return hover;
|
||||
}
|
||||
}
|
||||
return UINode::getAt(pos, self);
|
||||
return UINode::getAt(pos);
|
||||
}
|
||||
|
||||
void Container::mouseMove(GUI* gui, int x, int y) {
|
||||
|
|
|
|||
Loading…
Add table
Add a link
Reference in a new issue