Löve Frames - A GUI Library

Showcase your libraries, tools and other projects that help your fellow love users.
User avatar
MZ|One
Citizen
Posts: 52
Joined: Tue May 22, 2012 8:37 am

Re: Löve Frames - A GUI Library

Post by MZ|One »

That's what I do. Just to let you know - it would definitely be useful to have this built in Löve Frames already :)
User avatar
Karai17
Party member
Posts: 930
Joined: Sun Sep 02, 2012 10:46 pm

Re: Löve Frames - A GUI Library

Post by Karai17 »

Hey Mate, is there any way to align text in a Text Object? A sort of vertical align and horizontal align?
STI - An awesome Tiled library
LÖVE3D - A 3D library for LÖVE 0.10+

Dev Blog | GitHub | excessive ❤ moé
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 »

Karai17 wrote:Hey Mate, is there any way to align text in a Text Object? A sort of vertical align and horizontal align?
Not currently, but this is something that might be added in a future update.
User avatar
Karai17
Party member
Posts: 930
Joined: Sun Sep 02, 2012 10:46 pm

Re: Löve Frames - A GUI Library

Post by Karai17 »

Could you explain two more things for me?

1) What would be considered the proper way to make a text object scrollable? I am working on a chat box and I need to be able to [auto]scroll whenever new data is added

2) How would I detect when a particular tab is clicked? I have 3 tabs in a tab object and when I click on each tab, a flag needs to be set.

Thank you for your assistance and patience while I learn how to use this amazing library <3
STI - An awesome Tiled library
LÖVE3D - A 3D library for LÖVE 0.10+

Dev Blog | GitHub | excessive ❤ moé
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 »

Karai17 wrote:Could you explain two more things for me?

1) What would be considered the proper way to make a text object scrollable? I am working on a chat box and I need to be able to [auto]scroll whenever new data is added
The easiest way would be to create a list object and then add each text object to the list. You can make the list scroll to the it's bottom-most content by doing this: list:SetAutoScroll(true)
Karai17 wrote:
2) How would I detect when a particular tab is clicked? I have 3 tabs in a tab object and when I click on each tab, a flag needs to be set.
The tab button currently doesn't support this feature. However, your question gives me an idea to add optional arguments for callback functions when creating a new tab. So essentially, you could have custom functions that would run when each tab is activated or deactivated. I'll see about adding this feature soon, possibly within a few updates.
Karai17 wrote: Thank you for your assistance and patience while I learn how to use this amazing library <3
No problem. Let me know if you have any more questions.
bizcaus
Prole
Posts: 1
Joined: Thu Jan 10, 2013 1:13 am

Re: Löve Frames - A GUI Library

Post by bizcaus »

Are you developing this on Windows/Linux? I am having some issues using it on OSX.

For example running the "demo" I get the error:

Code: Select all

Error

libraries/loveframes/objects/frame.lua:189: attempt to index local 'skin' (a nil value)

Traceback

libraries/loveframes/objects/frame.lua:189: in function 'draw'
libraries/loveframes/objects/base.lua:58: in function 'draw'
libraries/loveframes/init.lua:104: in function 'draw'
main.lua:29: in function 'draw'
[C]: in function 'xpcall'
I also had to add this code surrounding line 53 of skins.lua or else it would crash saying it couldn't decode the image:

Code: Select all

if v.name ~= "" then
-- code
end
After all that when I get the game to run the buttons appear white
z1ff1l.jpg
z1ff1l.jpg (44.19 KiB) Viewed 555 times
but when I hover over the button it seems alright
jusZwl.jpg
jusZwl.jpg (38.9 KiB) Viewed 555 times
Thanks!

-bizcaus
ixjf
Prole
Posts: 19
Joined: Sat Apr 27, 2013 10:27 am

Re: Löve Frames - A GUI Library

Post by ixjf »

I was able to cut your code in half, you put too many spaces.
I used to be an adventurer like you, but then I took an arrow in the knee.
User avatar
xXxMoNkEyMaNxXx
Party member
Posts: 206
Joined: Thu Jan 10, 2013 6:16 am
Location: Canada

Re: Löve Frames - A GUI Library

Post by xXxMoNkEyMaNxXx »

Readability is more important than file size. (I'm talking about readability...? ¬_¬) Large volumes of code are most likely one of the easiest things to compress.
ixjf
Prole
Posts: 19
Joined: Sat Apr 27, 2013 10:27 am

Re: Löve Frames - A GUI Library

Post by ixjf »

You don't need a space in every single scope to be able to read the code, my code is perfectly readable without these spaces (the only down side is that I haven't commented it, but it's just for personal use anyway).
I used to be an adventurer like you, but then I took an arrow in the knee.
User avatar
hryx
Party member
Posts: 110
Joined: Mon Mar 29, 2010 2:28 am
Location: SF<CA<USA

Re: Löve Frames - A GUI Library

Post by hryx »

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!
Post Reply

Who is online

Users browsing this forum: No registered users and 1 guest