From 697fe27668a76ff77f700bbea7d69bd9c3a0f68f Mon Sep 17 00:00:00 2001 From: adrido Date: Mon, 9 Oct 2017 06:57:18 +0200 Subject: [PATCH] Formspec: textarea with scrollbar improvements Increase scrollrate depending on fontsize Scroll on mousewheel Allow scrolling and marking text on non writable textareas Update lua api about readonly mode Show scrollbar if text overflows --- builtin/mainmenu/tab_online.lua | 4 +-- doc/lua_api.txt | 5 ++-- src/guiFormSpecMenu.cpp | 28 +++++++++---------- src/intlGUIEditBox.cpp | 37 +++++++++++++++++++------- util/travis/clang-format-whitelist.txt | 2 ++ 5 files changed, 46 insertions(+), 30 deletions(-) diff --git a/builtin/mainmenu/tab_online.lua b/builtin/mainmenu/tab_online.lua index 1d6cfe521..23e842da5 100644 --- a/builtin/mainmenu/tab_online.lua +++ b/builtin/mainmenu/tab_online.lua @@ -61,8 +61,8 @@ local function get_formspec(tabview, name, tabdata) fgettext("Del. Favorite") .. "]" end if fav_selected.description then - retval = retval .. "textarea[8.1,2.3;4.23,2.9;;" .. - core.formspec_escape((gamedata.serverdescription or ""), true) .. ";]" + retval = retval .. "textarea[8.1,2.3;4.23,2.9;;;" .. + core.formspec_escape((gamedata.serverdescription or ""), true) .. "]" end end diff --git a/doc/lua_api.txt b/doc/lua_api.txt index acf1eec15..e53ec122e 100644 --- a/doc/lua_api.txt +++ b/doc/lua_api.txt @@ -1962,9 +1962,10 @@ examples. * if is false, pressing enter in the field will submit the form but not close it * defaults to true when not specified (ie: no tag for a field) -#### `textarea[,;,;;