mirror of
https://github.com/minetest-mods/unified_inventory.git
synced 2024-12-28 11:40:24 +01:00
More tooltips and translations.
This commit is contained in:
parent
810f342458
commit
f800f39083
38
internal.lua
38
internal.lua
@ -65,20 +65,34 @@ function unified_inventory.get_formspec(player, page)
|
|||||||
|
|
||||||
-- Controls to flip items pages
|
-- Controls to flip items pages
|
||||||
local start_x = 9.2
|
local start_x = 9.2
|
||||||
formspec = formspec .. "image_button["..(start_x + 0.6 * 0)..",9;.8,.8;ui_skip_backward_icon.png;start_list;]"
|
formspec = formspec .. "image_button[" .. (start_x + 0.6 * 0)
|
||||||
formspec = formspec .. "image_button["..(start_x + 0.6 * 1)..",9;.8,.8;ui_doubleleft_icon.png;rewind3;]"
|
.. ",9;.8,.8;ui_skip_backward_icon.png;start_list;;;;;"
|
||||||
formspec = formspec .. "image_button["..(start_x + 0.6 * 2)..",9;.8,.8;ui_left_icon.png;rewind1;]"
|
.. minetest.formspec_escape(S("First page")) .. "]"
|
||||||
formspec = formspec .. "image_button["..(start_x + 0.6 * 3)..",9;.8,.8;ui_right_icon.png;forward1;]"
|
formspec = formspec .. "image_button[" .. (start_x + 0.6 * 1)
|
||||||
formspec = formspec .. "image_button["..(start_x + 0.6 * 4)..",9;.8,.8;ui_doubleright_icon.png;forward3;]"
|
.. ",9;.8,.8;ui_doubleleft_icon.png;rewind3;;;;;"
|
||||||
formspec = formspec .. "image_button["..(start_x + 0.6 * 5)..",9;.8,.8;ui_skip_forward_icon.png;end_list;]"
|
.. minetest.formspec_escape(S("Back three pages")) .. "]"
|
||||||
|
formspec = formspec .. "image_button[" .. (start_x + 0.6 * 2)
|
||||||
|
.. ",9;.8,.8;ui_left_icon.png;rewind1;;;;;"
|
||||||
|
.. minetest.formspec_escape(S("Back one page")) .. "]"
|
||||||
|
formspec = formspec .. "image_button[" .. (start_x + 0.6 * 3)
|
||||||
|
.. ",9;.8,.8;ui_right_icon.png;forward1;;;;;"
|
||||||
|
.. minetest.formspec_escape(S("Forward one page")) .. "]"
|
||||||
|
formspec = formspec .. "image_button[" .. (start_x + 0.6 * 4)
|
||||||
|
.. ",9;.8,.8;ui_doubleright_icon.png;forward3;;;;;"
|
||||||
|
.. minetest.formspec_escape(S("Forward three pages")) .. "]"
|
||||||
|
formspec = formspec .. "image_button[" .. (start_x + 0.6 * 5)
|
||||||
|
.. ",9;.8,.8;ui_skip_forward_icon.png;end_list;;;;;"
|
||||||
|
.. minetest.formspec_escape(S("Last page")) .. "]"
|
||||||
|
|
||||||
-- Search box
|
-- Search box
|
||||||
formspec = formspec .. "field[9.5,8.325;3,1;searchbox;;"..minetest.formspec_escape(unified_inventory.current_searchbox[player_name]).."]"
|
formspec = formspec .. "field[9.5,8.325;3,1;searchbox;;"
|
||||||
formspec = formspec .. "image_button[12.2,8.1;.8,.8;ui_search_icon.png;searchbutton;]"
|
.. minetest.formspec_escape(unified_inventory.current_searchbox[player_name]) .. "]"
|
||||||
|
formspec = formspec .. "image_button[12.2,8.1;.8,.8;ui_search_icon.png;searchbutton;;;;;"
|
||||||
|
.. S("Search") .. "]"
|
||||||
|
|
||||||
-- Items list
|
-- Items list
|
||||||
if #unified_inventory.filtered_items_list[player_name] == 0 then
|
if #unified_inventory.filtered_items_list[player_name] == 0 then
|
||||||
formspec = formspec.."label[8.2,0;No matching items]"
|
formspec = formspec.."label[8.2,0;" .. S("No matching items") .. "]"
|
||||||
else
|
else
|
||||||
local dir = unified_inventory.active_search_direction[player_name]
|
local dir = unified_inventory.active_search_direction[player_name]
|
||||||
local list_index = unified_inventory.current_index[player_name]
|
local list_index = unified_inventory.current_index[player_name]
|
||||||
@ -100,11 +114,11 @@ function unified_inventory.get_formspec(player, page)
|
|||||||
end
|
end
|
||||||
end
|
end
|
||||||
end
|
end
|
||||||
formspec = formspec.."label[8.2,0;Page:]"
|
formspec = formspec.."label[8.2,0;"..S("Page") .. ": "
|
||||||
formspec = formspec.."label[9,0;"..page.." of "..pagemax.."]"
|
.. S("%s of %s"):format(page,pagemax).."]"
|
||||||
end
|
end
|
||||||
if unified_inventory.activefilter[player_name] ~= "" then
|
if unified_inventory.activefilter[player_name] ~= "" then
|
||||||
formspec = formspec.."label[8.2,0.4;Filter:]"
|
formspec = formspec.."label[8.2,0.4;" .. S("Filter") .. ":]"
|
||||||
formspec = formspec.."label[9,0.4;"..minetest.formspec_escape(unified_inventory.activefilter[player_name]).."]"
|
formspec = formspec.."label[9,0.4;"..minetest.formspec_escape(unified_inventory.activefilter[player_name]).."]"
|
||||||
end
|
end
|
||||||
return formspec
|
return formspec
|
||||||
|
@ -11,9 +11,17 @@ Medium Bag = Rucksack (mittel)
|
|||||||
Large Bag = Rucksack (gross)
|
Large Bag = Rucksack (gross)
|
||||||
|
|
||||||
### inernal.lua ###
|
### inernal.lua ###
|
||||||
Page: = Seite:
|
First page =
|
||||||
|
Back three pages =
|
||||||
|
Back one page =
|
||||||
|
Forward one page =
|
||||||
|
Forward three pages =
|
||||||
|
Last page =
|
||||||
|
No matching items =
|
||||||
|
Page = Seite
|
||||||
%s of %s = %s von %s
|
%s of %s = %s von %s
|
||||||
Filter: = Suche:
|
Filter = Suche
|
||||||
|
Search =
|
||||||
|
|
||||||
### register.lua ###
|
### register.lua ###
|
||||||
Can use the creative inventory = Kann das Kreativinventar nutzen
|
Can use the creative inventory = Kann das Kreativinventar nutzen
|
||||||
@ -21,7 +29,7 @@ Home position set to: %s = Ausgangsposition nach: %s gesetzt
|
|||||||
Time of day set to 6am = Tageszeit auf 6 Uhr morgens geaendert
|
Time of day set to 6am = Tageszeit auf 6 Uhr morgens geaendert
|
||||||
You don't have the settime priviledge! = Du hast nicht das "settime" Privileg!
|
You don't have the settime priviledge! = Du hast nicht das "settime" Privileg!
|
||||||
Time of day set to 9pm = Tageszeit auf 9 Uhr abends geaendert
|
Time of day set to 9pm = Tageszeit auf 9 Uhr abends geaendert
|
||||||
This button has been disabled outside of creative mode to prevent accidental inventory trashing. Use the trash slot instead. = Diese Funktion ist ausserhalb des Kreativmodus deaktiviert um ein versehentliches Loeschen des ganzen Inventars zu verhindern. Nutze stattdessen das Muellfeld.
|
This button has been disabled outside of creative mode to prevent accidental inventory trashing. Use the trash slot instead. = Diese Funktion ist ausserhalb des Kreativmodus deaktiviert um ein versehentliches Loeschen des ganzen Inventars zu verhindern.\nNutze stattdessen das Muellfeld.
|
||||||
Inventory Cleared! = Inventar geleert!
|
Inventory Cleared! = Inventar geleert!
|
||||||
Crafting = Bauen
|
Crafting = Bauen
|
||||||
Trash: = Muell:
|
Trash: = Muell:
|
||||||
@ -37,6 +45,7 @@ Copy to craft grid: = Kopiere ins Baufeld:
|
|||||||
All = Alles
|
All = Alles
|
||||||
Recipe %s of %s = Rezept %s von %s
|
Recipe %s of %s = Rezept %s von %s
|
||||||
Alternate = Alternative
|
Alternate = Alternative
|
||||||
|
Crafting Grid =
|
||||||
|
|
||||||
### waypoints.lua ###
|
### waypoints.lua ###
|
||||||
White =
|
White =
|
||||||
@ -50,4 +59,13 @@ Waypoint inactive =
|
|||||||
World position =
|
World position =
|
||||||
Name =
|
Name =
|
||||||
HUD text color =
|
HUD text color =
|
||||||
Toggle waypoint =
|
Edit waypoint name =
|
||||||
|
Rename waypoint =
|
||||||
|
Change color of waypoint display =
|
||||||
|
Set waypoint to current location =
|
||||||
|
Make waypoint visible =
|
||||||
|
Make waypoint invisible =
|
||||||
|
Disable display of waypoint coordinates =
|
||||||
|
Enable display of waypoint coordinates =
|
||||||
|
Finish editing =
|
||||||
|
Select Waypoint #%d =
|
||||||
|
@ -12,9 +12,17 @@ Medium Bag = Bolsa Mediana
|
|||||||
Large Bag = Bolsa Grande
|
Large Bag = Bolsa Grande
|
||||||
|
|
||||||
### inernal.lua ###
|
### inernal.lua ###
|
||||||
Page: = Página:
|
First page =
|
||||||
|
Back three pages =
|
||||||
|
Back one page =
|
||||||
|
Forward one page =
|
||||||
|
Forward three pages =
|
||||||
|
Last page =
|
||||||
|
No matching items =
|
||||||
|
Page = Página
|
||||||
%s of %s = %s de %s
|
%s of %s = %s de %s
|
||||||
Filter: = Filtro:
|
Filter = Filtro
|
||||||
|
Search =
|
||||||
|
|
||||||
### register.lua ###
|
### register.lua ###
|
||||||
Can use the creative inventory = Puede usar el inventario creativo
|
Can use the creative inventory = Puede usar el inventario creativo
|
||||||
@ -22,7 +30,7 @@ Home position set to: %s = Posición de hogar cambiada a: %s
|
|||||||
Time of day set to 6am = Hora del día cambiada a 6AM
|
Time of day set to 6am = Hora del día cambiada a 6AM
|
||||||
You don't have the settime priviledge! = ¡No tienes el privilegio `settime'!
|
You don't have the settime priviledge! = ¡No tienes el privilegio `settime'!
|
||||||
Time of day set to 9pm = Hora del día cambiada a 9PM
|
Time of day set to 9pm = Hora del día cambiada a 9PM
|
||||||
This button has been disabled outside of creative mode to prevent accidental inventory trashing. Use the trash slot instead. = Éste botón ha sido deshabilitado para prevenir la destrucción accidental del inventario. Usa la ranura para basura en su lugar.
|
This button has been disabled outside of creative mode to prevent accidental inventory trashing. Use the trash slot instead. = Éste botón ha sido deshabilitado para prevenir la destrucción accidental del inventario.\nUsa la ranura para basura en su lugar.
|
||||||
Inventory Cleared! = ¡Inventario limpio!
|
Inventory Cleared! = ¡Inventario limpio!
|
||||||
Crafting = Elaboración
|
Crafting = Elaboración
|
||||||
Trash: = Basura:
|
Trash: = Basura:
|
||||||
@ -38,6 +46,7 @@ Copy to craft grid: = Copiar al cuadro de elaboración
|
|||||||
All = Todos
|
All = Todos
|
||||||
Recipe %s of %s = Receta %s de %s
|
Recipe %s of %s = Receta %s de %s
|
||||||
Alternate = Alternar
|
Alternate = Alternar
|
||||||
|
Crafting Grid =
|
||||||
|
|
||||||
### waypoints.lua ###
|
### waypoints.lua ###
|
||||||
White = Blanco
|
White = Blanco
|
||||||
@ -51,4 +60,13 @@ Waypoint inactive = Punto de paso inactivo
|
|||||||
World position = Posición en el mundo
|
World position = Posición en el mundo
|
||||||
Name = Nombre
|
Name = Nombre
|
||||||
HUD text color = Color del HUD
|
HUD text color = Color del HUD
|
||||||
Toggle waypoint = (Des)Activar punto
|
Edit waypoint name =
|
||||||
|
Rename waypoint =
|
||||||
|
Change color of waypoint display =
|
||||||
|
Set waypoint to current location =
|
||||||
|
Make waypoint visible =
|
||||||
|
Make waypoint invisible =
|
||||||
|
Disable display of waypoint coordinates =
|
||||||
|
Enable display of waypoint coordinates =
|
||||||
|
Finish editing =
|
||||||
|
Select Waypoint #%d =
|
||||||
|
@ -11,32 +11,41 @@ Medium Bag = Sredni plecak
|
|||||||
Large Bag = Duzy plecak
|
Large Bag = Duzy plecak
|
||||||
|
|
||||||
### inernal.lua ###
|
### inernal.lua ###
|
||||||
Page: =
|
First page = Pierwsza strona
|
||||||
%s of %s =
|
Back three pages = 3 strony w tyl
|
||||||
Filter: =
|
Back one page = 1 strona w tyl
|
||||||
|
Forward one page = 1 strona do przodu
|
||||||
|
Forward three pages = 3 strony do przodu
|
||||||
|
Last page = Ostatnia strona
|
||||||
|
No matching items = Brak pasujacych przedmiotow
|
||||||
|
Page = Strona
|
||||||
|
%s of %s = %s z %s
|
||||||
|
Filter = Filtr
|
||||||
|
Search = Szukaj
|
||||||
|
|
||||||
### register.lua ###
|
### register.lua ###
|
||||||
Can use the creative inventory =
|
Can use the creative inventory =
|
||||||
Home position set to: %s =
|
Home position set to: %s = Pozycja domowa ustawiona na: %s
|
||||||
Time of day set to 6am =
|
Time of day set to 6am = Czas ustawiony na 6:00
|
||||||
You don't have the settime priviledge! =
|
You don't have the settime priviledge! = Nie masz uprawnien do zmiany czasu (settime)!
|
||||||
Time of day set to 9pm =
|
Time of day set to 9pm = Czas ustawiony na 21:00
|
||||||
This button has been disabled outside of creative mode to prevent accidental inventory trashing. Use the trash slot instead. =
|
This button has been disabled outside of creative mode to prevent accidental inventory trashing.\nUse the trash slot instead. =
|
||||||
Inventory Cleared! =
|
Inventory Cleared! =
|
||||||
Crafting =
|
Crafting =
|
||||||
Trash: =
|
Trash: = Smietnik:
|
||||||
Refill: =
|
Refill: = Uzupelnianie:
|
||||||
Crafting Guide =
|
Crafting Guide =
|
||||||
Method: =
|
Method: = Metoda:
|
||||||
Result: %s =
|
Result: %s = Wynik: %s
|
||||||
crafting =
|
crafting =
|
||||||
shapeless crafting =
|
shapeless crafting =
|
||||||
cooking =
|
cooking =
|
||||||
alloy cooking =
|
alloy cooking =
|
||||||
Copy to craft grid: =
|
Copy to craft grid: =
|
||||||
All =
|
All = Wszystko
|
||||||
Recipe %s of %s =
|
Recipe %s of %s = Recepta %s z %s
|
||||||
Alternate =
|
Alternate = Alternatywa
|
||||||
|
Crafting Grid =
|
||||||
|
|
||||||
### waypoints.lua ###
|
### waypoints.lua ###
|
||||||
White = Bialy
|
White = Bialy
|
||||||
@ -45,9 +54,18 @@ Red = Czerwony
|
|||||||
Green = Zielony
|
Green = Zielony
|
||||||
Blue = Niebieski
|
Blue = Niebieski
|
||||||
Waypoints = Punkty orientacyjne
|
Waypoints = Punkty orientacyjne
|
||||||
Waypoint active = Punkt wylaczony
|
Waypoint active = Punkt wlaczony
|
||||||
Waypoint inactive = Punkt wlaczony
|
Waypoint inactive = Punkt wylaczony
|
||||||
World position = Pozycja
|
World position = Pozycja
|
||||||
Name = Nazwa
|
Name = Nazwa
|
||||||
HUD text color = Kolor tekstu HUD
|
HUD text color = Kolor tekstu HUD
|
||||||
Toggle waypoint = Przelacz punkt
|
Edit waypoint name = Edytuj nazwe punktu
|
||||||
|
Rename waypoint = Zmien nazwe punktu
|
||||||
|
Change color of waypoint display = Zmien kolor punktu
|
||||||
|
Set waypoint to current location = Ustaw punkt orientacyjny na biezacej pozycji
|
||||||
|
Make waypoint visible = Pokaz punkt
|
||||||
|
Make waypoint invisible = Nie pokazuj punktu
|
||||||
|
Disable display of waypoint coordinates = Pokazuj koordynaty punktu
|
||||||
|
Enable display of waypoint coordinates = Nie pokazuj koordynatow punktu
|
||||||
|
Finish editing = Zakoncz edycje
|
||||||
|
Select Waypoint #%d = Wybierz punkt #%d
|
||||||
|
@ -12,9 +12,17 @@ Medium Bag =
|
|||||||
Large Bag =
|
Large Bag =
|
||||||
|
|
||||||
### inernal.lua ###
|
### inernal.lua ###
|
||||||
Page: =
|
First page =
|
||||||
|
Back three pages =
|
||||||
|
Back one page =
|
||||||
|
Forward one page =
|
||||||
|
Forward three pages =
|
||||||
|
Last page =
|
||||||
|
No matching items =
|
||||||
|
Page =
|
||||||
%s of %s =
|
%s of %s =
|
||||||
Filter: =
|
Filter =
|
||||||
|
Search =
|
||||||
|
|
||||||
### register.lua ###
|
### register.lua ###
|
||||||
Can use the creative inventory =
|
Can use the creative inventory =
|
||||||
@ -22,7 +30,7 @@ Home position set to: %s =
|
|||||||
Time of day set to 6am =
|
Time of day set to 6am =
|
||||||
You don't have the settime priviledge! =
|
You don't have the settime priviledge! =
|
||||||
Time of day set to 9pm =
|
Time of day set to 9pm =
|
||||||
This button has been disabled outside of creative mode to prevent accidental inventory trashing. Use the trash slot instead. =
|
This button has been disabled outside of creative mode to prevent accidental inventory trashing.\nUse the trash slot instead. =
|
||||||
Inventory Cleared! =
|
Inventory Cleared! =
|
||||||
Crafting =
|
Crafting =
|
||||||
Trash: =
|
Trash: =
|
||||||
@ -38,6 +46,7 @@ Copy to craft grid: =
|
|||||||
All =
|
All =
|
||||||
Recipe %s of %s =
|
Recipe %s of %s =
|
||||||
Alternate =
|
Alternate =
|
||||||
|
Crafting Grid =
|
||||||
|
|
||||||
### waypoints.lua ###
|
### waypoints.lua ###
|
||||||
White =
|
White =
|
||||||
@ -51,4 +60,13 @@ Waypoint inactive =
|
|||||||
World position =
|
World position =
|
||||||
Name =
|
Name =
|
||||||
HUD text color =
|
HUD text color =
|
||||||
Toggle waypoint =
|
Edit waypoint name =
|
||||||
|
Rename waypoint =
|
||||||
|
Change color of waypoint display =
|
||||||
|
Set waypoint to current location =
|
||||||
|
Make waypoint visible =
|
||||||
|
Make waypoint invisible =
|
||||||
|
Disable display of waypoint coordinates =
|
||||||
|
Enable display of waypoint coordinates =
|
||||||
|
Finish editing =
|
||||||
|
Select Waypoint #%d =
|
||||||
|
33
register.lua
33
register.lua
@ -29,7 +29,7 @@ trash:set_size("main", 1)
|
|||||||
unified_inventory.register_button("craft", {
|
unified_inventory.register_button("craft", {
|
||||||
type = "image",
|
type = "image",
|
||||||
image = "ui_craft_icon.png",
|
image = "ui_craft_icon.png",
|
||||||
tooltip = S("Crafting Menu")
|
tooltip = S("Crafting Grid")
|
||||||
})
|
})
|
||||||
|
|
||||||
unified_inventory.register_button("craftguide", {
|
unified_inventory.register_button("craftguide", {
|
||||||
@ -50,8 +50,7 @@ unified_inventory.register_button("home_gui_set", {
|
|||||||
minetest.sound_play("dingdong",
|
minetest.sound_play("dingdong",
|
||||||
{to_player=player_name, gain = 1.0})
|
{to_player=player_name, gain = 1.0})
|
||||||
minetest.chat_send_player(player_name,
|
minetest.chat_send_player(player_name,
|
||||||
"Home position set to: "
|
S("Home position set to: %s"):format(minetest.pos_to_string(home)))
|
||||||
..minetest.pos_to_string(home))
|
|
||||||
end
|
end
|
||||||
end,
|
end,
|
||||||
})
|
})
|
||||||
@ -78,11 +77,10 @@ unified_inventory.register_button("misc_set_day", {
|
|||||||
{to_player=player_name, gain = 1.0})
|
{to_player=player_name, gain = 1.0})
|
||||||
minetest.set_timeofday((6000 % 24000) / 24000)
|
minetest.set_timeofday((6000 % 24000) / 24000)
|
||||||
minetest.chat_send_player(player_name,
|
minetest.chat_send_player(player_name,
|
||||||
"Time of day set to 6am")
|
S("Time of day set to 6am"))
|
||||||
else
|
else
|
||||||
minetest.chat_send_player(player_name,
|
minetest.chat_send_player(player_name,
|
||||||
"You don't have the"
|
S("You don't have the settime priviledge!"))
|
||||||
.." settime priviledge!")
|
|
||||||
end
|
end
|
||||||
end,
|
end,
|
||||||
})
|
})
|
||||||
@ -98,11 +96,10 @@ unified_inventory.register_button("misc_set_night", {
|
|||||||
{to_player=player_name, gain = 1.0})
|
{to_player=player_name, gain = 1.0})
|
||||||
minetest.set_timeofday((21000 % 24000) / 24000)
|
minetest.set_timeofday((21000 % 24000) / 24000)
|
||||||
minetest.chat_send_player(player_name,
|
minetest.chat_send_player(player_name,
|
||||||
"Time of day set to 9pm")
|
S("Time of day set to 9pm"))
|
||||||
else
|
else
|
||||||
minetest.chat_send_player(player_name,
|
minetest.chat_send_player(player_name,
|
||||||
"You don't have the"
|
S("You don't have the settime priviledge!"))
|
||||||
.." settime priviledge!")
|
|
||||||
end
|
end
|
||||||
end,
|
end,
|
||||||
})
|
})
|
||||||
@ -115,10 +112,10 @@ unified_inventory.register_button("clear_inv", {
|
|||||||
local player_name = player:get_player_name()
|
local player_name = player:get_player_name()
|
||||||
if not unified_inventory.is_creative(player_name) then
|
if not unified_inventory.is_creative(player_name) then
|
||||||
minetest.chat_send_player(player_name,
|
minetest.chat_send_player(player_name,
|
||||||
"This button has been disabled outside"
|
S("This button has been disabled outside"
|
||||||
.." of creative mode to prevent"
|
.." of creative mode to prevent"
|
||||||
.." accidental inventory trashing."
|
.." accidental inventory trashing."
|
||||||
.." Use the trash slot instead.")
|
.."\nUse the trash slot instead."))
|
||||||
return
|
return
|
||||||
end
|
end
|
||||||
player:get_inventory():set_list("main", {})
|
player:get_inventory():set_list("main", {})
|
||||||
@ -137,10 +134,10 @@ unified_inventory.register_page("craft", {
|
|||||||
formspec = formspec.."listcolors[#00000000;#00000000]"
|
formspec = formspec.."listcolors[#00000000;#00000000]"
|
||||||
formspec = formspec.."list[current_player;craftpreview;6,1;1,1;]"
|
formspec = formspec.."list[current_player;craftpreview;6,1;1,1;]"
|
||||||
formspec = formspec.."list[current_player;craft;2,1;3,3;]"
|
formspec = formspec.."list[current_player;craft;2,1;3,3;]"
|
||||||
formspec = formspec.."label[7,2.5;Trash:]"
|
formspec = formspec.."label[7,2.5;" .. S("Trash:") .. "]"
|
||||||
formspec = formspec.."list[detached:trash;main;7,3;1,1;]"
|
formspec = formspec.."list[detached:trash;main;7,3;1,1;]"
|
||||||
if unified_inventory.is_creative(player_name) then
|
if unified_inventory.is_creative(player_name) then
|
||||||
formspec = formspec.."label[0,2.5;Refill:]"
|
formspec = formspec.."label[0,2.5;" .. S("Refill:") .. "]"
|
||||||
formspec = formspec.."list[detached:"..minetest.formspec_escape(player_name).."refill;main;0,3;1,1;]"
|
formspec = formspec.."list[detached:"..minetest.formspec_escape(player_name).."refill;main;0,3;1,1;]"
|
||||||
end
|
end
|
||||||
return {formspec=formspec}
|
return {formspec=formspec}
|
||||||
@ -204,7 +201,7 @@ unified_inventory.register_page("craftguide", {
|
|||||||
local player_name = player:get_player_name()
|
local player_name = player:get_player_name()
|
||||||
local formspec = ""
|
local formspec = ""
|
||||||
formspec = formspec.."background[0,4.5;8,4;ui_main_inventory.png]"
|
formspec = formspec.."background[0,4.5;8,4;ui_main_inventory.png]"
|
||||||
formspec = formspec.."label[0,0;Crafting Guide]"
|
formspec = formspec.."label[0,0;" .. S("Crafting Guide") .. "]"
|
||||||
formspec = formspec.."listcolors[#00000000;#00000000]"
|
formspec = formspec.."listcolors[#00000000;#00000000]"
|
||||||
local item_name = unified_inventory.current_item[player_name]
|
local item_name = unified_inventory.current_item[player_name]
|
||||||
if not item_name then return {formspec=formspec} end
|
if not item_name then return {formspec=formspec} end
|
||||||
@ -232,7 +229,7 @@ unified_inventory.register_page("craftguide", {
|
|||||||
|
|
||||||
local craft_type = unified_inventory.registered_craft_types[craft.type] or
|
local craft_type = unified_inventory.registered_craft_types[craft.type] or
|
||||||
unified_inventory.craft_type_defaults(craft.type, {})
|
unified_inventory.craft_type_defaults(craft.type, {})
|
||||||
formspec = formspec.."label[6,3.35;Method:]"
|
formspec = formspec.."label[6,3.35;" .. S("Method:") .. "]"
|
||||||
formspec = formspec.."label[6,3.75;"
|
formspec = formspec.."label[6,3.75;"
|
||||||
..minetest.formspec_escape(craft_type.description).."]"
|
..minetest.formspec_escape(craft_type.description).."]"
|
||||||
formspec = formspec..stack_image_button(6, 1, 1.1, 1.1, "item_button_usage_", ItemStack(craft.output))
|
formspec = formspec..stack_image_button(6, 1, 1.1, 1.1, "item_button_usage_", ItemStack(craft.output))
|
||||||
@ -263,17 +260,17 @@ unified_inventory.register_page("craftguide", {
|
|||||||
end
|
end
|
||||||
|
|
||||||
if craft_type.uses_crafting_grid then
|
if craft_type.uses_crafting_grid then
|
||||||
formspec = formspec.."label[6,1.95;Copy to craft grid:]"
|
formspec = formspec.."label[6,1.95;" .. S("Copy to craft grid:") .. "]"
|
||||||
.."button[6,2.5;0.6,0.5;craftguide_craft_1;1]"
|
.."button[6,2.5;0.6,0.5;craftguide_craft_1;1]"
|
||||||
.."button[6.6,2.5;0.6,0.5;craftguide_craft_10;10]"
|
.."button[6.6,2.5;0.6,0.5;craftguide_craft_10;10]"
|
||||||
.."button[7.2,2.5;0.6,0.5;craftguide_craft_max;All]"
|
.."button[7.2,2.5;0.6,0.5;craftguide_craft_max;" .. S("All") .. "]"
|
||||||
end
|
end
|
||||||
|
|
||||||
if alternates and alternates > 1 then
|
if alternates and alternates > 1 then
|
||||||
formspec = formspec.."label[0,2.6;"..recipe_text[dir].." "
|
formspec = formspec.."label[0,2.6;"..recipe_text[dir].." "
|
||||||
..tostring(alternate).." of "
|
..tostring(alternate).." of "
|
||||||
..tostring(alternates).."]"
|
..tostring(alternates).."]"
|
||||||
.."button[0,3.15;2,1;alternate;Alternate]"
|
.."button[0,3.15;2,1;alternate;" .. S("Alternate") .. "]"
|
||||||
end
|
end
|
||||||
return {formspec = formspec}
|
return {formspec = formspec}
|
||||||
end,
|
end,
|
||||||
|
@ -24,42 +24,45 @@ unified_inventory.register_page("waypoints", {
|
|||||||
-- Tabs buttons:
|
-- Tabs buttons:
|
||||||
local i
|
local i
|
||||||
for i = 1, 5, 1 do
|
for i = 1, 5, 1 do
|
||||||
if i == waypoints.selected then
|
formspec = formspec ..
|
||||||
formspec = formspec ..
|
"image_button[0.0,".. 0.2 + i*0.7 ..";.8,.8;"..
|
||||||
"image_button[0.0,".. 0.2 + i*0.7 ..";.8,.8;ui_blue_icon_background.png^ui_"..
|
(i == waypoints.selected and "ui_blue_icon_background.png^" or "")..
|
||||||
i .."_icon.png;select_waypoint".. i .. ";]"
|
"ui_"..i.."_icon.png;"..
|
||||||
else
|
"select_waypoint"..i..";;;;;"..
|
||||||
formspec = formspec ..
|
minetest.formspec_escape(S("Select Waypoint #%d"):format(i)).."]"
|
||||||
"image_button[0.0,".. 0.2 + i*0.7 ..";.8,.8;ui_"..
|
|
||||||
i .."_icon.png;select_waypoint".. i .. ";]"
|
|
||||||
end
|
|
||||||
end
|
end
|
||||||
|
|
||||||
i = waypoints.selected
|
i = waypoints.selected
|
||||||
|
|
||||||
-- Main buttons:
|
-- Main buttons:
|
||||||
formspec = formspec ..
|
formspec = formspec ..
|
||||||
"image_button[4.5,3.7;.8,.8;ui_waypoint_set_icon.png;set_waypoint".. i .. ";]"
|
"image_button[4.5,3.7;.8,.8;"..
|
||||||
|
"ui_waypoint_set_icon.png;"..
|
||||||
|
"set_waypoint"..i..";;;;;"..
|
||||||
|
minetest.formspec_escape(S("Set waypoint to current location")).."]"
|
||||||
|
|
||||||
if waypoints[i].active then
|
formspec = formspec ..
|
||||||
formspec = formspec ..
|
"image_button[5.2,3.7;.8,.8;"..
|
||||||
"image_button[5.2,3.7;.8,.8;ui_on_icon.png;toggle_waypoint".. i .. ";;;;;"..S("Toggle waypoint").."]"
|
(waypoints[i].active and "ui_on_icon.png" or "ui_off_icon.png")..";"..
|
||||||
else
|
"toggle_waypoint"..i..";;;;;"..
|
||||||
formspec = formspec ..
|
minetest.formspec_escape(S("Make waypoint "..(waypoints[i].active and "invisible" or "visible"))).."]"
|
||||||
"image_button[5.2,3.7;.8,.8;ui_off_icon.png;toggle_waypoint".. i .. ";;;;;"..S("Toggle waypoint").."]"
|
|
||||||
end
|
|
||||||
|
|
||||||
if waypoints[i].display_pos then
|
|
||||||
formspec = formspec ..
|
|
||||||
"image_button[5.9,3.7;.8,.8;ui_green_icon_background.png^ui_xyz_icon.png;toggle_display_pos".. i .. ";]"
|
|
||||||
else
|
|
||||||
formspec = formspec ..
|
|
||||||
"image_button[5.9,3.7;.8,.8;ui_red_icon_background.png^ui_xyz_icon.png;toggle_display_pos".. i .. ";]"
|
|
||||||
end
|
|
||||||
|
|
||||||
formspec = formspec ..
|
formspec = formspec ..
|
||||||
"image_button[6.6,3.7;.8,.8;ui_circular_arrows_icon.png;toggle_color".. i .. ";]"..
|
"image_button[5.9,3.7;.8,.8;"..
|
||||||
"image_button[7.3,3.7;.8,.8;ui_pencil_icon.png;rename_waypoint".. i .. ";]"
|
(waypoints[i].display_pos and "ui_green_icon_background.png" or "ui_red_icon_background.png").."^ui_xyz_icon.png;"..
|
||||||
|
"toggle_display_pos"..i..";;;;;"..
|
||||||
|
minetest.formspec_escape(S((waypoints[i].display_pos and "Disable" or "Enable").." display of waypoint coordinates")).."]"
|
||||||
|
|
||||||
|
formspec = formspec ..
|
||||||
|
"image_button[6.6,3.7;.8,.8;"..
|
||||||
|
"ui_circular_arrows_icon.png;"..
|
||||||
|
"toggle_color"..i..";;;;;"..
|
||||||
|
minetest.formspec_escape(S("Change color of waypoint display")).."]"
|
||||||
|
formspec = formspec ..
|
||||||
|
"image_button[7.3,3.7;.8,.8;"..
|
||||||
|
"ui_pencil_icon.png;"..
|
||||||
|
"rename_waypoint"..i..";;;;;"..
|
||||||
|
minetest.formspec_escape(S("Edit waypoint name")).."]"
|
||||||
|
|
||||||
-- Waypoint's info:
|
-- Waypoint's info:
|
||||||
if waypoints[i].active then
|
if waypoints[i].active then
|
||||||
@ -71,7 +74,10 @@ unified_inventory.register_page("waypoints", {
|
|||||||
if waypoints[i].edit then
|
if waypoints[i].edit then
|
||||||
formspec = formspec ..
|
formspec = formspec ..
|
||||||
"field[1.3,3.2;6,.8;rename_box" .. i .. ";;"..waypoints[i].name.."]" ..
|
"field[1.3,3.2;6,.8;rename_box" .. i .. ";;"..waypoints[i].name.."]" ..
|
||||||
"image_button[7.3,2.9;.8,.8;ui_ok_icon.png;confirm_rename".. i .. ";]"
|
"image_button[7.3,2.9;.8,.8;"..
|
||||||
|
"ui_ok_icon.png;"..
|
||||||
|
"confirm_rename"..i.. ";;;;;"..
|
||||||
|
minetest.formspec_escape(S("Finish editing")).."]"
|
||||||
end
|
end
|
||||||
|
|
||||||
formspec = formspec .. "label[1,1.3;"..S("World position")..": " ..
|
formspec = formspec .. "label[1,1.3;"..S("World position")..": " ..
|
||||||
@ -87,6 +93,7 @@ unified_inventory.register_page("waypoints", {
|
|||||||
unified_inventory.register_button("waypoints", {
|
unified_inventory.register_button("waypoints", {
|
||||||
type = "image",
|
type = "image",
|
||||||
image = "ui_waypoints_icon.png",
|
image = "ui_waypoints_icon.png",
|
||||||
|
tooltip = S("Waypoints"),
|
||||||
})
|
})
|
||||||
|
|
||||||
unified_inventory.update_hud = function (player, waypoint)
|
unified_inventory.update_hud = function (player, waypoint)
|
||||||
|
Loading…
Reference in New Issue
Block a user