Page 7 of 14

Re: GÖÖi, an Android-Oriented GUI Library

Posted: Thu Aug 25, 2016 4:43 am
by alberto_lara
You're actually right, the second one is the normal way, not sure what I was thinking, let me check that out :)

Re: GÖÖi, an Android-Oriented GUI Library

Posted: Thu Aug 25, 2016 4:37 pm
by alberto_lara
Done! now the canvas logic is as usual:

Code: Select all

function love.draw()
	-- Do canvas stuff:
	gr.setCanvas(canvas)
	gr.clear()

	gr.setColor(62, 131, 95)
	gr.rectangle("fill", 0, 0, width, height)

	gr.setColor(255, 255, 255)
	gr.draw(imgBg, 0, 0)
	gooi.draw()

	gr.setCanvas()
	gr.draw(canvas, 0, 0, 0, scale, scale)--   <--Scale your canvas
end
EDIT: I didn't even notice the colors where wrong, this is GÖÖi scaled (x4), with and without nearest filter:
Image

EDIT 2: Multitouch is not working on scaled canvases, in Android... I'm checking this.

EDIT 3: Done, now it sems to work fine in Desktop and Android, scaled or not :) try this .love, comment the lines according to the platform:
demoCanvas.love
(131.58 KiB) Downloaded 186 times

Re: GÖÖi, an Android-Oriented GUI Library

Posted: Sun Jan 08, 2017 7:13 am
by alberto_lara
Version 0.0.1 is now officially released, there are vertical sliders now:
Image

P.S. Süsse has not this version yet

Re: GÖÖi, an Android-Oriented GUI Library

Posted: Tue Jan 10, 2017 12:20 am
by alberto_lara
I've created a Wiki for GÖÖi (is still missing some details but it's good enough for now), hope you like it!

Re: GÖÖi, an Android-Oriented GUI Library

Posted: Wed Jan 11, 2017 8:37 pm
by ArchAngel075
encountered an issue,
take the below code

Code: Select all

local defaultStyling = {
    bgColor = {12, 183, 242, 170}, -- LOVE blue
    fgColor = {255, 255, 255, 255}, -- Foreground color
    tooltipFont = love.graphics.newFont(10), -- tooltips are smaller than the main font
    radius = 3, -- radius for the outer shapes of components
    innerRadius = 3, -- For the inner ones
    showBorder = false, -- border for components
    borderColor = {12, 183, 242, 255},
    borderWidth = 2, -- in pixels
    font = love.graphics.newFont(48),
    mode3d = false, -- gives that subtle gradient on the given color
    glass = false -- for a glass effect (horizon reflection)
}
  local lab = gooi.newLabel({
    text = "hello my name is bob",
    x = 25,
    y = 150,
    w = 100,
    h = 30,
    align = "left", -- text alignment
    icon = "imgs/exit.png",
})
  lab:setStyle(defaultStyling)
copied directly from the wiki. I changed the style to be font size 48.
When using

Code: Select all

gooi.setStyle(defaultStyling)
it is applied to the label, but using

Code: Select all

lab:setStyle(defaultStyling)
it is not applied to label.

**EDIT**
fix found :
changing gooi/gooi.lua line: 1815
from

Code: Select all

love.graphics.setFont(gooi.getFont())-- Specific or a common font.
to

Code: Select all

love.graphics.setFont(gooi.getFont(comp))-- Specific or a common font.
Issue tracked @ https://github.com/tavuntu/gooi/issues/6

Re: GÖÖi, an Android-Oriented GUI Library

Posted: Wed Jan 11, 2017 9:52 pm
by alberto_lara
It's fixed now, thanks!

Re: GÖÖi, an Android-Oriented GUI Library

Posted: Wed Jan 11, 2017 9:57 pm
by alberto_lara
Here's the canvas demo (updated):
demo_canvas.love
(131.22 KiB) Downloaded 174 times

Re: GÖÖi, an Android-Oriented GUI Library

Posted: Wed Jan 11, 2017 10:18 pm
by alberto_lara
xopxe wrote:Is it possible / will it be possible to have vertical sliders?
it's possible now

Re: GÖÖi, an Android-Oriented GUI Library

Posted: Thu Jan 12, 2017 11:51 am
by trelemar
Could you ever implement something like this?

Panel:getComponent(row, column)

Re: GÖÖi, an Android-Oriented GUI Library

Posted: Fri Jan 13, 2017 8:25 pm
by alberto_lara
Sure, why not, feel free to open a request issue