mirror of
https://github.com/minetest-mods/i3.git
synced 2024-12-26 02:40:38 +01:00
Some tweaks
This commit is contained in:
parent
7e7422def7
commit
60e21627e1
@ -56,7 +56,6 @@ local function cache_groups(group, groups)
|
||||
|
||||
if c > 1 then
|
||||
sprite = sprite:gsub("WxH", px .. "x" .. px * c)
|
||||
|
||||
i3.groups[group].sprite = sprite
|
||||
i3.groups[group].count = c
|
||||
end
|
||||
|
@ -119,7 +119,8 @@ if core.global_exists"armor" then
|
||||
if check_group(def, group) and i ~= j then
|
||||
armor_inv:set_stack("armor", i, armor_inv:get_stack("armor", j))
|
||||
armor_inv:set_stack("armor", j, stack)
|
||||
return play_sound(name, "i3_cannot", 0.8)
|
||||
|
||||
return play_sound(player:get_player_name(), "i3_cannot", 0.8)
|
||||
end
|
||||
end
|
||||
end
|
||||
|
@ -323,7 +323,6 @@ local function rcp_fields(player, data, fields)
|
||||
|
||||
elseif fields.enable_search then
|
||||
data.enable_search = true
|
||||
return set_fs(player)
|
||||
|
||||
elseif fields.filter and (fields.key_enter_field == "filter" or fields.search) then
|
||||
if fields.filter == "" then
|
||||
|
@ -1351,6 +1351,8 @@ local function get_items_fs(fs, data, player, full_height)
|
||||
"style[filter;font_size=18;textcolor=#ccc]",
|
||||
fmt("field[%f,0.2;3.35,0.6;filter;;%s]", data.inv_width + 0.85, ESC(data.filter)),
|
||||
"field_close_on_enter[filter;false]")
|
||||
|
||||
image(data.inv_width + 0.85, 0.75, 4, 0.01, PNG.search_outline_trim .. "^[opacity:100")
|
||||
else
|
||||
fs"style_type[label;font=italic;font_size=18]"
|
||||
label(data.inv_width + 0.9, 0.49, clr("#aaa", ES"Search..."))
|
||||
|
@ -47,6 +47,7 @@ local PNG = {
|
||||
no_result = "i3_no_result.png",
|
||||
find_more = "i3_find_more.png",
|
||||
search_outline = "i3_search_outline.png",
|
||||
search_outline_trim = "i3_search_outline_trim.png",
|
||||
|
||||
cancel_hover = "i3_cancel.png^\\[brighten",
|
||||
search_hover = "i3_search.png^\\[brighten",
|
||||
@ -85,6 +86,7 @@ local styles = string.format([[
|
||||
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[enable_search:pressed;bgimg=%s^[opacity:178]
|
||||
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]
|
||||
@ -102,7 +104,7 @@ local styles = string.format([[
|
||||
]],
|
||||
PNG.slot,
|
||||
PNG.search_hover,
|
||||
PNG.search_outline,
|
||||
PNG.search_outline, PNG.search_outline,
|
||||
PNG.exit, PNG.exit_hover,
|
||||
PNG.cancel, PNG.cancel_hover,
|
||||
PNG.prev, PNG.prev_hover,
|
||||
|
BIN
textures/i3_search_outline_trim.png
Normal file
BIN
textures/i3_search_outline_trim.png
Normal file
Binary file not shown.
After Width: | Height: | Size: 4.8 KiB |
Loading…
Reference in New Issue
Block a user