mirror of
https://github.com/minetest-mods/unified_inventory.git
synced 2025-06-20 02:20:27 +02:00
Fix deprecated field 'hud_elem_type' and limit line length
This commit is contained in:
parent
240e6cc68a
commit
dd17b6ce17
@ -1,6 +1,6 @@
|
||||
unused_args = false
|
||||
allow_defined_top = true
|
||||
max_line_length = 999
|
||||
max_line_length = 131
|
||||
|
||||
globals = {
|
||||
"unified_inventory",
|
||||
@ -11,8 +11,9 @@ read_globals = {
|
||||
table = {fields = {"copy", "getn"}},
|
||||
|
||||
"dump",
|
||||
"minetest", "vector",
|
||||
"core", "minetest",
|
||||
"ItemStack", "datastorage",
|
||||
"vector",
|
||||
|
||||
"hb",
|
||||
"doors",
|
||||
|
@ -143,18 +143,21 @@ local function formspec_add_categories(player, formspec, ui_peruser)
|
||||
if ui.current_category[player_name] == category.name then
|
||||
scale = 1
|
||||
end
|
||||
formspec[n] = formspec_button(ui_peruser, "category_"..category.name, category.symbol, categories_pos, {column-1, 0}, scale, category.label)
|
||||
formspec[n] = formspec_button(ui_peruser, "category_"..category.name, category.symbol, categories_pos,
|
||||
{column-1, 0}, scale, category.label)
|
||||
n = n + 1
|
||||
end
|
||||
end
|
||||
if category_count > ui_peruser.pagecols and scroll_offset > 0 then
|
||||
-- prev
|
||||
formspec[n] = formspec_button(ui_peruser, "prev_category", "ui_left_icon.png", categories_scroll_pos, {ui_peruser.pagecols - 2, 0}, 0.8, S("Scroll categories left"))
|
||||
formspec[n] = formspec_button(ui_peruser, "prev_category", "ui_left_icon.png", categories_scroll_pos,
|
||||
{ui_peruser.pagecols - 2, 0}, 0.8, S("Scroll categories left"))
|
||||
n = n + 1
|
||||
end
|
||||
if category_count > ui_peruser.pagecols and category_count - scroll_offset > ui_peruser.pagecols then
|
||||
-- next
|
||||
formspec[n] = formspec_button(ui_peruser, "next_category", "ui_right_icon.png", categories_scroll_pos, {ui_peruser.pagecols - 1, 0}, 0.8, S("Scroll categories right"))
|
||||
formspec[n] = formspec_button(ui_peruser, "next_category", "ui_right_icon.png", categories_scroll_pos,
|
||||
{ui_peruser.pagecols - 1, 0}, 0.8, S("Scroll categories right"))
|
||||
end
|
||||
end
|
||||
|
||||
|
@ -164,7 +164,8 @@ ui.register_page("waypoints", {
|
||||
},
|
||||
{
|
||||
"toggle_display_pos",
|
||||
waypoint.display_pos and "ui_green_icon_background.png^ui_xyz_icon.png" or "ui_red_icon_background.png^ui_xyz_icon.png^(ui_no.png^[transformR90)",
|
||||
waypoint.display_pos and "ui_green_icon_background.png^ui_xyz_icon.png" or
|
||||
"ui_red_icon_background.png^ui_xyz_icon.png^(ui_no.png^[transformR90)",
|
||||
waypoint.display_pos and S("Hide coordinates") or S("Show coordinates")
|
||||
},
|
||||
{
|
||||
@ -254,7 +255,7 @@ local function update_hud(player, waypoints, temp, i)
|
||||
end
|
||||
if waypoint.active then
|
||||
temp.hud = player:hud_add({
|
||||
hud_elem_type = "waypoint",
|
||||
[core.features.hud_def_type_field and "type" or "hud_elem_type"] = "waypoint",
|
||||
number = hud_colors[waypoint.color or 1][2] ,
|
||||
name = name,
|
||||
text = "m",
|
||||
|
Loading…
x
Reference in New Issue
Block a user