Hey, first of all thank you very much Nikolai for Löve Frames, it is amazing what you can do with it.
I'm just getting started and there are some things I don't understand just yet I did not find them in the documentation, that's why I'll ask them here.
Most important for me is to close and restore a window. It seemed trivial first but I can't figure out a simple way to do it.
Löveframes seems to keep an internal array of all objects. When I close a window, i mean frame, it seems to delete the frame and its dependent objects. Right?
So how do I restore them again? Just recreating them? This will lead to multiple copies of the same window even if i set them to the same variable. I'm sure there's some solution to this, bit I don't really see it yet.
Löve Frames - A GUI Library
- Nikolai Resokav
- Party member
- Posts: 140
- Joined: Wed Apr 28, 2010 12:51 am
- Location: United States
Re: Löve Frames - A GUI Library
You can't restore a frame once it has been closed. If you are looking to hide a frame for a certain amount of time and then use it later, you should use the SetVisible method.mode7 wrote:Hey, first of all thank you very much Nikolai for Löve Frames, it is amazing what you can do with it.
I'm just getting started and there are some things I don't understand just yet I did not find them in the documentation, that's why I'll ask them here.
Most important for me is to close and restore a window. It seemed trivial first but I can't figure out a simple way to do it.
Löveframes seems to keep an internal array of all objects. When I close a window, i mean frame, it seems to delete the frame and its dependent objects. Right?
So how do I restore them again? Just recreating them? This will lead to multiple copies of the same window even if i set them to the same variable. I'm sure there's some solution to this, bit I don't really see it yet.
Re: Löve Frames - A GUI Library
Thanks for the quick answer!
Now I feel kind of stupid. I didn't think of this. Thank you very much!
I made a very small modification to the close button to hide the frame instead of removing it - works like a charm.
Now I feel kind of stupid. I didn't think of this. Thank you very much!
I made a very small modification to the close button to hide the frame instead of removing it - works like a charm.
Re: Löve Frames - A GUI Library
Here's to feeling stupid! I know, this is as trivial as it gets, but I am stuck on set-up here.
My main.lua is in directory desktop/wip, and I have your library in /wip/libs/LoveFrames-master, exactly as in the zip, but I cannot for some reason get the Directory to work right in init.lua.
How should this be formatted? Thanks in advanced, looking forward to implementing this.
My main.lua is in directory desktop/wip, and I have your library in /wip/libs/LoveFrames-master, exactly as in the zip, but I cannot for some reason get the Directory to work right in init.lua.
How should this be formatted? Thanks in advanced, looking forward to implementing this.
- Nikolai Resokav
- Party member
- Posts: 140
- Joined: Wed Apr 28, 2010 12:51 am
- Location: United States
Re: Löve Frames - A GUI Library
The correct setting for loveframes.config["DIRECTORY"] would be "libs/LoveFrames-master" in that scenario. What exactly is the problem though? Are you getting any errors?Delta9 wrote:Here's to feeling stupid! I know, this is as trivial as it gets, but I am stuck on set-up here.
My main.lua is in directory desktop/wip, and I have your library in /wip/libs/LoveFrames-master, exactly as in the zip, but I cannot for some reason get the Directory to work right in init.lua.
How should this be formatted? Thanks in advanced, looking forward to implementing this.
Re: Löve Frames - A GUI Library
Code: Select all
ERROR
libs/LoveFrames-master/int.lua:42: attempt to concatenate local 'dir' (a nil value)
and as I look at what I just posted the problem becomes immediately apparent in it looking for int.lua instead of init.lua
- Nikolai Resokav
- Party member
- Posts: 140
- Joined: Wed Apr 28, 2010 12:51 am
- Location: United States
Re: Löve Frames - A GUI Library
No problem. Let me know if you have any more questions.Delta9 wrote:it is set up exactly as described, with the path I described. Gonna go over the whole thing again to be sure. Thanks for the quick response.Code: Select all
ERROR libs/LoveFrames-master/int.lua:42: attempt to concatenate local 'dir' (a nil value)
Re: Löve Frames - A GUI Library
Thanks kindly, working great, not sure how I accidentally changed something, but unzipping a fresh copy fixed it first try. Now to get my hands dirty.
Re: Löve Frames - A GUI Library
Hey mate, awesome library! Is it possible to "instance" LoveFrames in a way that only a certain set of elements are active during a particular gamestate? Or is the recommended method to simply hide elements that are not currently needed?
STI - An awesome Tiled library
LÖVE3D - A 3D library for LÖVE 0.10+
Dev Blog | GitHub | excessive ❤ moé
LÖVE3D - A 3D library for LÖVE 0.10+
Dev Blog | GitHub | excessive ❤ moé
- Nikolai Resokav
- Party member
- Posts: 140
- Joined: Wed Apr 28, 2010 12:51 am
- Location: United States
Re: Löve Frames - A GUI Library
Love Frames does not currently support gamestate instancing, although this might be added in the future. My suggestion is to create each element you need for a state when the state loads and then store them in a table. Then when the state changes you can loop through the table you stored the elements in and remove or hide them.Karai17 wrote:Hey mate, awesome library! Is it possible to "instance" LoveFrames in a way that only a certain set of elements are active during a particular gamestate? Or is the recommended method to simply hide elements that are not currently needed?
Who is online
Users browsing this forum: Ahrefs [Bot], Bing [Bot] and 0 guests