GOOi, an Android-Oriented GUI Library

Showcase your libraries, tools and other projects that help your fellow love users.
User avatar
alberto_lara
Party member
Posts: 326
Joined: Wed Oct 30, 2013 8:59 pm

Re: GOOi, an Android-Oriented GUI Library

Post by alberto_lara » Sun Feb 25, 2018 4:57 am

modiX wrote:
Sat Feb 24, 2018 8:34 pm
When you have any greater texture behind it, it might make more sense to simply put the background transparent and add some semi-transparent effect for clicking and such.
I see, you mean something to give the impression it's being clicked, right?
LÖVE Projects: GOOi, Süsse, Dyzön and Katsudö
Thanks for taking the time and read this

User avatar
modiX
Citizen
Posts: 86
Joined: Mon Dec 04, 2017 1:47 am
Location: Germany

Re: GOOi, an Android-Oriented GUI Library

Post by modiX » Mon Feb 26, 2018 3:00 pm

alberto_lara wrote:
Sun Feb 25, 2018 4:57 am
I see, you mean something to give the impression it's being clicked, right?
Yes.

Basically I have a complicated background. Maybe I designed a full window with nice texture that is in the background of my form. Your controls on my form should be able to be 100% transparent if I want to. Or I want the buttons only to be bordered and the rest is transparent so I see the background of my form. Since my buttons are re-arranged based on the resolution, I cannot simply design the whole button, but I need to be able to see the background texture through it. I haven't tested it, but I think putting a transparent image should already suit my needs.

Now what would be very helpful is to set a different image when the user is clicking / interacting with the control. Maybe I want to overlay some shadows or some white semi transparent film to the surface of the button. This would make your lib an allrounder when it comes to GUI on LÖVE.

I'm very exited to try your lib this week when everything works like expected on my end. :)


Keep up that good work!
Visual Studio Code TemplateRichLÖVE Mobile (AdMob+UnityAds)Add me on Discord

───▄▀▀▀▄▄▄▄▄▄▄▀▀▀▄───
───█▒▒░░░░░░░░░▒▒█───
────█░░░░░░░░░█────
▄▄──█░░░▀█▀░░░█──▄▄
█░░█▀▄░░░░░░░▄▀█░░█

User avatar
alberto_lara
Party member
Posts: 326
Joined: Wed Oct 30, 2013 8:59 pm

Re: GOOi, an Android-Oriented GUI Library

Post by alberto_lara » Mon Feb 26, 2018 4:48 pm

I see, well, you may want to see gooi.glass(), gooi.mode3d() and gooi.shadow() if you want to see different styles in action. For transparency, you just have to set bgColor like {255, 0, 0, 127}, for instance (for a red transparent color). If you want a totally transparent background with a solid border then just play with the corresponding properties.

As for the image set with :setBGImage(), there's not way of setting transparency for that, but there should be, I could add that functionality on the next version of GOOi (or you could add a PR for that :) )
LÖVE Projects: GOOi, Süsse, Dyzön and Katsudö
Thanks for taking the time and read this

User avatar
modiX
Citizen
Posts: 86
Joined: Mon Dec 04, 2017 1:47 am
Location: Germany

Re: GOOi, an Android-Oriented GUI Library

Post by modiX » Fri Mar 02, 2018 1:49 pm

alberto_lara wrote:
Mon Feb 26, 2018 4:48 pm
I see, well, you may want to see gooi.glass(), gooi.mode3d() and gooi.shadow() if you want to see different styles in action. For transparency, you just have to set bgColor like {255, 0, 0, 127}, for instance (for a red transparent color). If you want a totally transparent background with a solid border then just play with the corresponding properties.

As for the image set with :setBGImage(), there's not way of setting transparency for that, but there should be, I could add that functionality on the next version of GOOi (or you could add a PR for that :) )
Thank you very much, I will look into such functions.

However, I just noticed that your lib is using a global variable called "component". This is a bit of goof for me, since I'm using a global variable component for accessing my ECS-components.

In my opinion any library should be nested in one global variable, which is "gooi" in this case. Now I could require the lib into a variable, but this will break, because you access your global variables from your code, everywhere. It's not just component, but even layout, label, slider, etc. Requiring those to be globally accessible sounds bad by design, because you'd have no idea with what you might name-conflict, and thus, easy implementation is not ensured, anymore.

It would be great if you could overthink the API of gooi, so you end up with only one global variable, called gooi?



EDIT: Also, please check out this design:
Image

Its buttons are designed with 3 segments. The left and the right segment is for the each side (left/right) of the button. The middle segment of the texture is for all the space between the other two segments. So this part gets repeated on the x axis.

I could not find a way to build buttons like this. Is this possible? After trying a little I can clearly see that you stretch the image to fit the content. However on low res images this does not look good. I'd love to know how I can change that.



Overall I love the idea of your grid system, but I miss more features like independent padding in any cell of the grid, or did I miss it? :o
Also, how can I change the background of a button when it's getting clicked?
Visual Studio Code TemplateRichLÖVE Mobile (AdMob+UnityAds)Add me on Discord

───▄▀▀▀▄▄▄▄▄▄▄▀▀▀▄───
───█▒▒░░░░░░░░░▒▒█───
────█░░░░░░░░░█────
▄▄──█░░░▀█▀░░░█──▄▄
█░░█▀▄░░░░░░░▄▀█░░█

User avatar
alberto_lara
Party member
Posts: 326
Joined: Wed Oct 30, 2013 8:59 pm

Re: GOOi, an Android-Oriented GUI Library

Post by alberto_lara » Wed Mar 07, 2018 4:17 pm

I could not find a way to build buttons like this. Is this possible?
not really, but this could be added in future versions of GOOi, please feel free to make a PR or a feature request.
but I miss more features like independent padding in any cell of the grid, or did I miss it?
No independent padding either (this is easier to implement than the button thing though)
how can I change the background of a button when it's getting clicked?
you can use the onPress() and onRelease() callbacks (not really practical but it's how it can be done right now):

Code: Select all

btn = gooi.newButton({text = "my button"})
:onPress(function(c) c:bg(alternativeColor); end)
:onRelease(function(c) c:bg(initialColor); end)
EDIT: about the global variables thing, you're totally right, I'll have to change a few code for that.
LÖVE Projects: GOOi, Süsse, Dyzön and Katsudö
Thanks for taking the time and read this

User avatar
yetneverdone
Party member
Posts: 302
Joined: Sat Sep 24, 2016 11:20 am
Contact:

Re: GOOi, an Android-Oriented GUI Library

Post by yetneverdone » Fri Apr 06, 2018 2:31 am

Panels (grids) should have the setting to draw outer border
In modals confirm, allow texts "okay" and "cancel" be modifiable, or just provide a way to make dialogue box.
Panel:add should allow in what col and row it be set into.

User avatar
yintercept
Prole
Posts: 27
Joined: Mon Apr 02, 2018 3:31 pm

Re: GOOi, an Android-Oriented GUI Library

Post by yintercept » Sun Apr 08, 2018 3:29 am

Theres a *tiny* pull request waiting on github that allows users to specify the y positioning of text on a button.

Do you have any other small code tweaks/chores you'd be willing to farm out?
Currently working on something Love2D could really use. Shhh.

User avatar
memzen
Prole
Posts: 5
Joined: Fri May 11, 2018 7:50 am

Re: GOOi, an Android-Oriented GUI Library

Post by memzen » Fri May 11, 2018 8:24 am

I worked on updating Gooi with the color range changes in Love 11. The colors are better but not 100%. Get here:

https://drive.google.com/open?id=1FpOmO ... o7X4taF4km

User avatar
alberto_lara
Party member
Posts: 326
Joined: Wed Oct 30, 2013 8:59 pm

Re: GOOi, an Android-Oriented GUI Library

Post by alberto_lara » Sat May 12, 2018 10:45 pm

Hey everyone, sorry for the delay, it's been some crazy times in the office.
In modals confirm, allow texts "okay" and "cancel" be modifiable, or just provide a way to make dialogue box.
I think it's possible to do it, here you can see the code which does that. There's no example (currently) for that in the Wiki, I'll keep it in mind while I fix some stuff here and there (like the lost images). I'll try to have some updates in a few days or a couple of weeks.
LÖVE Projects: GOOi, Süsse, Dyzön and Katsudö
Thanks for taking the time and read this

User avatar
alberto_lara
Party member
Posts: 326
Joined: Wed Oct 30, 2013 8:59 pm

Re: GOOi, an Android-Oriented GUI Library

Post by alberto_lara » Tue May 15, 2018 9:03 pm

Update #1: I've merged this PR (thanks to jmiskovic)

Update #2: Updated images on readme file and Wiki
LÖVE Projects: GOOi, Süsse, Dyzön and Katsudö
Thanks for taking the time and read this

Post Reply

Who is online

Users browsing this forum: No registered users and 4 guests