Improve search bar look

This commit is contained in:
Jean-Patrick Guerrero 2022-08-01 03:51:35 +02:00
parent 60bdfa34fb
commit 326ee3e098
3 changed files with 3 additions and 1 deletions

View File

@ -1334,6 +1334,7 @@ local function get_items_fs(fs, data, player, full_height)
else
fs"style_type[label;font=italic;font_size=18]"
label(data.inv_width + 0.9, 0.49, clr("#aaa", ES"Search..."))
fs(fmt("style[enable_search:hovered;bgimg=%s]", PNG.search_outline))
button(data.inv_width + 0.8, 0.1, 4, 0.8, "enable_search", "")
end
@ -1346,7 +1347,7 @@ local function get_items_fs(fs, data, player, full_height)
if true_str(data.filter) then
image_button(data.inv_width + 4.3, 0.4, 0.2, 0.2, "", "cancel", "")
fs(fmt("tooltip[cancel;%s]", ES"Clear"))
box(data.inv_width + 0.85, 0.75, 3.74, 0.01, "#f9826c")
image(data.inv_width + 0.8, 0.14, 4, 0.8, PNG.search_outline)
end
data.pagemax = max(1, ceil(#items / ipp))

View File

@ -46,6 +46,7 @@ local PNG = {
edit = "i3_edit.png",
no_result = "i3_no_result.png",
find_more = "i3_find_more.png",
search_outline = "i3_search_outline.png",
cancel_hover = "i3_cancel.png^\\[brighten",
search_hover = "i3_search.png^\\[brighten",

Binary file not shown.

After

Width:  |  Height:  |  Size: 507 B