bool GUIEditBox::processKey(const SEvent &event)
{
- if (!m_writable) {
- return false;
- }
-
if (!event.KeyInput.PressedDown)
return false;
// First copy to clipboard
onKeyControlC(event);
+ if (!m_writable)
+ return false;
+
if (m_passwordbox || !m_operator || m_mark_begin == m_mark_end)
return false;
bool GUIEditBox::onKeyControlV(const SEvent &event, s32 &mark_begin, s32 &mark_end)
{
- if (!isEnabled())
+ if (!isEnabled() || !m_writable)
return false;
// paste from the clipboard
bool GUIEditBox::onKeyBack(const SEvent &event, s32 &mark_begin, s32 &mark_end)
{
- if (!isEnabled() || Text.empty())
+ if (!isEnabled() || Text.empty() || !m_writable)
return false;
core::stringw s;
bool GUIEditBox::onKeyDelete(const SEvent &event, s32 &mark_begin, s32 &mark_end)
{
- if (!isEnabled() || Text.empty())
+ if (!isEnabled() || Text.empty() || !m_writable)
return false;
core::stringw s;