On line 87 in main.lua, change require "libs/loveframes" to loveframes = require "libs.loveframes".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
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
Re: Löve Frames - A GUI Library
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.
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
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.
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.
- Attachments
-
- physics.love
- (147.26 KiB) Downloaded 279 times
- 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 use a stencil for that: http://www.love2d.org/wiki/love.graphics.setStencilSlover 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.
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.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.
Re: Löve Frames - A GUI Library
thanks, it doesnt flicker now.
- Guard13007
- Party member
- Posts: 134
- Joined: Sat Oct 25, 2014 3:42 am
- Location: Internet, USA
- Contact:
Re: Löve Frames - A GUI Library
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:
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)?
I have this currently:
Code: Select all
local menu = lf.Create("menu")
menu:AddOption("Email", false, function() end)
menu:AddOption("Spreadsheets", false, function() end)
What am I doing wrong / what do I need to do (besides have actual functions haha)?
- Nikolai Resokav
- Party member
- Posts: 140
- Joined: Wed Apr 28, 2010 12:51 am
- Location: United States
Re: Löve Frames - A GUI Library
Try putting your menu code in the love.mousepressed callback: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:
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.Code: Select all
local menu = lf.Create("menu") menu:AddOption("Email", false, function() end) menu:AddOption("Spreadsheets", false, function() end)
What am I doing wrong / what do I need to do (besides have actual functions haha)?
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
- Guard13007
- Party member
- Posts: 134
- Joined: Sat Oct 25, 2014 3:42 am
- Location: Internet, USA
- Contact:
Re: Löve Frames - A GUI Library
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.)
(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.)
- Guard13007
- Party member
- Posts: 134
- Joined: Sat Oct 25, 2014 3:42 am
- Location: Internet, USA
- Contact:
Re: Löve Frames - A GUI Library
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?
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?
- 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 current license is zlib/libpng.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?
Who is online
Users browsing this forum: No registered users and 3 guests