aboutsummaryrefslogtreecommitdiff
path: root/games/devtest/mods/testnodes/textures/testnodes_mesh_stripes.png
blob: 51b8e0025a991d8559723f4e39d9be3aaed20dfe (plain)
ofshex dumpascii
0000 89 50 4e 47 0d 0a 1a 0a 00 00 00 0d 49 48 44 52 00 00 00 10 00 00 00 10 08 02 00 00 00 90 91 68 .PNG........IHDR...............h
0020 36 00 00 00 5d 49 44 41 54 78 01 9d 8d c1 09 80 50 0c 43 33 80 6b e9 d1 25 fe 9f 43 27 70 1f dd 6...]IDATx......P.C3.k..%..C'p..
0040 c7 21 bc 45 4a 15 72 11 6a c2 a3 3c 7a 79 70 c6 ab ca 33 96 87 dc c4 60 e4 97 a4 07 6e 01 3c 84 .!.EJ.r.j..<zyp...3....`....n.<.
0060 5d 5d 6f e0 16 1a d1 89 96 88 77 f1 c4 2c ac 60 b2 bc a2 c8 d3 2e 9c d8 8a b8 05 ce 43 11 b7 f0 ]]o.......w..,.`............C...
0080 6b 37 a4 c3 b9 86 f1 e9 f0 1d 00 00 00 00 49 45 4e 44 ae 42 60 82 k7............IEND.B`.
--Minetest
--Copyright (C) 2014 sapier
--
--This program is free software; you can redistribute it and/or modify
--it under the terms of the GNU Lesser General Public License as published by
--the Free Software Foundation; either version 2.1 of the License, or
--(at your option) any later version.
--
--This program is distributed in the hope that it will be useful,
--but WITHOUT ANY WARRANTY; without even the implied warranty of
--MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE.  See the
--GNU Lesser General Public License for more details.
--
--You should have received a copy of the GNU Lesser General Public License along
--with this program; if not, write to the Free Software Foundation, Inc.,
--51 Franklin Street, Fifth Floor, Boston, MA 02110-1301 USA.


local function delete_world_formspec(dialogdata)
	local retval =
		"size[10,2.5,true]" ..
		"label[0.5,0.5;" ..
		fgettext("Delete World \"$1\"?", dialogdata.delete_name) .. "]" ..
		"style[world_delete_confirm;bgcolor=red]" ..
		"button[0.5,1.5;2.5,0.5;world_delete_confirm;" .. fgettext("Delete") .. "]" ..
		"button[7.0,1.5;2.5,0.5;world_delete_cancel;" .. fgettext("Cancel") .. "]"
	return retval
end

local function delete_world_buttonhandler(this, fields)
	if fields["world_delete_confirm"] then
		if this.data.delete_index > 0 and
				this.data.delete_index <= #menudata.worldlist:get_raw_list() then
			core.delete_world(this.data.delete_index)
			menudata.worldlist:refresh()
		end
		this:delete()
		return true
	end

	if fields["world_delete_cancel"] then
		this:delete()
		return true
	end

	return false
end


function create_delete_world_dlg(name_to_del, index_to_del)
	assert(name_to_del ~= nil and type(name_to_del) == "string" and name_to_del ~= "")
	assert(index_to_del ~= nil and type(index_to_del) == "number")

	local retval = dialog_create("delete_world",
					delete_world_formspec,
					delete_world_buttonhandler,
					nil)
	retval.data.delete_name  = name_to_del
	retval.data.delete_index = index_to_del

	return retval
end