mirror of
https://github.com/MihailRis/voxelcore.git
synced 2026-10-05 11:01:49 +00:00
add 'ondefocus' ui event
This commit is contained in:
parent
e6dea9ed48
commit
9befbb9795
3 changed files with 15 additions and 2 deletions
|
|
@ -74,6 +74,11 @@ UINode* UINode::listenDoubleClick(const onaction& action) {
|
|||
return this;
|
||||
}
|
||||
|
||||
UINode* UINode::listenDefocus(const onaction& action) {
|
||||
defocusCallbacks.listen(action);
|
||||
return this;
|
||||
}
|
||||
|
||||
void UINode::click(int, int) {
|
||||
pressed = true;
|
||||
}
|
||||
|
|
@ -98,6 +103,7 @@ bool UINode::isPressed() const {
|
|||
|
||||
void UINode::defocus() {
|
||||
focused = false;
|
||||
defocusCallbacks.notify(gui);
|
||||
}
|
||||
|
||||
bool UINode::isFocused() const {
|
||||
|
|
|
|||
Loading…
Add table
Add a link
Reference in a new issue