From 20b8110375975e04cdd329da46d0b7eec4888702 Mon Sep 17 00:00:00 2001 From: Jean-Patrick Guerrero Date: Mon, 1 Aug 2022 04:10:16 +0200 Subject: [PATCH] Minor tweak --- src/common.lua | 2 +- src/gui.lua | 3 +-- src/styles.lua | 2 ++ 3 files changed, 4 insertions(+), 3 deletions(-) diff --git a/src/common.lua b/src/common.lua index 1f63194..96cd28f 100644 --- a/src/common.lua +++ b/src/common.lua @@ -80,7 +80,7 @@ end local function utf8_len(str) local c = 0 - for _ in str:gmatch"([%z\1-\127\194-\244][\128-\191]*)" do -- Arguably working duct-tape code + for _ in str:gmatch"[%z\1-\127\194-\244][\128-\191]*" do -- Arguably working duct-tape code c++ end diff --git a/src/gui.lua b/src/gui.lua index 9320866..d8e25b0 100644 --- a/src/gui.lua +++ b/src/gui.lua @@ -1334,7 +1334,6 @@ 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.12, 4, 0.8, "enable_search", "") end @@ -1347,7 +1346,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")) - image(data.inv_width + 0.8, 0.14, 4, 0.8, PNG.search_outline) + image(data.inv_width + 0.8, 0.13, 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 cc39c31..7c31ef2 100644 --- a/src/styles.lua +++ b/src/styles.lua @@ -83,6 +83,7 @@ local styles = string.format([[ style[nofav;sound=i3_cannot] style[pagenum,no_item,no_rcp;font=bold;font_size=18] style[search;fgimg=%s;content_offset=0] + style[enable_search:hovered;bgimg=%s] style[exit;fgimg=%s;fgimg_hovered=%s;content_offset=0] style[cancel;fgimg=%s;fgimg_hovered=%s;content_offset=0] style[prev_page,prev_recipe,prev_usage,prev_sort,prev_skin;fgimg=%s;fgimg_hovered=%s] @@ -100,6 +101,7 @@ local styles = string.format([[ ]], PNG.slot, PNG.search_hover, +PNG.search_outline, PNG.exit, PNG.exit_hover, PNG.cancel, PNG.cancel_hover, PNG.prev, PNG.prev_hover,