Skip to content

Conversation

@LeonSparta
Copy link
Contributor

Added DPI scaling to the ui_api.cpp, now the DrawImage, DrawString and DrawStringWidth function can scale with windows scale settings. Some usage of these functions in lua files from POB and POB 2 are hard coded, so they still need to be adjusted accordingly.

… and DrawStringWidth function can scale with windows scale settings. Some usage of these functions in lua files from POB and POB 2 are hard coded, so they still need to be adjusted accordingly.
@LeonSparta
Copy link
Contributor Author

SimpleGraphic.zip
This is the built dll file, to save some precious time to review the PR.
Now this is before the change:
Screenshot 2025-09-17 223838
This is after the change:
Screenshot 2025-09-17 223806
You can clearly see the UI elements and texts are all rendering accordingly, my screen resolution is 3840 x 2160 with a scaling factor of 200%.

@LeonSparta
Copy link
Contributor Author

@LocalIdentity @Wires77
Hi! I'd like to join the development discord for POB and POB2, mainly to fix the scaling issue related to the frontend. You can see what I meant from the screenshots above. Thanks!

@LocalIdentity
Copy link
Contributor

@LeonSparta message me on Discord (Localidentity) and I'll send you an inv

@LeonSparta
Copy link
Contributor Author

Found some more code need to be adjusted in the files unrelated to Lua scripts, will create another PR after thorough testing.

@LeonSparta LeonSparta closed this Sep 17, 2025
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

None yet

Projects

None yet

Development

Successfully merging this pull request may close these issues.

2 participants