adjust size of volume sliders, add warning

master
tchncs 2016-07-23 00:21:25 +02:00
parent 317c8cb213
commit 2ef7252e74
1 changed files with 7 additions and 6 deletions

View File

@ -609,12 +609,13 @@ minetest.register_chatcommand("volume", {
description = "View sliders to set sound a music volume",
func = function(name,param)
minetest.show_formspec(name, "ambience:volume",
"size[6,5]" ..
"label[0,0;Music]" ..
"scrollbar[0,1;6,1;horizontal;music;" .. volume[name].music * 1000 .. "]" ..
"label[0,2;Sound]" ..
"scrollbar[0,3;6,1;horizontal;sound;" .. volume[name].sound * 1000 .. "]" ..
"button_exit[2,4;2,1;quit;Done]")
"size[6,6]" ..
"label[0,0;Warning: Changes affects only the next played sound/music!]" ..
"label[0,1;Music]" ..
"scrollbar[0,2;6,0.4;horizontal;music;" .. volume[name].music * 1000 .. "]" ..
"label[0,3;Sound]" ..
"scrollbar[0,4;6,0.4;horizontal;sound;" .. volume[name].sound * 1000 .. "]" ..
"button_exit[2,5;2,1;quit;Done]")
end,
})
minetest.register_on_player_receive_fields(function(player, formname, fields)