Goo: Gui and Animation library.

Showcase your libraries, tools and other projects that help your fellow love users.
User avatar
the_leg
Prole
Posts: 25
Joined: Sun Sep 05, 2010 3:43 am

Re: Goo: Gui and Animation library.

Post by the_leg »

You would create a static text object whose parent is a panel. In your love.load() you would do something like this:

Code: Select all

	local panel = goo.panel:new()
	panel:setPos(100, 100 )
	panel:setSize(200, 200 )
	panel:setTitle( 'I am a panel' )

	local text = goo.text:new(panel )
	text:setPos(0,10) 
	text:setColor2(0, 0, 0)  
	text:setText('This is some\nsample text to print.')
I had to uncomment setColor2() in goo.lua to change the text foreground color. I also had to fiddle with the draw() method of the text object (objects/text.lua), so it prints at 0,0 instead of x,y. I'm not sure if those modifications are correct. Let me know if you find a better way.
User avatar
adrix89
Party member
Posts: 135
Joined: Fri Oct 15, 2010 10:58 am

Re: Goo: Gui and Animation library.

Post by adrix89 »

You can set the color as a style just like it was in text input
The print x,y is good that is 0 as neither is textinput using theme
Is it me or is text kind of left out?
I use Workflowy but you can check out Dynalist as its the better offer.
User avatar
the_leg
Prole
Posts: 25
Joined: Sun Sep 05, 2010 3:43 am

Re: Goo: Gui and Animation library.

Post by the_leg »

The text prints fine for me, but I had to play around with getting the text color set. Try using a dark background color for the panel, and see if that makes any difference.
User avatar
adrix89
Party member
Posts: 135
Joined: Fri Oct 15, 2010 10:58 am

Re: Goo: Gui and Animation library.

Post by adrix89 »

You do know that you can set the ext to render in whatever color you like if you modify a bit copying stuff from textinput right?
I use Workflowy but you can check out Dynalist as its the better offer.
User avatar
the_leg
Prole
Posts: 25
Joined: Sun Sep 05, 2010 3:43 am

Re: Goo: Gui and Animation library.

Post by the_leg »

Sure, but then my Goo would be different from your Goo and that would make it harder to exchange Goo ideas/advice. If you've already done some enhancement work on the text object, maybe you can ask the author to include it in the official Goo.
User avatar
ljdp
Party member
Posts: 209
Joined: Sat Jan 03, 2009 1:04 pm
Contact:

Re: Goo: Gui and Animation library.

Post by ljdp »

Ah Goo. This was a project for one of my other projects then I thought other people might find it useful, slapped some documentation on it and made it public.
Needless to say it got a lil messy and if I had the time i'd rewrite it from scratch.

However, feel free to fork the project on github and make changes and i'll merge it back the original.
User avatar
adrix89
Party member
Posts: 135
Joined: Fri Oct 15, 2010 10:58 am

Re: Goo: Gui and Animation library.

Post by adrix89 »

the_leg wrote:Sure, but then my Goo would be different from your Goo and that would make it harder to exchange Goo ideas/advice. If you've already done some enhancement work on the text object, maybe you can ask the author to include it in the official Goo.
Pretty pointless to say now since you have modify plenty to get it to work on 0.7
Besides some things are plain broken,like text ,and multiline
ljdp wrote:Ah Goo. This was a project for one of my other projects then I thought other people might find it useful, slapped some documentation on it and made it public.
Needless to say it got a lil messy and if I had the time I'd rewrite it from scratch.

However, feel free to fork the project on github and make changes and I'll merge it back the original.
Unfortunately I have no idea how to fork things,nor do I want the responsiblity to manage the fork
heres my current changes if someone wants to fork it
What it has extra is fixed text ala textinput
Also multiline is fixed and added a boundary to wrap to start if its bigger then size panel
Added also another test to see how multiline works
Also added a key ignore so as to add extra functions on onKeypress (in the demo kpenter prints text)

Note that some things might be broken,for example I have no idea about scrlog or the progress bar works so its unmodified(although scrlog has one modified line that might fix it or not,if it needs it)
Attachments
GooLove0.7.love
(340.86 KiB) Downloaded 326 times
I use Workflowy but you can check out Dynalist as its the better offer.
User avatar
Robin
The Omniscient
Posts: 6506
Joined: Fri Feb 20, 2009 4:29 pm
Location: The Netherlands
Contact:

Re: Goo: Gui and Animation library.

Post by Robin »

Hey, this looks much better than I expected!

It crashes on the "change theme" thing, because it can't find the dark style.

Also, window dragging is a bit buggy.
Help us help you: attach a .love.
User avatar
adrix89
Party member
Posts: 135
Joined: Fri Oct 15, 2010 10:58 am

Re: Goo: Gui and Animation library.

Post by adrix89 »

I seriously have no idea why it can't change the skin
If its a folder it has no problem but if tis a .love it crashes
maybe something broke in 0.7?
Ok not even the original 0.6 in .love form doesn't work
It might be archiving process or a bug in love

Haven't touched the dragging
Last edited by adrix89 on Sat Nov 06, 2010 7:50 pm, edited 1 time in total.
I use Workflowy but you can check out Dynalist as its the better offer.
User avatar
Robin
The Omniscient
Posts: 6506
Joined: Fri Feb 20, 2009 4:29 pm
Location: The Netherlands
Contact:

Re: Goo: Gui and Animation library.

Post by Robin »

adrix89 wrote:I seriously have no idea why it can't change the skin
If its a folder it has no problem but if tis a .love it crashes
maybe something broke in 0.7?
Ok not even the original 0.6 in .love form doesn't work
It might be archiving process or a bug in love
I know why: the folder is named "Dark", while the code refers to "dark". Capitalization matters! Renaming it makes it work in .loves and on Linux/Mac.
adrix89 wrote:Update!
Where?
Help us help you: attach a .love.
Post Reply

Who is online

Users browsing this forum: Ahrefs [Bot] and 5 guests