Page 1 of 1

Loveframes setState black screen

Posted: Sat Oct 05, 2019 11:37 am
by Coder567
Hi
Does anyone know what's wrong when I use loveframes setState command to switch between frames and it works first properly but then one of my frames shows nothing but black screen?

I do this:

Code: Select all

loveframes.SetState("mainMenu") -- works
loveframes.SetState("stats") -- works
loveframes.SetState("mainMenu") -- works
loveframes.SetState("stats") -- Black screen! Where did my frame go?
thanks!

Re: Loveframes setState black screen

Posted: Sat Oct 05, 2019 11:01 pm
by Baggef
Could you attach a .love file? Just zip your game, and change the ending from .zip to .love. It will make it easier for us to help you

Re: Loveframes setState black screen

Posted: Sun Oct 06, 2019 7:54 am
by Coder567
I'd prefer not to give away the source code. It would help me a lot if someone who has used the SetState function could tell if they ever had such problem?

Re: Loveframes setState black screen

Posted: Mon Oct 07, 2019 7:24 am
by Coder567
Looks like I found the problem.
When trying to change the state in frame:OnClose I get the black screen.
code:

Code: Select all

frame.OnClose = function(object)
  -- state change code here
end
But if I create a button for changing the frame then everything works