## GOOi, an Android-Oriented GUI Library

Sulunia
Party member
Posts: 201
Joined: Tue Mar 22, 2016 1:10 pm
Location: SRS, Brazil

### Re: GOOi, an Android-Oriented GUI Library

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!
https://github.com/Sulunia

alberto_lara
Party member
Posts: 331
Joined: Wed Oct 30, 2013 8:59 pm

### Re: GOOi, an Android-Oriented GUI Library

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?
LÖVE Projects: GOOi, Süsse and Katsudö
Thank you for taking the time to read this

Sulunia
Party member
Posts: 201
Joined: Tue Mar 22, 2016 1:10 pm
Location: SRS, Brazil

### Re: GOOi, an Android-Oriented GUI Library

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
This ain't even on github, given it was rushed beyond belief.
Don't check my github! It contains thousands of lines of spaghetti code in many different languages cool software!
https://github.com/Sulunia

alberto_lara
Party member
Posts: 331
Joined: Wed Oct 30, 2013 8:59 pm

### Re: GOOi, an Android-Oriented GUI Library

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.
LÖVE Projects: GOOi, Süsse and Katsudö
Thank you for taking the time to read this

Dudenheit
Prole
Posts: 5
Joined: Wed Dec 17, 2014 7:40 am

### Re: GOOi, an Android-Oriented GUI Library

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 :-(

alberto_lara
Party member
Posts: 331
Joined: Wed Oct 30, 2013 8:59 pm

### Re: GOOi, an Android-Oriented GUI Library

Hey, sorry for the delay, this was fixed a few days (or weeks?) ago
LÖVE Projects: GOOi, Süsse and Katsudö
Thank you for taking the time to read this

Marty
Citizen
Posts: 89
Joined: Mon Dec 04, 2017 1:47 am
Location: Germany

### Re: GOOi, an Android-Oriented GUI Library

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.

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

alberto_lara
Party member
Posts: 331
Joined: Wed Oct 30, 2013 8:59 pm

### Re: GOOi, an Android-Oriented GUI Library

@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

.love:
demobg.love
LÖVE Projects: GOOi, Süsse and Katsudö
Thank you for taking the time to read this

alberto_lara
Party member
Posts: 331
Joined: Wed Oct 30, 2013 8:59 pm

### Re: GOOi, an Android-Oriented GUI Library

now that I see this, maybe a small texture being repeated in X and Y would be more useful, right?
LÖVE Projects: GOOi, Süsse and Katsudö
Thank you for taking the time to read this

Marty
Citizen
Posts: 89
Joined: Mon Dec 04, 2017 1:47 am
Location: Germany

### Re: GOOi, an Android-Oriented GUI Library

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.