Löve Frames - A GUI Library

Showcase your libraries, tools and other projects that help your fellow love users.
ds84182
Prole
Posts: 11
Joined: Sun Jan 19, 2014 8:54 pm

Re: Löve Frames - A GUI Library

Post by ds84182 » Sun Jun 15, 2014 9:22 pm

I need a bit of help. I am making a game using Axis Aligned Bounding Boxes, so naturally I would create an editor for levels, etc. But I just ran into a problem with Love Frames. I don't know how I would figure out if there is an object (like a frame) under the mouse cursor... Is there any way to do that with Love Frames (without mangling the source code to add my own function).

Joemag
Prole
Posts: 24
Joined: Sun Apr 14, 2013 5:42 pm

Re: Löve Frames - A GUI Library

Post by Joemag » Mon Jun 16, 2014 6:38 am

ds84182 wrote:I don't know how I would figure out if there is an object (like a frame) under the mouse cursor...
I think it's loveframes.util.GetHover(). Returns true if there is an object under the mouse cursor , false if not.

AlexYeCu
Prole
Posts: 48
Joined: Fri May 30, 2014 4:08 pm

Re: Löve Frames - A GUI Library

Post by AlexYeCu » Tue Jun 17, 2014 8:14 pm

Positive07 wrote:This is a LÖVE library compatible with LÖVE for PC, MAC and Linux, it should easily be adapted (if necessary at all) to work with the android port of LÖVE
I know about Android port of LÖVE. And I`ve found out there is some kind of problem with loveframes in this case. So, loveframes need some adaptation, I guess.

UP: well, looks like problem not in loveframes (I`ve used an outdated version), but anyway: does anyone have any positive expierience with loveframes and android?

AlexYeCu
Prole
Posts: 48
Joined: Fri May 30, 2014 4:08 pm

Re: Löve Frames - A GUI Library

Post by AlexYeCu » Sat Jul 05, 2014 8:35 am

I`m developing a crpg game using love2d right now, so I`m looking to the things, which are useful for game making first of all. Loveframes is a very nice and useful library, which helps a lot, but I think there is a way to make it a bit better for game-developers.

Some feature requests for tooltips:

1. Is it possible to add a method for changing background color?
2. And setting an image like a background (automatic splitting tooltip`s text to lines according to image`s WxH size)?
3. Is it possible to add alternative method of activation for tooltips: at RMB click?

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 » Sat Jul 05, 2014 11:53 pm

AlexYeCu wrote:I`m developing a crpg game using love2d right now, so I`m looking to the things, which are useful for game making first of all. Loveframes is a very nice and useful library, which helps a lot, but I think there is a way to make it a bit better for game-developers.

Some feature requests for tooltips:

1. Is it possible to add a method for changing background color?
2. And setting an image like a background (automatic splitting tooltip`s text to lines according to image`s WxH size)?
3. Is it possible to add alternative method of activation for tooltips: at RMB click?
Your first two suggestions can be done by creating a custom drawing function for the tooltip, or by modifying the tooltip drawing function in the active skin. Your third suggestion can be done simply by calling loveframes.Create("tooltip") whenever the right mouse button is pressed.

VADemon
Prole
Posts: 1
Joined: Thu Jul 17, 2014 4:58 pm

Re: Löve Frames - A GUI Library

Post by VADemon » Thu Jul 17, 2014 9:49 pm

I really like LoveFrames, it saved a lot of my time already. Now I wanted to change the appearance of a single object and here, adding a new skin to change a drawing function for every so little change to the default skin seems to be an overkill to me. I wish there was a simple way to change the default skin's functions for every object like (:SetDrawingFunction("name", func)). Are you planning to do something like this?

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 » Thu Jul 17, 2014 11:24 pm

VADemon wrote:I really like LoveFrames, it saved a lot of my time already. Now I wanted to change the appearance of a single object and here, adding a new skin to change a drawing function for every so little change to the default skin seems to be an overkill to me. I wish there was a simple way to change the default skin's functions for every object like (:SetDrawingFunction("name", func)). Are you planning to do something like this?
You can do this by defining a custom drawing function for the object:

Code: Select all

local button = loveframes.Create("button")
button.Draw = function(object)
    love.graphics.setColor(255, 0, 0, 255)
    love.graphics.rectangle("fill", object.x, object.y, object.width, object.height)
end

PaddyDignam
Prole
Posts: 2
Joined: Wed Jul 30, 2014 4:54 pm

Re: Löve Frames - A GUI Library

Post by PaddyDignam » Wed Jul 30, 2014 4:58 pm

Is there any way to position and/or format text in an ImageButton?

Llamageddon
Prole
Posts: 3
Joined: Sun Aug 03, 2014 9:42 pm

Re: Löve Frames - A GUI Library

Post by Llamageddon » Mon Aug 04, 2014 10:13 pm

Looking at the code briefly, it seems like none of the widgets inherit from anything other than the base class, is subclassing widgets possible if I wanted to create a new widget type? Or would I have to write it from scratch?

EDIT: Since no one replied in this topic so far and I don't want to doublepost, I'll add my new concerns to this

I'm making a simple console for my game, if I wanted to make it into a reusable widget, could I use the existing widgets as its internals? Totally asking that without inspecting loveframes source, just based off the demo's debug overlay info and what it suggests.

Also, is proper text selection for the textinput widget planned and/or close? I could try implementing it, but it would most likely be messy code. Along with that, ctrl+left/right for text navigation. I'll probably implement that myself soon, since I'll probably need it

Oh, and also: Awesome lib, thanks for the work ^^

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 » Thu Aug 07, 2014 2:00 am

PaddyDignam wrote:Is there any way to position and/or format text in an ImageButton?
You can change the way the text looks in the skin file, or create a custom drawing function for the object.
Llamageddon wrote:Looking at the code briefly, it seems like none of the widgets inherit from anything other than the base class, is subclassing widgets possible if I wanted to create a new widget type? Or would I have to write it from scratch?
You should be able to inherit from other widgets by making a few modifications to the way objects are loaded.
Llamageddon wrote: I'm making a simple console for my game, if I wanted to make it into a reusable widget, could I use the existing widgets as its internals? Totally asking that without inspecting loveframes source, just based off the demo's debug overlay info and what it suggests.
Yes, technically.
Llamageddon wrote: Also, is proper text selection for the textinput widget planned and/or close? I could try implementing it, but it would most likely be messy code. Along with that, ctrl+left/right for text navigation. I'll probably implement that myself soon, since I'll probably need it
Full text selection is planned but not close, so feel free to have a go at it if you like.

Post Reply

Who is online

Users browsing this forum: No registered users and 14 guests