Update tooltips usage due to core changes.
This commit is contained in:
parent
f800f39083
commit
0d777362f3
51
internal.lua
51
internal.lua
@ -48,8 +48,9 @@ function unified_inventory.get_formspec(player, page)
|
|||||||
formspec = formspec.."image_button["
|
formspec = formspec.."image_button["
|
||||||
..(0.65 * (i - 1))..",9;0.8,0.8;"
|
..(0.65 * (i - 1))..",9;0.8,0.8;"
|
||||||
..minetest.formspec_escape(def.image)..";"
|
..minetest.formspec_escape(def.image)..";"
|
||||||
..minetest.formspec_escape(def.name)..";;;;;"
|
..minetest.formspec_escape(def.name)..";]"
|
||||||
..tooltip.."]"
|
.."tooltip["..minetest.formspec_escape(def.name)
|
||||||
|
..";"..tooltip.."]"
|
||||||
end
|
end
|
||||||
end
|
end
|
||||||
|
|
||||||
@ -65,30 +66,36 @@ 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)
|
formspec = formspec
|
||||||
.. ",9;.8,.8;ui_skip_backward_icon.png;start_list;;;;;"
|
.. "image_button[" .. (start_x + 0.6 * 0)
|
||||||
.. minetest.formspec_escape(S("First page")) .. "]"
|
.. ",9;.8,.8;ui_skip_backward_icon.png;start_list;]"
|
||||||
formspec = formspec .. "image_button[" .. (start_x + 0.6 * 1)
|
.. "tooltip[start_list;" .. minetest.formspec_escape(S("First page")) .. "]"
|
||||||
.. ",9;.8,.8;ui_doubleleft_icon.png;rewind3;;;;;"
|
|
||||||
.. minetest.formspec_escape(S("Back three pages")) .. "]"
|
.. "image_button[" .. (start_x + 0.6 * 1)
|
||||||
formspec = formspec .. "image_button[" .. (start_x + 0.6 * 2)
|
.. ",9;.8,.8;ui_doubleleft_icon.png;rewind3;]"
|
||||||
.. ",9;.8,.8;ui_left_icon.png;rewind1;;;;;"
|
.. "tooltip[rewind3;" .. minetest.formspec_escape(S("Back three pages")) .. "]"
|
||||||
.. minetest.formspec_escape(S("Back one page")) .. "]"
|
|
||||||
formspec = formspec .. "image_button[" .. (start_x + 0.6 * 3)
|
.. "image_button[" .. (start_x + 0.6 * 2)
|
||||||
.. ",9;.8,.8;ui_right_icon.png;forward1;;;;;"
|
.. ",9;.8,.8;ui_left_icon.png;rewind1;]"
|
||||||
.. minetest.formspec_escape(S("Forward one page")) .. "]"
|
.. "tooltip[rewind1;" .. minetest.formspec_escape(S("Back one page")) .. "]"
|
||||||
formspec = formspec .. "image_button[" .. (start_x + 0.6 * 4)
|
|
||||||
.. ",9;.8,.8;ui_doubleright_icon.png;forward3;;;;;"
|
.. "image_button[" .. (start_x + 0.6 * 3)
|
||||||
.. minetest.formspec_escape(S("Forward three pages")) .. "]"
|
.. ",9;.8,.8;ui_right_icon.png;forward1;]"
|
||||||
formspec = formspec .. "image_button[" .. (start_x + 0.6 * 5)
|
.. "tooltip[forward1;" .. minetest.formspec_escape(S("Forward one page")) .. "]"
|
||||||
.. ",9;.8,.8;ui_skip_forward_icon.png;end_list;;;;;"
|
|
||||||
.. minetest.formspec_escape(S("Last page")) .. "]"
|
.. "image_button[" .. (start_x + 0.6 * 4)
|
||||||
|
.. ",9;.8,.8;ui_doubleright_icon.png;forward3;]"
|
||||||
|
.. "tooltip[forward3;" .. minetest.formspec_escape(S("Forward three pages")) .. "]"
|
||||||
|
|
||||||
|
.. "image_button[" .. (start_x + 0.6 * 5)
|
||||||
|
.. ",9;.8,.8;ui_skip_forward_icon.png;end_list;]"
|
||||||
|
.. "tooltip[end_list;" .. minetest.formspec_escape(S("Last page")) .. "]"
|
||||||
|
|
||||||
-- Search box
|
-- Search box
|
||||||
formspec = formspec .. "field[9.5,8.325;3,1;searchbox;;"
|
formspec = formspec .. "field[9.5,8.325;3,1;searchbox;;"
|
||||||
.. minetest.formspec_escape(unified_inventory.current_searchbox[player_name]) .. "]"
|
.. minetest.formspec_escape(unified_inventory.current_searchbox[player_name]) .. "]"
|
||||||
formspec = formspec .. "image_button[12.2,8.1;.8,.8;ui_search_icon.png;searchbutton;;;;;"
|
formspec = formspec .. "image_button[12.2,8.1;.8,.8;ui_search_icon.png;searchbutton;]"
|
||||||
.. S("Search") .. "]"
|
.. "tooltip[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
|
||||||
|
@ -28,8 +28,8 @@ unified_inventory.register_page("waypoints", {
|
|||||||
"image_button[0.0," .. 0.2 + i * 0.7 .. ";.8,.8;" ..
|
"image_button[0.0," .. 0.2 + i * 0.7 .. ";.8,.8;" ..
|
||||||
(i == waypoints.selected and "ui_blue_icon_background.png^" or "") ..
|
(i == waypoints.selected and "ui_blue_icon_background.png^" or "") ..
|
||||||
"ui_" .. i .. "_icon.png;" ..
|
"ui_" .. i .. "_icon.png;" ..
|
||||||
"select_waypoint"..i..";;;;;"..
|
"select_waypoint" .. i .. ";]" ..
|
||||||
minetest.formspec_escape(S("Select Waypoint #%d"):format(i)).."]"
|
"tooltip[select_waypoint" .. i .. ";" .. minetest.formspec_escape(S("Select Waypoint #%d"):format(i)).."]"
|
||||||
end
|
end
|
||||||
|
|
||||||
i = waypoints.selected
|
i = waypoints.selected
|
||||||
@ -38,31 +38,32 @@ unified_inventory.register_page("waypoints", {
|
|||||||
formspec = formspec ..
|
formspec = formspec ..
|
||||||
"image_button[4.5,3.7;.8,.8;"..
|
"image_button[4.5,3.7;.8,.8;"..
|
||||||
"ui_waypoint_set_icon.png;"..
|
"ui_waypoint_set_icon.png;"..
|
||||||
"set_waypoint"..i..";;;;;"..
|
"set_waypoint"..i..";]"..
|
||||||
minetest.formspec_escape(S("Set waypoint to current location")).."]"
|
"tooltip[set_waypoint" .. i .. ";" .. minetest.formspec_escape(S("Set waypoint to current location")).."]"
|
||||||
|
|
||||||
formspec = formspec ..
|
formspec = formspec ..
|
||||||
"image_button[5.2,3.7;.8,.8;"..
|
"image_button[5.2,3.7;.8,.8;"..
|
||||||
(waypoints[i].active and "ui_on_icon.png" or "ui_off_icon.png")..";"..
|
(waypoints[i].active and "ui_on_icon.png" or "ui_off_icon.png")..";"..
|
||||||
"toggle_waypoint"..i..";;;;;"..
|
"toggle_waypoint"..i..";]"..
|
||||||
minetest.formspec_escape(S("Make waypoint "..(waypoints[i].active and "invisible" or "visible"))).."]"
|
"tooltip[toggle_waypoint" .. i .. ";" .. minetest.formspec_escape(S("Make waypoint "..(waypoints[i].active and "invisible" or "visible"))).."]"
|
||||||
|
|
||||||
formspec = formspec ..
|
formspec = formspec ..
|
||||||
"image_button[5.9,3.7;.8,.8;"..
|
"image_button[5.9,3.7;.8,.8;"..
|
||||||
(waypoints[i].display_pos and "ui_green_icon_background.png" or "ui_red_icon_background.png").."^ui_xyz_icon.png;"..
|
(waypoints[i].display_pos and "ui_green_icon_background.png" or "ui_red_icon_background.png").."^ui_xyz_icon.png;"..
|
||||||
"toggle_display_pos"..i..";;;;;"..
|
"toggle_display_pos" .. i .. ";]"..
|
||||||
minetest.formspec_escape(S((waypoints[i].display_pos and "Disable" or "Enable").." display of waypoint coordinates")).."]"
|
"tooltip[toggle_display_pos" .. i .. ";" .. minetest.formspec_escape(S((waypoints[i].display_pos and "Disable" or "Enable").." display of waypoint coordinates")).."]"
|
||||||
|
|
||||||
formspec = formspec ..
|
formspec = formspec ..
|
||||||
"image_button[6.6,3.7;.8,.8;"..
|
"image_button[6.6,3.7;.8,.8;"..
|
||||||
"ui_circular_arrows_icon.png;"..
|
"ui_circular_arrows_icon.png;"..
|
||||||
"toggle_color"..i..";;;;;"..
|
"toggle_color"..i..";]"..
|
||||||
minetest.formspec_escape(S("Change color of waypoint display")).."]"
|
"tooltip[toggle_color" .. i .. ";" .. minetest.formspec_escape(S("Change color of waypoint display")).."]"
|
||||||
|
|
||||||
formspec = formspec ..
|
formspec = formspec ..
|
||||||
"image_button[7.3,3.7;.8,.8;"..
|
"image_button[7.3,3.7;.8,.8;"..
|
||||||
"ui_pencil_icon.png;"..
|
"ui_pencil_icon.png;"..
|
||||||
"rename_waypoint"..i..";;;;;"..
|
"rename_waypoint"..i..";]"..
|
||||||
minetest.formspec_escape(S("Edit waypoint name")).."]"
|
"tooltip[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
|
||||||
@ -76,8 +77,8 @@ unified_inventory.register_page("waypoints", {
|
|||||||
"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;"..
|
"image_button[7.3,2.9;.8,.8;"..
|
||||||
"ui_ok_icon.png;"..
|
"ui_ok_icon.png;"..
|
||||||
"confirm_rename"..i.. ";;;;;"..
|
"confirm_rename"..i.. ";]"..
|
||||||
minetest.formspec_escape(S("Finish editing")).."]"
|
"tooltip[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")..": " ..
|
||||||
|
Loading…
Reference in New Issue
Block a user