Use a formspec background in the "minimal" game

• Use the now built-in gui_formbg.png in the "minimal" game
 • Make the minimal warning text yellow to stand out more.
This commit is contained in:
luk3yx 2019-03-12 17:27:16 +13:00
parent 61e806f312
commit 1f13b7584f
2 changed files with 16 additions and 8 deletions

View File

@ -16,8 +16,17 @@ dofile(minetest.get_modpath("default").."/mapgen.lua")
-- Set a noticeable inventory formspec for players -- Set a noticeable inventory formspec for players
minetest.register_on_joinplayer(function(player) minetest.register_on_joinplayer(function(player)
player:set_formspec_prepend([[
bgcolor[#080808BB;true]
background[5,5;1,1;gui_formbg.png;true]
listcolors[#00000069;#5A5A5A;#141318;#30434C;#FFF] ]])
local cb = function(player) local cb = function(player)
minetest.chat_send_player(player:get_player_name(), "This is the [minimal] \"Minimal Development Test\" game. Use [minetest_game] for the real thing.") minetest.chat_send_player(player:get_player_name(),
minetest.colorize('#cccc22',
"This is the [minimal] \"Minimal Development Test\" game. "
.. "Use [minetest_game] for the real thing."))
player:set_attribute("test_attribute", "test_me") player:set_attribute("test_attribute", "test_me")
player:set_attribute("remove_this", nil) player:set_attribute("remove_this", nil)
end end
@ -1895,4 +1904,3 @@ test_get_craft_result()
--dump2(minetest.registered_entities) --dump2(minetest.registered_entities)
-- END -- END