Löve Frames - A GUI Library

Showcase your libraries, tools and other projects that help your fellow love users.
User avatar
Nikolai Resokav
Party member
Posts: 140
Joined: Wed Apr 28, 2010 12:51 am
Location: United States

Re: Löve Frames - A GUI Library

Post by Nikolai Resokav »

hryx wrote:Whoa, holy fuck, this is beautiful. I wish I'd seen this a month ago when I started my level editor. (Still, I am quite happy with Quickie.) I'd love to dive into the code for this when I have time.

Very nice work, Nikolai!
Thanks! If you ever have any suggestions for features or improvements, please let me know!
User avatar
igneous
Prole
Posts: 10
Joined: Wed Dec 31, 2008 5:35 am

Re: Löve Frames - A GUI Library

Post by igneous »

Nikolai Resokav wrote:Thanks! If you ever have any suggestions for features or improvements, please let me know!
I'm also really looking forward to playing with this. The example menu looks gorgeous. Excellent work man.

One request: is there any chance you can package your documentation for offline use?

Thanks!
User avatar
Nikolai Resokav
Party member
Posts: 140
Joined: Wed Apr 28, 2010 12:51 am
Location: United States

Re: Löve Frames - A GUI Library

Post by Nikolai Resokav »

igneous wrote: I'm also really looking forward to playing with this. The example menu looks gorgeous. Excellent work man.
Thanks!
igneous wrote: One request: is there any chance you can package your documentation for offline use?
I plan on implementing a script to auto-package the documents for offline use once I finish working on their layouts and such.
User avatar
Ragerin
Prole
Posts: 9
Joined: Fri Feb 22, 2013 8:24 am
Location: Denmark

Re: Löve Frames - A GUI Library

Post by Ragerin »

A friend and I are making a project, but we've encountered a bug.

We are using imagebuttons for a main menu in a game, which are toggled by frames built-in SetState. The problem arises, when we press the "Singleplayer"-imagebutten and the state changes to, ie., "game" and we change the state back to "mainmenu" - the button can no longer be pressed. Well, it sort-of can be pressed - if we hover the mouse over the bottom, top and right edges of the imagebutton it does change to the "mouseover"-image and it is pressable.

Is this a known bug and eventually with a known solution?

We have updated to 0.9.5.10.


Cheers and thanks for a most wonderful library! It's simply amazing - keep up the good work, champ!



EDIT: This issue is now fixed in 0.9.5.11 - thank you again, for this wonderful library!
Last edited by Ragerin on Wed May 15, 2013 6:09 pm, edited 1 time in total.
User avatar
Nikolai Resokav
Party member
Posts: 140
Joined: Wed Apr 28, 2010 12:51 am
Location: United States

Re: Löve Frames - A GUI Library

Post by Nikolai Resokav »

Ragerin wrote:A friend and I are making a project, but we've encountered a bug.

We are using imagebuttons for a main menu in a game, which are toggled by frames built-in SetState. The problem arises, when we press the "Singleplayer"-imagebutten and the state changes to, ie., "game" and we change the state back to "mainmenu" - the button can no longer be pressed. Well, it sort-of can be pressed - if we hover the mouse over the bottom, top and right edges of the imagebutton it does change to the "mouseover"-image and it is pressable.

Is this a known bug and eventually with a known solution?

We have updated to 0.9.5.10.


Cheers and thanks for a most wonderful library! It's simply amazing - keep up the good work, champ!
Hmm, I'm not sure what could be causing that. I'll need to take a look at the imagebutton object and see if I can duplicate the issue. However, the process might be quicker if you could provide a .love of your project.
User avatar
azathoth
Prole
Posts: 5
Joined: Fri May 03, 2013 12:27 am

Re: Löve Frames - A GUI Library

Post by azathoth »

First of all, thank you! this is excellent.

I'm looking for a way to differentiate between clicks that happen on any widget including frames, from those that happen outside. The idea is to have a level editor that can select and manipulate objects with the mouse by clicking on them, plus some widgetry to modify their values, and some way to handle the two separately. Clicks on widgets shouldn't affect level objects below them etc.
I thought maybe loveframes.mousepressed() returned some value for that purpose , but it doesn't. Then there is loveframes.hoverobject which if I understand it correctly holds the widget the mouse is currently hovering on at any time, but apparently not frames. Plus it seems a bit hackish to use it like that, it seems intended for internal use.
Is there a better way of seeing if a click/release happened on a loveframes object in general ?
User avatar
Nikolai Resokav
Party member
Posts: 140
Joined: Wed Apr 28, 2010 12:51 am
Location: United States

Re: Löve Frames - A GUI Library

Post by Nikolai Resokav »

azathoth wrote:First of all, thank you! this is excellent.

I'm looking for a way to differentiate between clicks that happen on any widget including frames, from those that happen outside. The idea is to have a level editor that can select and manipulate objects with the mouse by clicking on them, plus some widgetry to modify their values, and some way to handle the two separately. Clicks on widgets shouldn't affect level objects below them etc.
I thought maybe loveframes.mousepressed() returned some value for that purpose , but it doesn't. Then there is loveframes.hoverobject which if I understand it correctly holds the widget the mouse is currently hovering on at any time, but apparently not frames. Plus it seems a bit hackish to use it like that, it seems intended for internal use.
Is there a better way of seeing if a click/release happened on a loveframes object in general ?
You can call loveframes.util.GetCollisions() to get a table of all Love Frames objects that the mouse is colliding with. With the table it returns, you can do something like this:

Code: Select all

local guicols = loveframes.util.GetCollisions()

if #guicols > 0 then
	-- code
end
User avatar
azathoth
Prole
Posts: 5
Joined: Fri May 03, 2013 12:27 am

Re: Löve Frames - A GUI Library

Post by azathoth »

Nikolai Resokav wrote:
azathoth wrote:First of all, thank you! this is excellent.

I'm looking for a way to differentiate between clicks that happen on any widget including frames, from those that happen outside. The idea is to have a level editor that can select and manipulate objects with the mouse by clicking on them, plus some widgetry to modify their values, and some way to handle the two separately. Clicks on widgets shouldn't affect level objects below them etc.
I thought maybe loveframes.mousepressed() returned some value for that purpose , but it doesn't. Then there is loveframes.hoverobject which if I understand it correctly holds the widget the mouse is currently hovering on at any time, but apparently not frames. Plus it seems a bit hackish to use it like that, it seems intended for internal use.
Is there a better way of seeing if a click/release happened on a loveframes object in general ?
You can call loveframes.util.GetCollisions() to get a table of all Love Frames objects that the mouse is colliding with. With the table it returns, you can do something like this:

Code: Select all

local guicols = loveframes.util.GetCollisions()

if #guicols > 0 then
	-- code
end

Thank you, this is exactly what I needed :awesome:
Just one note in case it's useful : I think it always returns at least one collision with the base object, so :

Code: Select all

if #loveframes.util.GetCollisions() <= 1 then
    -- non widget object manip.
end
The less-than part may be completely unnecessary, but oh well
User avatar
Nikolai Resokav
Party member
Posts: 140
Joined: Wed Apr 28, 2010 12:51 am
Location: United States

Re: Löve Frames - A GUI Library

Post by Nikolai Resokav »

azathoth wrote: Thank you, this is exactly what I needed :awesome:
Just one note in case it's useful : I think it always returns at least one collision with the base object, so :

Code: Select all

if #loveframes.util.GetCollisions() <= 1 then
    -- non widget object manip.
end
The less-than part may be completely unnecessary, but oh well
Ah yes, I forgot that the base object gets added to that table. Also, I should mention that its probably very inefficient to use the GetCollisions function for what you are doing. I think I'll implement a better way to get the total number of GUI collisions (excluding the base object) in the next update.
User avatar
Plu
Inner party member
Posts: 722
Joined: Fri Mar 15, 2013 9:36 pm

Re: Löve Frames - A GUI Library

Post by Plu »

This looks awesome and like something I'm going to be using soon :D

Although it seems that the images are missing from the love file, I can´t open Frame, Image and Imagebutton as it crashes with a missing image error. I´m using Loveliness in Chrome if it makes a difference.

EDIT: tabs page as well.
Post Reply

Who is online

Users browsing this forum: No registered users and 204 guests