[SOLVED] Text input in a 2D screen

Hey, thank you for your help!

Just wanted to post that I found the problem with Device Pixel Ratio in Rendering.
Now I see your post about it :slight_smile:

I definitely need DPR, if I switch it off my scene looks blurry.
Bad luck.

1 Like

See Office Hours below for working through this problem. Jump 5:42 for the start of the answer

The HTML elements are position in CSS pixel units but the PlayCanvas elements screen corners will use screen coordinates which will be dependent on the device pixel ratio.

Fixed project: https://playcanvas.com/project/877545/overview/UIComponents%20with%20DPR

5 Likes

A post was split to a new topic: Cem’s UI HTML elements don’t work with rendering fill mode keep aspect ratio

Thanks for this. I was starting to think I was going to have to implement the form screen with pure HTML/CSS. You saved me from massive pain and suffering.

@commention did the hard work and kindly shared the code. I just fixed it up for Device Pixel Ratio.

1 Like

A post was split to a new topic: How to stop canvas resizing when mobile keyboard is in use?