forked from Sokomine/yl_speak_up
		
	colorize background for on_failure dialogs in edit general
This commit is contained in:
		
							parent
							
								
									a43cef9290
								
							
						
					
					
						commit
						d7e06b662e
					
				@ -1128,7 +1128,7 @@ yl_speak_up.get_fs_edit_option_related = function(player, table_click_result,
 | 
			
		||||
		yl_speak_up.speak_to[pname][ tmp_data_cache ] = data
 | 
			
		||||
	end
 | 
			
		||||
 | 
			
		||||
	local save_button = "button[5.0,11.8;1,0.7;save_element;Save]"
 | 
			
		||||
	local save_button = "button[5.0,12.2;1,0.7;save_element;Save]"
 | 
			
		||||
	local formspec =
 | 
			
		||||
		"formspec_version[3]"..
 | 
			
		||||
		"size[20,13]"..
 | 
			
		||||
@ -1138,7 +1138,7 @@ yl_speak_up.get_fs_edit_option_related = function(player, table_click_result,
 | 
			
		||||
		"dropdown[4.0,1.8;14.0,0.6;select_what;"..
 | 
			
		||||
			table.concat(check_what, ",")..";"..
 | 
			
		||||
			tostring(data.what)..";]"..
 | 
			
		||||
		"button[3.0,11.8;1,0.7;back;Abort]"
 | 
			
		||||
		"button[3.0,12.2;1,0.7;back;Abort]"
 | 
			
		||||
 | 
			
		||||
	if(id_prefix ~= "a_") then
 | 
			
		||||
		formspec = formspec..
 | 
			
		||||
@ -1401,7 +1401,7 @@ yl_speak_up.get_fs_edit_option_related = function(player, table_click_result,
 | 
			
		||||
		if(dialog and dialog.n_dialogs and dialog.n_dialogs[ data.on_failure ]) then
 | 
			
		||||
			on_failure_dialog =
 | 
			
		||||
				"label[0.2,5.5;This will switch to dialog "..tostring(data.on_failure)..":]"..
 | 
			
		||||
				"hypertext[1.2,6.0;19.6,2.5;d_text;<normal>"..
 | 
			
		||||
				"hypertext[1.2,6.0;18.0,2.0;d_text;<global background=#776666><normal>"..
 | 
			
		||||
				minetest.formspec_escape(dialog.n_dialogs[ data.on_failure ].d_text or "?")..
 | 
			
		||||
				"\n</normal>]"
 | 
			
		||||
		end
 | 
			
		||||
@ -1640,7 +1640,7 @@ yl_speak_up.set_on_action_failure_dialog = function(pname, data, instruction)
 | 
			
		||||
	if(nr and nr > 1) then
 | 
			
		||||
		local failure_d_id = sorted_dialog_list[ nr - 1]
 | 
			
		||||
		on_failure_dialog = on_failure_dialog..
 | 
			
		||||
			"hypertext[1.2,10.4.0;19.6,1.0;d_text;<normal>"..
 | 
			
		||||
			"hypertext[1.2,10.2.0;18.0,1.8;d_text;<global background=#776666><normal>"..
 | 
			
		||||
			minetest.formspec_escape(dialog.n_dialogs[ failure_d_id ].d_text or "?")..
 | 
			
		||||
			"\n</normal>]"
 | 
			
		||||
	end
 | 
			
		||||
 | 
			
		||||
		Loading…
	
		Reference in New Issue
	
	Block a user