Page 6 of 14
Re: GÖÖi, an Android-Oriented GUI Library
Posted: Thu Jun 09, 2016 8:17 pm
by LordSeaworth
alberto_lara wrote:You're welcome, and yes, GÖÖi works in LÖVE 0.10.1 and in desktop environments.
Thanks mate. Prolly gonne use this lib. or atleast test it out first.
Nice work
Re: GÖÖi, an Android-Oriented GUI Library
Posted: Thu Jun 16, 2016 5:40 pm
by alberto_lara
Hi, new widget: modals!
Code:
Code: Select all
gooi.alert("The background has changed!")
Code:
Code: Select all
gooi.confirm("Change background?", function()
gr.setBackgroundColor(r2(), r2(), r2())
end)
I'm going to update the repo in a few hours.
Re: GÖÖi, an Android-Oriented GUI Library
Posted: Fri Jun 17, 2016 1:18 am
by lvtalpo
Hi, thanks for the great library.
Is there any way to change icons in buttons & labels after creation?
Re: GÖÖi, an Android-Oriented GUI Library
Posted: Fri Jun 17, 2016 3:53 pm
by alberto_lara
Yes, there's a function setIcon(Image|string), you can set the icon as a property:
Code: Select all
gooi.newButton({icon = "icon.png"})
chain:
Code: Select all
gooi.newButton("button"):setIcon("icon.png")
or separated:
Code: Select all
btn = gooi.newButton()
btn:setIcon("icon.png")
EDIT: I've just updated the repo.
Re: GÖÖi, an Android-Oriented GUI Library
Posted: Fri Jul 29, 2016 12:17 pm
by DIEHARD25
Hello there)
Best GUI lib i've found for LOVE) Huge work, my best regards!
Some stupid question - can i make a button in already created grid always enabled after press? Fount some sort of using (setEnabled()), it works, but works always (i can't press already pressed button:))
Thanks for reading and for great tool)
Best regards, Konstantin
Re: GÖÖi, an Android-Oriented GUI Library
Posted: Mon Aug 01, 2016 2:25 pm
by Germanunkol
Is there a function which tells me if the mouse is hovering over _any_ gooi element? If not, can you add one?
I want to pass on a click to the level only if it doesn't hit a UI element...
Re: GÖÖi, an Android-Oriented GUI Library
Posted: Tue Aug 02, 2016 9:31 pm
by qubodup
https://www.youtube.com/watch?v=xhJ0Ljx2KDM
Just made an updated video of this gooey stuff. Gotta love the drag-cat.
Re: GÖÖi, an Android-Oriented GUI Library
Posted: Tue Aug 09, 2016 5:43 pm
by alberto_lara
Hey, sorry for the delay.
Some stupid question - can i make a button in already created grid always enabled after press? Fount some sort of using (setEnabled()), it works, but works always (i can't press already pressed button:))
I'm not sure what you're asking, can you please repeat that?
About the "hover" function, yes, therer's one:
if you create, let's say, a radio button, you can use it like this:
Code: Select all
if theRadioBtn:overIt() then
--do stuff
end
And finally, thanks for the video!
Re: GÖÖi, an Android-Oriented GUI Library
Posted: Wed Aug 24, 2016 9:13 pm
by alberto_lara
Hi, I added canvas support for GÖÖi, now you can make something like this:
Code: Select all
function love.load()
canvas = love.graphics.newCanvas(320, 240)
gooi.setCanvas(canvas)
gooi.newButton("A button")
end
function love.update(dt)
gooi.update(dt)
end
function love.draw()
love.graphics.setCanvas(canvas)
-- Draw you canvas stuff
love.graphics.setCanvas()
-- Draw gooi in the same canvas:
gooi.draw()
end
So just 2 drawing operations are performed, the ones you make for your game canvas, and the one which draws the entire GÖÖi, in the example below I draw a scaled canvas/window and GÖÖi works with no problems (the changes in code were precisely to achieve this):
EDIT: Not tested in Android yet, I'm checking that
EDIT 2: It had some problems with Android, they're mostly fixed except for some weird sharp turns in some analog components, I'm going to check that out too, in the meantime, as a workaround (to avoid these imperfections) you could use these funcions in Android:
Code: Select all
function love.mousepressed(x, y, button) gooi.pressed() end
function love.mousereleased(x, y, button) gooi.released() end
instead of these ones:
Code: Select all
function love.touchpressed(id, x, y) gooi.pressed(id, x, y) end
function love.touchreleased(id, x, y) gooi.released(id, x, y) end
function love.touchmoved(id, x, y) gooi.moved(id, x, y) end
this removes multitouch support but at least it'll work fully ok.
EDIT 3: Just uploaded a small change which seems to fix the last issue mentioned, thanks for your feedback!
Re: GÖÖi, an Android-Oriented GUI Library
Posted: Thu Aug 25, 2016 12:05 am
by pgimeno
alberto_lara wrote:
Code: Select all
function love.draw()
love.graphics.setCanvas(canvas)
-- Draw you canvas stuff
love.graphics.setCanvas()
-- Draw gooi in the same canvas:
gooi.draw()
end
I'm guessing this is a typo? Shouldn't the above be like this or am I misunderstanding something?
Code: Select all
function love.draw()
love.graphics.setCanvas(canvas)
-- Draw you canvas stuff
-- Draw gooi in the same canvas:
gooi.draw()
love.graphics.setCanvas()
end