i require a menu please ^^
Posted: Fri Dec 09, 2011 8:29 pm
Wsup?
I dont know how many of you know C but i will try to explain it simple:
How can i create different pages on screen in LOVE
(e.g. INTRO then MENUE then GAME then PAUSE etc)
in C its kinda easy, You just have to create 2 different .c files (e.g. main.c / menu.c / play.c etc)
then include them all together (where needed^^) and mark a key like this to blit it on "screen":
then same stuff if you wanna go back...
So is there any way to do this in love2d?
thx
PS: i tried to make a splashIntro as a big "fat" function in splashIntro.lua then include it in the main.lua
(e.g.
--main.lua
require("splashIntro")
function love.load()
splashIntro()
[...]
end
[...]
)
but it crashes and says me some weird stuff, idk... """
and in any case i dont even know how to FreeSurface it...
I dont know how many of you know C but i will try to explain it simple:
How can i create different pages on screen in LOVE
(e.g. INTRO then MENUE then GAME then PAUSE etc)
in C its kinda easy, You just have to create 2 different .c files (e.g. main.c / menu.c / play.c etc)
then include them all together (where needed^^) and mark a key like this to blit it on "screen":
Code: Select all
[...]event.key.keysym.sym){
case SDLK_p:
options(screen);
break;
} [...]
So is there any way to do this in love2d?
thx
PS: i tried to make a splashIntro as a big "fat" function in splashIntro.lua then include it in the main.lua
(e.g.
--main.lua
require("splashIntro")
function love.load()
splashIntro()
[...]
end
[...]
)
but it crashes and says me some weird stuff, idk... """
and in any case i dont even know how to FreeSurface it...