¿How to correctly work with dp's?
Posted: Mon May 18, 2020 11:00 pm
Hi ! I currently doing some tests with UI in LOVE2D, actually I am trying to implement a floating action button (1) acordly to the documentation the "mini" version of this component have 20 dp of radius so I do this in my LOVE2D code:
but the result in my screen is bigger than expected:
What I am doing wrong?
[1] https://material.io/components/buttons- ... ion-button
Code: Select all
love.graphics.circle("fill", self:getX(), self:getY(), love.window.toPixels(20)) -- convert 20 dp to pixels
What I am doing wrong?
[1] https://material.io/components/buttons- ... ion-button