[colobot] 251/377: Fix issue #711
Didier Raboud
odyx at moszumanska.debian.org
Wed Mar 30 13:34:23 UTC 2016
This is an automated email from the git hooks/post-receive script.
odyx pushed a commit to branch debian/master
in repository colobot.
commit a611ef3d50dac090bfe2be379774e2d5995b7e41
Author: Krzysztof Dermont <erihel at gmail.com>
Date: Wed Feb 10 17:03:37 2016 +0100
Fix issue #711
Update text input handling based on focus event
---
src/ui/controls/edit.cpp | 12 ++++++++++--
src/ui/controls/edit.h | 1 +
2 files changed, 11 insertions(+), 2 deletions(-)
diff --git a/src/ui/controls/edit.cpp b/src/ui/controls/edit.cpp
index 1d55624..4bbdc26 100644
--- a/src/ui/controls/edit.cpp
+++ b/src/ui/controls/edit.cpp
@@ -484,10 +484,12 @@ bool CEdit::EventProcess(const Event &event)
if ( event.customParam == m_eventType )
{
m_bFocus = true;
+ UpdateFocus();
}
else
{
m_bFocus = false;
+ UpdateFocus();
}
}
@@ -504,10 +506,12 @@ bool CEdit::EventProcess(const Event &event)
if ( m_bEdit || m_bHilite ) m_bCapture = true;
}
m_bFocus = true;
+ UpdateFocus();
}
else
{
m_bFocus = false;
+ UpdateFocus();
}
}
@@ -3229,9 +3233,13 @@ void CEdit::SetFocus(CControl* control)
if (oldFocus != m_bFocus)
{
- // Start/stop text input mode, this toggles the on-screen keyboard
- CApplication::GetInstancePointer()->SetTextInput(m_bFocus);
+ UpdateFocus();
}
}
+void CEdit::UpdateFocus()
+{
+ CApplication::GetInstancePointer()->SetTextInput(m_bFocus);
}
+
+}
\ No newline at end of file
diff --git a/src/ui/controls/edit.h b/src/ui/controls/edit.h
index 8711295..e4f1e7f 100644
--- a/src/ui/controls/edit.h
+++ b/src/ui/controls/edit.h
@@ -228,6 +228,7 @@ protected:
void UpdateScroll();
void SetFocus(CControl* control) override;
+ void UpdateFocus(); // Start/stop text input mode, this toggles the on-screen keyboard
protected:
std::unique_ptr<CScroll> m_scroll; // vertical scrollbar on the right
--
Alioth's /usr/local/bin/git-commit-notice on /srv/git.debian.org/git/pkg-games/colobot.git
More information about the Pkg-games-commits
mailing list