Text input related fixes & enhancements (#4124)

InputText: checks whether provided content can be given
back unaltered, which may not be the case after it is
splitted to UTF8 chars if the text is binary content.
Prevent editing text if that is the case.
Adds InputText and InputDialog :isEditable() and :isEdited()
methods.
Also accounts for the scrollbar width when measuring text
to prevent it from being displayed when not needed.
Also ensure a minimal size of the scrollbar thumb so it is
rendered when huge text with many lines is displayed.

Virtual keyboard: Hold on Backspace: delete from cursor
to start of line instead of clearing all text content.
This commit is contained in:
poire-z
2018-08-01 18:33:52 +02:00
committed by GitHub
parent 19b1c919d6
commit 620542b055
6 changed files with 121 additions and 9 deletions

View File

@@ -463,7 +463,7 @@ function util.getMenuText(item)
else
text = item.text
end
if item.sub_item_table ~= nil then
if item.sub_item_table ~= nil or item.sub_item_table_func then
text = text .. " \226\150\184"
end
return text