mirror of
https://github.com/minetest-mods/craftguide.git
synced 2024-11-22 19:03:43 +01:00
Tuning
This commit is contained in:
parent
75e1acad46
commit
7d9ddcb397
25
init.lua
25
init.lua
@ -1522,28 +1522,23 @@ local function make_fs(data)
|
|||||||
|
|
||||||
data.xoffset = ROWS + 1.04
|
data.xoffset = ROWS + 1.04
|
||||||
|
|
||||||
fs(sprintf([[
|
fs(sprintf("formspec_version[%u]size[%f,%f]no_prepend[]bgcolor[#0000]",
|
||||||
formspec_version[%u]
|
MIN_FORMSPEC_VERSION, data.xoffset + (data.query_item and 8 or 0), LINES + 1.7),
|
||||||
size[%f,%f]
|
styles)
|
||||||
no_prepend[]
|
|
||||||
bgcolor[#0000]
|
local filtered = data.filter ~= ""
|
||||||
]],
|
|
||||||
MIN_FORMSPEC_VERSION, data.xoffset + (data.query_item and 8 or 0), LINES + 1.7), styles)
|
|
||||||
|
|
||||||
fs(fmt("bg9", 0, 0, data.xoffset, LINES + 1.7, PNG.bg_full, 10))
|
fs(fmt("bg9", 0, 0, data.xoffset, LINES + 1.7, PNG.bg_full, 10))
|
||||||
|
|
||||||
fs(sprintf([[
|
fs("box[0.2,0.2;4.55,0.6;#bababa25]set_focus[filter]field_close_on_enter[filter;false]")
|
||||||
box[0.2,0.2;4.55,0.6;#bababa25]
|
fs(sprintf("field[0.3,0.2;%f,0.6;filter;;%s]", filtered and 3.45 or 3.9, ESC(data.filter)))
|
||||||
set_focus[filter]
|
|
||||||
field[0.3,0.2;3.4,0.6;filter;;%s]
|
|
||||||
field_close_on_enter[filter;false]
|
|
||||||
]], ESC(data.filter)),
|
|
||||||
fmt("image_button", 4.25, 0.32, 0.35, 0.35, "", "search", ""))
|
|
||||||
|
|
||||||
if data.filter ~= "" then
|
if filtered then
|
||||||
fs(fmt("image_button", 3.75, 0.35, 0.3, 0.3, "", "cancel", ""))
|
fs(fmt("image_button", 3.75, 0.35, 0.3, 0.3, "", "cancel", ""))
|
||||||
end
|
end
|
||||||
|
|
||||||
|
fs(fmt("image_button", 4.25, 0.32, 0.35, 0.35, "", "search", ""))
|
||||||
|
|
||||||
fs(fmt("image_button", data.xoffset - 3.2, 0.15, 0.7, 0.7, "", "prev_page", ""),
|
fs(fmt("image_button", data.xoffset - 3.2, 0.15, 0.7, 0.7, "", "prev_page", ""),
|
||||||
fmt("image_button", data.xoffset - 0.7, 0.15, 0.7, 0.7, "", "next_page", ""))
|
fmt("image_button", data.xoffset - 0.7, 0.15, 0.7, 0.7, "", "next_page", ""))
|
||||||
|
|
||||||
|
Loading…
Reference in New Issue
Block a user