mirror of
https://github.com/luanti-org/luanti.git
synced 2025-09-30 19:22:14 +00:00
Add missing IsWritable checks (#16504)
This commit is contained in:
parent
9972639e26
commit
2eded3f078
1 changed files with 3 additions and 3 deletions
|
@ -375,7 +375,7 @@ bool CGUIEditBox::processKey(const SEvent &event)
|
||||||
}
|
}
|
||||||
break;
|
break;
|
||||||
case KEY_INSERT:
|
case KEY_INSERT:
|
||||||
if (!isEnabled())
|
if (!isEnabled() || !IsWritable)
|
||||||
break;
|
break;
|
||||||
|
|
||||||
OverwriteMode = !OverwriteMode;
|
OverwriteMode = !OverwriteMode;
|
||||||
|
@ -865,7 +865,7 @@ void CGUIEditBox::draw()
|
||||||
}
|
}
|
||||||
|
|
||||||
// draw cursor
|
// draw cursor
|
||||||
if (isEnabled()) {
|
if (isEnabled() && IsWritable) {
|
||||||
if (WordWrap || MultiLine) {
|
if (WordWrap || MultiLine) {
|
||||||
cursorLine = getLineFromPos(CursorPos);
|
cursorLine = getLineFromPos(CursorPos);
|
||||||
txtLine = &BrokenText[cursorLine];
|
txtLine = &BrokenText[cursorLine];
|
||||||
|
@ -1312,7 +1312,7 @@ void CGUIEditBox::inputChar(wchar_t c)
|
||||||
|
|
||||||
void CGUIEditBox::inputString(const core::stringw &str)
|
void CGUIEditBox::inputString(const core::stringw &str)
|
||||||
{
|
{
|
||||||
if (!isEnabled())
|
if (!isEnabled() || !IsWritable)
|
||||||
return;
|
return;
|
||||||
|
|
||||||
core::stringw s;
|
core::stringw s;
|
||||||
|
|
Loading…
Add table
Add a link
Reference in a new issue