oLv: Music-oriented GUI and OSC libraries

Showcase your libraries, tools and other projects that help your fellow love users.
GModal
Prole
Posts: 9
Joined: Sun Jul 24, 2022 4:22 pm
Contact:

Re: oLv: Music-oriented GUI and OSC libraries

Post by GModal »

ReFreezed wrote: Thu Jul 28, 2022 9:42 pm Is the centered text maybe drawn like this: love.graphics.print(text, x-textWidth/2, y)
If textWidth is odd you'll draw at non-integer coords, if x is an int.
Yes, I expect that's the issue. Thanks to both of you. I honestly didn't notice. :crazy:

It seems an odd requirement, when most fonts are proportional and subsequent letters wouldn't align to integer boundaries..or would they in LÖVE???

So in 11.3, I can use math.floor() to fix it?
GModal
Prole
Posts: 9
Joined: Sun Jul 24, 2022 4:22 pm
Contact:

Re: oLv: Music-oriented GUI and OSC libraries

Post by GModal »

BrotSagtMist wrote: Thu Jul 28, 2022 9:53 pm I tried

Code: Select all

local oldprint=love.graphics.print
love.graphics.print= function(text, x, y, r , sx, sy, ox, oy, kx, ky )  print(text,x,y)  oldprint(text, math.floor(x),math.floor(y), r, sx, sy, ox, oy, kx, ky) end
And its gone, yea youre not using integers there. Rendering to floats will cause a blur.
Text on the knob is still blurry tho.
There it is (math.floor). Thanks!!!
GModal
Prole
Posts: 9
Joined: Sun Jul 24, 2022 4:22 pm
Contact:

Re: oLv: Music-oriented GUI and OSC libraries

Post by GModal »

BrotSagtMist wrote: Thu Jul 28, 2022 9:53 pm Text on the knob is still blurry tho.
Using math.floor for the arguments of love.graphics.translate() in drawknob() fixes the knob text, too.

Cool.
GModal
Prole
Posts: 9
Joined: Sun Jul 24, 2022 4:22 pm
Contact:

Re: oLv: Music-oriented GUI and OSC libraries

Post by GModal »

OK, pushed a fix to the repository for the text rendering issue. The new release is 0.1.2.
https://github.com/GModal/oLvgui

Many thanks to BrotSagtMist and ReFreezed for pointing out a fairly rookie error. :)

V0.1.2 also includes the mkGui demo from the video. It does require pd2jack to operate, as well.
(it's here: https://github.com/GModal/pd2jack)
Post Reply

Who is online

Users browsing this forum: Google [Bot] and 15 guests