Page 22 of 41

Re: Löve Frames - A GUI Library

Posted: Sun Jun 15, 2014 9:22 pm
by ds84182
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).

Re: Löve Frames - A GUI Library

Posted: Mon Jun 16, 2014 6:38 am
by Joemag
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.

Re: Löve Frames - A GUI Library

Posted: Tue Jun 17, 2014 8:14 pm
by AlexYeCu
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?

Re: Löve Frames - A GUI Library

Posted: Sat Jul 05, 2014 8:35 am
by AlexYeCu
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?

Re: Löve Frames - A GUI Library

Posted: Sat Jul 05, 2014 11:53 pm
by Nikolai Resokav
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.

Re: Löve Frames - A GUI Library

Posted: Thu Jul 17, 2014 9:49 pm
by VADemon
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?

Re: Löve Frames - A GUI Library

Posted: Thu Jul 17, 2014 11:24 pm
by Nikolai Resokav
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

Re: Löve Frames - A GUI Library

Posted: Wed Jul 30, 2014 4:58 pm
by PaddyDignam
Is there any way to position and/or format text in an ImageButton?

Re: Löve Frames - A GUI Library

Posted: Mon Aug 04, 2014 10:13 pm
by Llamageddon
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 ^^

Re: Löve Frames - A GUI Library

Posted: Thu Aug 07, 2014 2:00 am
by Nikolai Resokav
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.