Search found 5 matches
- Sun Oct 05, 2014 10:23 am
- Forum: Support and Development
- Topic: [Solved] Help with buttons
- Replies: 13
- Views: 6534
Re: Help with buttons
I have no idea why you used a for loop to create buttons anyway I fixed the problem by creating a class to draw out the buttons I also made some changes to some of the files i'll list them here & upload a working love file. main.lua width=love.graphics.getWidth() height=love.graphics.getHeight(...
- Sun Oct 05, 2014 8:10 am
- Forum: Support and Development
- Topic: [Solved] Help with buttons
- Replies: 13
- Views: 6534
Re: Help with buttons
I implemented for i,v in ipairs(t) do table.remove(t, i) end in love.update() and it does remove them but it does it with a second delay so I'm going to try what you said doc EDIT: Still happens with your way. I might as well redo the whole code used for the buttons maybe that will work :death:
- Sun Oct 05, 2014 8:04 am
- Forum: Support and Development
- Topic: [Solved] Help with buttons
- Replies: 13
- Views: 6534
Re: Help with buttons
I was having trouble with this type of method of adding buttons earlier as well. How would you write a remove function? When I tried table.remove(buttons, i) it only removed the first button. Hmm... maybe try for for i,v in ipairs(t) do table.remove(t, i) end and replacing t with the table name EDI...
- Sun Oct 05, 2014 7:17 am
- Forum: Support and Development
- Topic: [Solved] Help with buttons
- Replies: 13
- Views: 6534
Re: Help with buttons
Here's a solution: make a gamestate variable. heres an example: function love.load() gamestate = "menu" --your code end function love.draw() if gamestate == "menu" --draw the buttons here --everything thats supposed to be in the menu elseif gamestate == "game" then --d...
- Sun Oct 05, 2014 6:23 am
- Forum: Support and Development
- Topic: [Solved] Help with buttons
- Replies: 13
- Views: 6534
[Solved] Help with buttons
So I'm currently trying to make a Pokemon type game were is is basically a infinite fighting game with new enemies piping up after the old one has died. Right know I am trying to make the start menu buttons work properly, I have made it so that it if you click start it starts the game but the button...