summaryrefslogtreecommitdiff
path: root/internal.lua
diff options
context:
space:
mode:
authorVanessa Ezekowitz <vanessaezekowitz@gmail.com>2016-08-14 19:43:08 -0400
committerGitHub <noreply@github.com>2016-08-14 19:43:08 -0400
commitf6ea3daef7ab6acdf4156e8e8347c3d536bb4fb4 (patch)
tree6d2f985b7b3de3b8162ffd8427233c6246a45419 /internal.lua
parentdba69b1f7116bdb0f4c9be3dafd411db757e14ec (diff)
parent15f5b8e8042c635d801320a606c214643d178062 (diff)
Merge pull request #63 from Wuzzy2/search
Improve search and group handling and related usability
Diffstat (limited to 'internal.lua')
-rw-r--r--internal.lua8
1 files changed, 7 insertions, 1 deletions
diff --git a/internal.lua b/internal.lua
index 8319191..42ab722 100644
--- a/internal.lua
+++ b/internal.lua
@@ -179,13 +179,19 @@ function unified_inventory.get_formspec(player, page)
.. minetest.formspec_escape(unified_inventory.current_searchbox[player_name]) .. "]"
formspec[n+1] = "image_button[12.2,8.1;.8,.8;ui_search_icon.png;searchbutton;]"
.. "tooltip[searchbutton;" ..F("Search") .. "]"
+ formspec[n+2] = "image_button[12.9,8.1;.8,.8;ui_reset_icon.png;searchresetbutton;]"
+ .. "tooltip[searchbutton;" ..F("Search") .. "]"
+ .. "tooltip[searchresetbutton;" ..F("Reset search and display everything") .. "]"
else
formspec[n] = "field[8.5,5.225;2.2,1;searchbox;;"
.. minetest.formspec_escape(unified_inventory.current_searchbox[player_name]) .. "]"
formspec[n+1] = "image_button[10.3,5;.8,.8;ui_search_icon.png;searchbutton;]"
.. "tooltip[searchbutton;" ..F("Search") .. "]"
+ formspec[n+2] = "image_button[11,5;.8,.8;ui_reset_icon.png;searchresetbutton;]"
+ .. "tooltip[searchbutton;" ..F("Search") .. "]"
+ .. "tooltip[searchresetbutton;" ..F("Reset search and display everything") .. "]"
end
- n = n+2
+ n = n+3
local no_matches = "No matching items"
if draw_lite_mode then