nikita1996spb, спасибо за совет
Добавлено спустя 49 минут 4 секунды:vladgalay, написал чтобы он у меня при нажатии Х он мне вывел второй файл, но я не могу его открыть, жму жму а он не открывается
может где ошибка:
index = 1
white = pge.gfx.createcolor(255,255,255)
green = pge.gfx.createcolor(0,255,0)
MyFont = pge.font.load("verdana.ttf",12)
items = {"Start game","About","Quit"}
MyTexture = pge.texture.load("fon.png")
while pge.running() do
pge.controls.update()
pge.gfx.startdrawing()
pge.gfx.clearscreen()
MyTexture:activate()
MyTexture:draw(0,0)
MyFont:activate()
for num = 1, 3 do
if num==index then
MyFont:print(25,10+num*20,green,items[num])
else
MyFont:print(25,10+num*20,white,items[num])
end
end
if pge.controls.pressed(PGE_CTRL_UP) and index > 1 then
index = index-1
end
if pge.controls.pressed(PGE_CTRL_DOWN) and index < 3 then
index = index+1
end
if pge.controls.pressed(PGE_CTRL_CROSS) and index == 3 then
pge.exit()
end
if pge.controls.pressed(PGE_CTRL_CROSS) and index == 2 then
dofile("a.lua")
end
pge.gfx.enddrawing()
pge.gfx.swapbuffers()
end