[ Help ] Options on the Menu Selection Deletion
- HugoBDesigner
- Posts: 2189
- Joined: 19 Sep 2012, 02:23
- Contact:
That shouldn't be hard at all. Instead of "hiding" the options, you should have "deleted" them. That's my version of it.
It's all in menu.lua:
In function menu_keypressed(key, unicode):
#1: Edit line 1535 from this:
To this:
#2: Remove lines 1544 to 1560. From this:
It'll end up like this:
#3: You said you only wanted singleplayer, right? Well, now you'd remove lines 1565 to 1573 (if you already did the step 2, then they're lines 1548 to 1556). From this:
It'd become this:
#4: This is optional, but I don't recommend: you could remove all the functions related to "Editor" or "Mappack Menu".
In function menu_draw():
#1: Change line 282 from this:
To this:
But don't forget to do the same in the title screen image (graphics/smb/title.png)
#2: Remove line 284. This one:
#3: Remove lines from 289 to 295. If you already did the step 2, then they should be lines 288 or 287 to 294 or 293.
These ones:
That's all you should do. Now it'll look something like this:
And the menu.lua, in case you don't understood something (or if you're too lazy to redo all I've already done):
http://pastebin.com/LtYz0hZ6
EDIT: Now I'm feeling like Qcode!
It's all in menu.lua:
In function menu_keypressed(key, unicode):
#1: Edit line 1535 from this:
Code: Select all
if selection < 4 then
Code: Select all
if selection < 2 then
Code: Select all
if selection == 0 then
game_load(true)
elseif selection == 1 then
selectworld()
elseif selection == 2 then
editormode = true
players = 1
playertype = "portal"
playertypei = 1
bullettime = false
portalknockback = false
bigmario = false
goombaattack = false
sonicrainboom = false
playercollisions = false
infinitetime = false
infinitelives = false
game_load()
elseif selection == 3 then
gamestate = "mappackmenu"
mappacks()
elseif selection == 4 then
gamestate = "options"
end
Code: Select all
if selection == 0 then
game_load(true)
elseif selection == 1 then
selectworld()
elseif selection == 2 then
gamestate = "options"
end
Code: Select all
elseif key == "escape" then
love.event.quit()
elseif (key == "left" or key == "a") then
if players > 1 then
players = players - 1
end
elseif (key == "right" or key == "d") then
players = players + 1
if players > 4 then
players = 4
end
end
Code: Select all
elseif key == "escape" then
love.event.quit()
end
In function menu_draw():
#1: Change line 282 from this:
Code: Select all
properprint("player game", 103*scale, 138*scale)
Code: Select all
properprint("singleplayer game", 95*scale, 138*scale)
#2: Remove line 284. This one:
Code: Select all
properprint(players, 87*scale, 138*scale)
These ones:
Code: Select all
if players > 1 then
love.graphics.draw(playerselectimg, 82*scale, 138*scale, 0, scale, scale)
end
if players < 4 then
love.graphics.draw(playerselectimg, 102*scale, 138*scale, 0, -scale, scale)
end
http://pastebin.com/LtYz0hZ6
EDIT: Now I'm feeling like Qcode!