From 326ee3e098d9365b41184abe0617ec6014e3088a Mon Sep 17 00:00:00 2001 From: Jean-Patrick Guerrero Date: Mon, 1 Aug 2022 03:51:35 +0200 Subject: [PATCH] Improve search bar look --- src/gui.lua | 3 ++- src/styles.lua | 1 + textures/i3_search_outline.png | Bin 0 -> 507 bytes 3 files changed, 3 insertions(+), 1 deletion(-) create mode 100644 textures/i3_search_outline.png diff --git a/src/gui.lua b/src/gui.lua index c9a3b77..426acde 100644 --- a/src/gui.lua +++ b/src/gui.lua @@ -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)) diff --git a/src/styles.lua b/src/styles.lua index 918b0b7..cc39c31 100644 --- a/src/styles.lua +++ b/src/styles.lua @@ -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", diff --git a/textures/i3_search_outline.png b/textures/i3_search_outline.png new file mode 100644 index 0000000000000000000000000000000000000000..a641e8969299be822dd57854ecf0b1afbc8b0497 GIT binary patch literal 507 zcmeAS@N?(olHy`uVBq!ia0y~yV4MJC2XL?fNpl6|GeChuo-U3d6}R4Aedu}AK!D*v zTdi;Isa?(x15-(`{zHJ|2wTv?!M*r^y1?x_q4u8`rX{_p8U`DxbNw*9+*`y_?!EKllB z<6U>;zSP$}ru))OKCQbI{^(zs@9OvKiq_n_X;o>rfA9T&j~H%FKCCQf7E$`+NXnVV zpJ&K~Bwv~@n^pLcq2^4wPExPueUDqKzb9R)Keu#p@YL%+XPvd~iU>V-_0Q^$8-Ms8 zTf#T-iOHnW8)ElOCs~A^-Mn$NH`G7izI5o-$=HWWeuHAg)78&qol`;+ E07>o4>i_@% literal 0 HcmV?d00001