Page 29 of 41

Re: Löve Frames - A GUI Library

Posted: Sat Jan 03, 2015 11:36 am
by Nikolai Resokav
tommyroyall wrote:Thank you so much for looking into this Nikolai! Loveframes has been used in numerous past projects and proves vital for this one, and the file that it is called in from is main.lua, though the one that is giving me issues would be CabinGamestate.lua. At the same time, the first one that is opened is MenuGamestate.lua. Here is the download link to the .love file, http://www.mediafire.com/download/eyil1 ... 30-14.love
On line 87 in main.lua, change require "libs/loveframes" to loveframes = require "libs.loveframes".

Re: Löve Frames - A GUI Library

Posted: Sun Jan 04, 2015 3:59 am
by Slover
Is it possible to hide child content outside of a parents bounds? So something like:

local frame = loveframes.Create("frame")
frame:SetSize(100, 100)

local panel = loveframes.Create("panel", frame)
panel:SetSize(50, 50)
panel:SetPos(25, 75)

Wouldn't have a panel sticking out the side of the frame.

Re: Löve Frames - A GUI Library

Posted: Mon Jan 05, 2015 5:55 pm
by Doctory
hi :)
ive actually started using this library on a project now and its awesome
although, i have one problem.
when my project reaches max objects, i added a tool tip that will say max objects reached.
the tool tip is tied to a panel that is moved to the mouse position. when the max objects are reached, the tooltip works but it flickers.
any ideas?
thanks.

Re: Löve Frames - A GUI Library

Posted: Tue Jan 06, 2015 1:26 pm
by Nikolai Resokav
Slover wrote:Is it possible to hide child content outside of a parents bounds? So something like:

local frame = loveframes.Create("frame")
frame:SetSize(100, 100)

local panel = loveframes.Create("panel", frame)
panel:SetSize(50, 50)
panel:SetPos(25, 75)

Wouldn't have a panel sticking out the side of the frame.
You can use a stencil for that: http://www.love2d.org/wiki/love.graphics.setStencil
Doctory wrote:hi :)
ive actually started using this library on a project now and its awesome
although, i have one problem.
when my project reaches max objects, i added a tool tip that will say max objects reached.
the tool tip is tied to a panel that is moved to the mouse position. when the max objects are reached, the tooltip works but it flickers.
any ideas?
thanks.
The problem seems to be that you are updating Love Frames before the editor. Changing your update code in main.lua so that loveframes.update gets called after editor.update seemed to fix the issue for me.

Re: Löve Frames - A GUI Library

Posted: Tue Jan 06, 2015 1:39 pm
by Doctory
thanks, it doesnt flicker now.

Re: Löve Frames - A GUI Library

Posted: Fri Jan 16, 2015 6:15 am
by Guard13007
Hi, I have been using LoveFrames in a couple different projects, and I recently wanted to make a menu object that you can open by right-clicking anywhere on screen. (I think I am understanding that is what the menu object is for?)

I have this currently:

Code: Select all

	local menu = lf.Create("menu")
	menu:AddOption("Email", false, function() end)
	menu:AddOption("Spreadsheets", false, function() end)
And what happens is that it appears in the top left on load (this is in love.load and LoveFrames has been required as "lf" btw), and disappears when clicked / when anywhere else is clicked and never comes back.

What am I doing wrong / what do I need to do (besides have actual functions haha)?

Re: Löve Frames - A GUI Library

Posted: Sat Jan 17, 2015 3:40 am
by Nikolai Resokav
Guard13007 wrote:Hi, I have been using LoveFrames in a couple different projects, and I recently wanted to make a menu object that you can open by right-clicking anywhere on screen. (I think I am understanding that is what the menu object is for?)

I have this currently:

Code: Select all

	local menu = lf.Create("menu")
	menu:AddOption("Email", false, function() end)
	menu:AddOption("Spreadsheets", false, function() end)
And what happens is that it appears in the top left on load (this is in love.load and LoveFrames has been required as "lf" btw), and disappears when clicked / when anywhere else is clicked and never comes back.

What am I doing wrong / what do I need to do (besides have actual functions haha)?
Try putting your menu code in the love.mousepressed callback:

Code: Select all

function love.mousepressed(x, y, button)
    if button == "r" then
        local menu = lf.Create("menu")
        menu:AddOption("Email", false, function() end)
        menu:AddOption("Spreadsheets", false, function() end)
    end
end

Re: Löve Frames - A GUI Library

Posted: Sun Jan 18, 2015 5:53 am
by Guard13007
That + a call to set the position did exactly what I needed, thank you!

(Note to anyone who might be stumbling across this in the future, you need to create your menu in love.mousepressed() AFTER the called to loveframes.mousepressed() for it to work.)

Edit: Wait, actually, no, because I want it to only work when I am not hovering over another LoveFrames object...and it does.

Edit again: Figured it out (loveframes.util.GetHoverObject() is a savior).

Now my problem is that I want to make the close button make an object invisible instead of closing it.

Edit #3: And the docs have solved it again! Thank you for this amazing library + documentation that is clear and easy to navigate! (And I'm finally learning to consult the docs properly before asking for assistance haha.)

Re: Löve Frames - A GUI Library

Posted: Sun Jan 18, 2015 7:10 am
by Guard13007
Question about the licensing on Love Frames:

On your website, it claims to be released under a CC BY 3.0 license.

In the repository, it claims to be released under the zlib/libpng license.

Which is it?

Re: Löve Frames - A GUI Library

Posted: Mon Jan 19, 2015 11:23 am
by Nikolai Resokav
Guard13007 wrote:Question about the licensing on Love Frames:

On your website, it claims to be released under a CC BY 3.0 license.

In the repository, it claims to be released under the zlib/libpng license.

Which is it?
The current license is zlib/libpng.