From f70cb29214ab245876520bb4a1879332977467d3 Mon Sep 17 00:00:00 2001 From: Jean-Patrick Guerrero Date: Sun, 20 Dec 2020 02:04:35 +0100 Subject: [PATCH] More design improvements --- init.lua | 17 +++++++++++++---- textures/craftguide_no.png | Bin 1670 -> 0 bytes 2 files changed, 13 insertions(+), 4 deletions(-) delete mode 100644 textures/craftguide_no.png diff --git a/init.lua b/init.lua index 40b8eb9..cbce575 100644 --- a/init.lua +++ b/init.lua @@ -86,7 +86,7 @@ local PNG = { fire_anim = "craftguide_fire_anim.png", book = "craftguide_book.png", sign = "craftguide_sign.png", - nothing = "craftguide_no.png", + cancel = "craftguide_cancel.png", selected = "craftguide_selected.png", furnace_anim = "craftguide_furnace_anim.png", @@ -118,6 +118,7 @@ local styles = sprintf([[ sound=craftguide_click] style[filter;border=false] + style[cancel;fgimg=%s;fgimg_hovered=%s^[brighten;fgimg_pressed=%s^[brighten] style[search;fgimg=%s;fgimg_hovered=%s] style[prev_page;fgimg=%s;fgimg_hovered=%s;fgimg_pressed=%s] style[next_page;fgimg=%s;fgimg_hovered=%s;fgimg_pressed=%s] @@ -131,6 +132,7 @@ local styles = sprintf([[ bgimg_pressed=craftguide_btn9_pressed.png;bgimg_middle=4,6] ]], PNG.selected, PNG.selected, +PNG.cancel, PNG.cancel, PNG.cancel, PNG.search, PNG.search_hover, PNG.prev, PNG.prev_hover, PNG.prev_hover, PNG.next, PNG.next_hover, PNG.next_hover, @@ -223,6 +225,13 @@ local group_names = { craftguide.model_alias = { ["boats:boat"] = {name = "boats:boat", drawtype = "entity"}, ["carts:cart"] = {name = "carts:cart", drawtype = "entity", frames = "0,0"}, + ["default:chest"] = {name = "default:chest_open"}, + ["default:chest_locked"] = {name = "default:chest_locked_open"}, + ["doors:door_wood"] = {name = "doors:door_wood_a"}, + ["doors:door_glass"] = {name = "doors:door_glass_a"}, + ["doors:door_obsidian_glass"] = {name = "doors:door_obsidian_glass_a"}, + ["doors:door_steel"] = {name = "doors:door_steel_a"}, + ["xpanes:door_steel_bar"] = {name = "xpanes:door_steel_bar_a"}, } local function err(str) @@ -1336,7 +1345,7 @@ local function get_model_fs(fs, data, def, model_alias) fs(fmt("model", data.xoffset + 6.6, data.yoffset + 0.05, 1.3, 1.3, "", - def.mesh, concat(t, ","), model_alias.frames or "")) + def.mesh, concat(t, ","), model_alias and model_alias.frames or "")) end local function get_title_fs(fs, data) @@ -1353,7 +1362,7 @@ local function get_title_fs(fs, data) sprintf("tooltip[fav;%s]", fav and ES"Unmark this item" or ES"Mark this item")) else fs(sprintf("style[nofav;fgimg=%s;fgimg_hovered=%s;fgimg_pressed=%s]", - "craftguide_fav_off.png", PNG.nothing, PNG.nothing), + "craftguide_fav_off.png", PNG.cancel, PNG.cancel), fmt("image_button", star_x, star_y, star_size, star_size, "", "nofav", ""), sprintf("tooltip[nofav;%s]", ES"Cannot mark this item. Bookmark limit reached.")) end @@ -1532,7 +1541,7 @@ local function make_fs(data) fmt("image_button", 4.25, 0.14, 0.7, 0.7, "", "search", "")) if data.filter ~= "" then - fs(fmt("image_button", 3.75, 0.35, 0.3, 0.3, "craftguide_cancel.png", "cancel", "")) + fs(fmt("image_button", 3.75, 0.35, 0.3, 0.3, PNG.cancel, "cancel", "")) end fs(fmt("image_button", data.xoffset - 3.2, 0.15, 0.7, 0.7, "", "prev_page", ""), diff --git a/textures/craftguide_no.png b/textures/craftguide_no.png deleted file mode 100644 index 703f16b546ae7f1f0d906dfe42e3cb15b0c944c9..0000000000000000000000000000000000000000 GIT binary patch literal 0 HcmV?d00001 literal 1670 zcmV;126_33P) zaB^>EX>4U6ba`-PAZ2)IW&i+q+O1YwlEWwr{MRY=2uR`~j)TEe?G5($+t`j1XC@CP z6Uqh)AvJ0tLi2zBcKQcDVKed}S@^(DSBN$ zQ`z(jHmc^$-T=@#lFYhO3T18P%IcQ4tq62|3LabD9(t@1V^vS+f?kjyAcyVk0d%(kIt2ML zqWkFYqr2cs+2nc`%ech|gI^~&{2u%z#5az0MFR82ZsNnz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