Spec-Zone.ru › LÖVE

love.releaseerrhand

Удалено в LÖVE 0.9.0
Этот обратный вызов не поддерживается в этой и более поздних версиях.

Функция

Описание

love.releaseerrhand( msg )

Аргументы

string msg
Сообщение об ошибке.

Возвращаемое значение

Ничего.

Примеры

Функция по умолчанию, если вы не предоставите свою.

function love.releaseerrhand(msg)
	print("An error has occured, the game has been stopped.")
 
	if not love.graphics or not love.event or not love.graphics.isCreated() then
		return
	end
 
	love.graphics.setCanvas()
	love.graphics.setPixelEffect()
 
	-- Load.
	if love.audio then love.audio.stop() end
	love.graphics.reset()
	love.graphics.setBackgroundColor(89, 157, 220)
	local font = love.graphics.newFont(14)
	love.graphics.setFont(font)
 
	love.graphics.setColor(255, 255, 255, 255)
 
	love.graphics.clear()
 
	local err = {}
 
	p = string.format("An error has occured that caused %s to stop.\nYou can notify %s about this%s.", love._release.title or "this game", love._release.author or "the author", love._release.url and " at " .. love._release.url or "")
 
	local function draw()
		love.graphics.clear()
		love.graphics.printf(p, 70, 70, love.graphics.getWidth() - 70)
		love.graphics.present()
	end
 
	draw()
 
	local e, a, b, c
	while true do
		e, a, b, c = love.event.wait()
 
		if e == "quit" then
			return
		end
		if e == "keypressed" and a == "escape" then
			return
		end
 
		draw()
 
	end
end

См. также

  • love

© 2006–2020 LÖVE Development Team
Licensed under the GNU Free Documentation License, Version 1.3.
https://love2d.org/wiki/love.releaseerrhand

Spec-Zone.ru

Настройки Оффлайн Что нового Помощь О нас
Spec-Zone .ru
спецификации, руководства, описания, API