GOOi, an Android-Oriented GUI Library

Showcase your libraries, tools and other projects that help your fellow love users.
User avatar
Sulunia
Party member
Posts: 203
Joined: Tue Mar 22, 2016 1:10 pm
Location: SRS, Brazil

Re: GOOi, an Android-Oriented GUI Library

Post by Sulunia »

I just realized pressing backspace on a text input field does not erase the text, and setting the text on the field to an empty string also does not work. Any ideas?
Don't check my github! It contains thousands of lines of spaghetti code in many different languages cool software! :neko:
https://github.com/Sulunia
User avatar
alberto_lara
Party member
Posts: 372
Joined: Wed Oct 30, 2013 8:59 pm

Re: GOOi, an Android-Oriented GUI Library

Post by alberto_lara »

Last time I checked, that worked just fine, let me see.

EDIT: I could not reproduce the issue, are you still seeing it? if so, can you provide a .love please?
User avatar
Sulunia
Party member
Posts: 203
Joined: Tue Mar 22, 2016 1:10 pm
Location: SRS, Brazil

Re: GOOi, an Android-Oriented GUI Library

Post by Sulunia »

alberto_lara wrote: Thu Sep 21, 2017 1:34 am Last time I checked, that worked just fine, let me see.

EDIT: I could not reproduce the issue, are you still seeing it? if so, can you provide a .love please?
Sure!
I used your library for a small school project about threads. I already showed it to the teacher, but the fact the text won't erase is still bugging me.
(I also apologize for the very ghetto UI definition, I did the whole thing in less than an hour.)
Attachments
love2d-8thread.love
This ain't even on github, given it was rushed beyond belief.
(3.55 MiB) Downloaded 635 times
Don't check my github! It contains thousands of lines of spaghetti code in many different languages cool software! :neko:
https://github.com/Sulunia
User avatar
alberto_lara
Party member
Posts: 372
Joined: Wed Oct 30, 2013 8:59 pm

Re: GOOi, an Android-Oriented GUI Library

Post by alberto_lara »

Ok, I see the problem now, when using GOOi in a desktop environment use gooi.desktopMode() before creating any element.

* You also forgot to add gooi.update(dt) in love.update(dt)
* You need to add as well:

Code: Select all

function love.keypressed(k, code, isrepeat)  gooi.keypressed(k, code) end
function love.keyreleased(k, code, isrepeat) gooi.keyreleased(k, code) end
I think a didn't mentioned all these in the Wiki, let me add them, sorry for the inconvenient.
Dudenheit
Prole
Posts: 5
Joined: Wed Dec 17, 2014 7:40 am

Re: GOOi, an Android-Oriented GUI Library

Post by Dudenheit »

Hi! First of all, it's a awesome library and really cool.

One thing, I stumbled several times over is the function setText(string).
If I have a textbox, where the user can write in and I want to fill it automatically with setText(string) it adds the string to the one, which is already in it.

Example:

Code: Select all

txt_name = gooi.newText():setText("[name]")
returns a text-box with "[name]" in it.
Now i read the name out of a file and want to offer this as a default-entry.

Code: Select all

txt_name:setText(string_out_of_a_file) --for example "Hotzenplotz"
The result is a Textblock with: "[name]Hotzenplotz"
But the wanted result is just "Hotzenplotz".
Does anyone knows how to fix it? My first attempt was, that gooi has a special function to clean the Textboxes, but I found no :-(
User avatar
alberto_lara
Party member
Posts: 372
Joined: Wed Oct 30, 2013 8:59 pm

Re: GOOi, an Android-Oriented GUI Library

Post by alberto_lara »

Hey, sorry for the delay, this was fixed a few days (or weeks?) ago :)
User avatar
Marty
Citizen
Posts: 89
Joined: Mon Dec 04, 2017 1:47 am
Location: Germany

Re: GOOi, an Android-Oriented GUI Library

Post by Marty »

Hi Alberto, your lib looks very promising, nice work on it, it makes a solid appearance.

I'm just wondering, can I use image buttons and image fonts with your lib?

I think it's important to provide a GUI that matches the overall feeling of the game to let it look fancy and juicy. A simple icon in the button isn't enough, tho. Using the default theme (even when changing colors) in a colorful low-pixel game wouldn't look so well imo.
Visual Studio Code TemplateRichLÖVE Mobile (AdMob+UnityAds+PlayGamesServices+GameCenter)Add me on Discord

───▄▀▀▀▄▄▄▄▄▄▄▀▀▀▄───
───█▒▒░░░░░░░░░▒▒█───
────█░░░░░░░░░█────
▄▄──█░░░▀█▀░░░█──▄▄
█░░█▀▄░░░░░░░▄▀█░░█
User avatar
alberto_lara
Party member
Posts: 372
Joined: Wed Oct 30, 2013 8:59 pm

Re: GOOi, an Android-Oriented GUI Library

Post by alberto_lara »

@modiX yes, GOOi has support for that somehow, use the

Code: Select all

:setBGImage()
function, it receives a lua string or a LOVE image. I haven't tested this function with all the components though, so thanks for the heads up.

GOOi 0.0.6 os out! (btw) https://github.com/tavuntu/gooi/wiki/Change-Log#006

EDIT: It looks like it works just fine :)
Image
.love:
demobg.love
(319.81 KiB) Downloaded 623 times
User avatar
alberto_lara
Party member
Posts: 372
Joined: Wed Oct 30, 2013 8:59 pm

Re: GOOi, an Android-Oriented GUI Library

Post by alberto_lara »

now that I see this, maybe a small texture being repeated in X and Y would be more useful, right?
User avatar
Marty
Citizen
Posts: 89
Joined: Mon Dec 04, 2017 1:47 am
Location: Germany

Re: GOOi, an Android-Oriented GUI Library

Post by Marty »

alberto_lara wrote: Fri Feb 23, 2018 6:59 pm @modiX yes, GOOi has support for that somehow, use the

Code: Select all

:setBGImage()
function, it receives a lua string or a LOVE image. I haven't tested this function with all the components though, so thanks for the heads up.

GOOi 0.0.6 os out! (btw) https://github.com/tavuntu/gooi/wiki/Change-Log#006

EDIT: It looks like it works just fine :)
Thanks for the response, looks nice, I will use your lib for my mobile games from now on =)
alberto_lara wrote: Fri Feb 23, 2018 7:19 pm now that I see this, maybe a small texture being repeated in X and Y would be more useful, right?
That would be helpful in some circumstances.

Can you also set the background to transparent?
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.
Visual Studio Code TemplateRichLÖVE Mobile (AdMob+UnityAds+PlayGamesServices+GameCenter)Add me on Discord

───▄▀▀▀▄▄▄▄▄▄▄▀▀▀▄───
───█▒▒░░░░░░░░░▒▒█───
────█░░░░░░░░░█────
▄▄──█░░░▀█▀░░░█──▄▄
█░░█▀▄░░░░░░░▄▀█░░█
Post Reply

Who is online

Users browsing this forum: Ahrefs [Bot] and 1 guest