mirror of
				https://github.com/luanti-org/luanti.git
				synced 2025-10-31 15:35:21 +01:00 
			
		
		
		
	Add HTTP API to main menu (#9998)
This commit is contained in:
		| @@ -67,3 +67,22 @@ function dialog_create(name,get_formspec,buttonhandler,eventhandler) | ||||
| 	ui.add(self) | ||||
| 	return self | ||||
| end | ||||
|  | ||||
| function messagebox(name, message) | ||||
| 	return dialog_create(name, | ||||
| 			function() | ||||
| 				return ([[ | ||||
| 					formspec_version[3] | ||||
| 					size[8,3] | ||||
| 					textarea[0.375,0.375;7.25,1.2;;;%s] | ||||
| 					button[3,1.825;2,0.8;ok;%s] | ||||
| 				]]):format(message, fgettext("OK")) | ||||
| 			end, | ||||
| 			function(this, fields) | ||||
| 				if fields.ok then | ||||
| 					this:delete() | ||||
| 					return true | ||||
| 				end | ||||
| 			end, | ||||
| 			nil) | ||||
| end | ||||
|   | ||||
| @@ -85,7 +85,7 @@ function ui.update() | ||||
| 			"box[0.5,1.2;13,5;#000]", | ||||
| 			("textarea[0.5,1.2;13,5;;%s;%s]"):format( | ||||
| 				error_title, error_message), | ||||
| 			"button[5,6.6;4,1;btn_error_confirm;" .. fgettext("Ok") .. "]" | ||||
| 			"button[5,6.6;4,1;btn_error_confirm;" .. fgettext("OK") .. "]" | ||||
| 		} | ||||
| 	else | ||||
| 		local active_toplevel_ui_elements = 0 | ||||
|   | ||||
		Reference in New Issue
	
	Block a user