mirror of
https://github.com/MihailRis/voxelcore.git
synced 2026-10-06 19:41:51 +00:00
add switching text edit state
This commit is contained in:
parent
968d01274a
commit
726f004893
4 changed files with 19 additions and 3 deletions
|
|
@ -4,6 +4,7 @@
|
|||
|
||||
#include "Container.hpp"
|
||||
#include "graphics/core/Batch2D.hpp"
|
||||
#include "graphics/ui/GUI.hpp"
|
||||
|
||||
using gui::UINode;
|
||||
using gui::Align;
|
||||
|
|
@ -107,11 +108,13 @@ bool UINode::isPressed() const {
|
|||
}
|
||||
|
||||
void UINode::onFocus() {
|
||||
gui.getInput().startTextInput();
|
||||
focused = true;
|
||||
focusCallbacks.notify(gui);
|
||||
}
|
||||
|
||||
void UINode::defocus() {
|
||||
gui.getInput().stopTextInput();
|
||||
focused = false;
|
||||
defocusCallbacks.notify(gui);
|
||||
}
|
||||
|
|
|
|||
Loading…
Add table
Add a link
Reference in a new issue