summaryrefslogtreecommitdiff
path: root/src/interface/Textbox.cpp
diff options
context:
space:
mode:
authorSimon Robertshaw <simon@hardwired.org.uk>2012-08-05 19:20:55 (GMT)
committer Simon Robertshaw <simon@hardwired.org.uk>2012-08-05 19:20:55 (GMT)
commit06112a12a0c9dbf596fb5e3ef0345d918a641596 (patch)
tree04aa93b0a10274b0c61e5a4d556d6fef71164101 /src/interface/Textbox.cpp
parent17e7ace364ad065bd587a74a6c042295e33f3209 (diff)
downloadpowder-06112a12a0c9dbf596fb5e3ef0345d918a641596.zip
powder-06112a12a0c9dbf596fb5e3ef0345d918a641596.tar.gz
Ctrl+A select all
Diffstat (limited to 'src/interface/Textbox.cpp')
-rw-r--r--src/interface/Textbox.cpp12
1 files changed, 12 insertions, 0 deletions
diff --git a/src/interface/Textbox.cpp b/src/interface/Textbox.cpp
index 8444b85..a57d69a 100644
--- a/src/interface/Textbox.cpp
+++ b/src/interface/Textbox.cpp
@@ -174,6 +174,13 @@ void Textbox::cutSelection()
}
}
+void Textbox::selectAll()
+{
+ selectionIndex0 = 0;
+ selectionIndex1 = text.length();
+ updateSelection();
+}
+
void Textbox::pasteIntoSelection()
{
char * clipboardText;
@@ -275,6 +282,11 @@ void Textbox::OnVKeyPress(int key, Uint16 character, bool shift, bool ctrl, bool
cutSelection();
return;
}
+ if(ctrl && key == 'a')
+ {
+ selectAll();
+ return;
+ }
try
{