From ba931a717cb5a2549ecdaa1f924dbbf5f896a21b Mon Sep 17 00:00:00 2001 From: Andrei Karas Date: Fri, 21 Mar 2014 22:22:47 +0300 Subject: Rename keyEvent variables into event. --- src/gui/widgets/textfield.cpp | 18 +++++++++--------- 1 file changed, 9 insertions(+), 9 deletions(-) (limited to 'src/gui/widgets/textfield.cpp') diff --git a/src/gui/widgets/textfield.cpp b/src/gui/widgets/textfield.cpp index d7d73f78a..d1f19785f 100644 --- a/src/gui/widgets/textfield.cpp +++ b/src/gui/widgets/textfield.cpp @@ -245,16 +245,16 @@ int TextField::getValue() const return value; } -void TextField::keyPressed(KeyEvent &keyEvent) +void TextField::keyPressed(KeyEvent &event) { - const int val = keyEvent.getKey().getValue(); + const int val = event.getKey().getValue(); #ifdef USE_SDL2 if (val == Key::TEXTINPUT) { - std::string str = keyEvent.getText(); + std::string str = event.getText(); mText.insert(mCaretPosition, str); mCaretPosition += str.size(); - keyEvent.consume(); + event.consume(); fixScroll(); if (mSendAlwaysEvents) distributeActionEvent(); @@ -273,7 +273,7 @@ void TextField::keyPressed(KeyEvent &keyEvent) buf[1] = 0; mText.insert(mCaretPosition, std::string(buf)); mCaretPosition += 1; - keyEvent.consume(); + event.consume(); fixScroll(); if (mSendAlwaysEvents) distributeActionEvent(); @@ -305,7 +305,7 @@ void TextField::keyPressed(KeyEvent &keyEvent) mText.insert(mCaretPosition, std::string(buf, buf + len)); mCaretPosition += len; - keyEvent.consume(); + event.consume(); fixScroll(); if (mSendAlwaysEvents) distributeActionEvent(); @@ -323,14 +323,14 @@ void TextField::keyPressed(KeyEvent &keyEvent) bool consumed(false); #endif - const int action = keyEvent.getActionId(); + const int action = event.getActionId(); if (!inputManager.isActionActive(static_cast( Input::KEY_GUI_CTRL))) { if (!handleNormalKeys(action, consumed)) { if (consumed) - keyEvent.consume(); + event.consume(); return; } } @@ -343,7 +343,7 @@ void TextField::keyPressed(KeyEvent &keyEvent) distributeActionEvent(); if (consumed) - keyEvent.consume(); + event.consume(); fixScroll(); } -- cgit v1.2.3-70-g09d2