summaryrefslogtreecommitdiff
path: root/src/interface/Label.cpp
diff options
context:
space:
mode:
Diffstat (limited to 'src/interface/Label.cpp')
-rw-r--r--src/interface/Label.cpp11
1 files changed, 11 insertions, 0 deletions
diff --git a/src/interface/Label.cpp b/src/interface/Label.cpp
index 755e3ce..a513878 100644
--- a/src/interface/Label.cpp
+++ b/src/interface/Label.cpp
@@ -121,6 +121,17 @@ void Label::OnMouseMoved(int localx, int localy, int dx, int dy)
}
}
+void Label::Tick(float dt)
+{
+ if(!this->IsFocused() && (selecting || (selectionIndex0 != -1 && selectionIndex1 != -1)))
+ {
+ selecting = false;
+ selectionIndex0 = -1;
+ selectionIndex1 = -1;
+ updateSelection();
+ }
+}
+
void Label::updateSelection()
{
std::string currentText;