Derma UI elements shift around at lower resolution

Hi, title says it all. I’m coding some derma UI, but when I test it at a lower resolution by changing settings and rejoining, the elements just aren’t quite in place as they should be; despite the fact that I’m using ScreenScale() for fonts and scrW(), scrH() for position & size

Thank you

Can you share a screenshot and a snippet of your code? What you said is the correct way to do it, meaning that you probably just confused the math somewhere.

I’ve had issues in the past where rejoining doesn’t resolve placement issues. Best bet was to always change resolution and reboot the game. Screenshots would be helpful if you are still experiencing the issue after that!

Exiting game & restarting doesn’t fix it, here are screenshots (code below)
Checked if it was because of the way I used CenterHorizontal(), but it wasn’t.

[Snipped since no longer needed, problem was I was using scrW to calculate the height rather than using scrH, as I should.]

Took me a while to find it, you are using the screen width to set the height of the panel.
Also why not divide it by 6.6 instead of 66 then multiplying by 10?

1 Like

Ah, thank you. Was looking for something like that but didn’t see it.

Also, when I’m developing I just kind of do crazy on-the-fly code edits, and clean it up afterwards, hence the 10*(scrW/66) instead of (scrW/6.6). Will clean that up later!

Thanks again!