mirror of
https://github.com/minetest/minetest.git
synced 2024-11-23 08:03:45 +01:00
Update no games message to give more context (#14695)
This commit is contained in:
parent
670bb32b2c
commit
abf353c178
@ -156,10 +156,18 @@ local function get_formspec(tabview, name, tabdata)
|
|||||||
|
|
||||||
-- Point the player to ContentDB when no games are found
|
-- Point the player to ContentDB when no games are found
|
||||||
if #pkgmgr.games == 0 then
|
if #pkgmgr.games == 0 then
|
||||||
|
local W = tabview.width
|
||||||
|
local H = tabview.height
|
||||||
|
|
||||||
|
local hypertext = "<global valign=middle halign=center size=18>" ..
|
||||||
|
fgettext_ne("Minetest is a game-creation platform that allows you to play many different games.") .. "\n" ..
|
||||||
|
fgettext_ne("Minetest doesn't come with a game by default.") .. " " ..
|
||||||
|
fgettext_ne("You need to install a game before you can create a world.")
|
||||||
|
|
||||||
|
local button_y = H * 2/3 - 0.6
|
||||||
return table.concat({
|
return table.concat({
|
||||||
"style[label_button;border=false]",
|
"hypertext[0.375,0;", W - 2*0.375, ",", button_y, ";ht;", core.formspec_escape(hypertext), "]",
|
||||||
"button[2.75,1.5;10,1;label_button;", fgettext("You have no games installed."), "]",
|
"button[5.25,", button_y, ";5,1.2;game_open_cdb;", fgettext("Install a game"), "]"})
|
||||||
"button[5.25,3.5;5,1.2;game_open_cdb;", fgettext("Install a game"), "]"})
|
|
||||||
end
|
end
|
||||||
|
|
||||||
local retval = ""
|
local retval = ""
|
||||||
|
Loading…
Reference in New Issue
Block a user