calref / cboe

Classic Blades of Exile
http://spiderwebforums.ipbhost.com/index.php?/forum/12-blades-of-exile/
Other
167 stars 41 forks source link

naively scale dialogs by ui scale #351

Closed NQNStudios closed 1 month ago

NQNStudios commented 1 month ago

This is a naive solution to #350, dialog scaling. It just scales up the dialog after drawing text (so it looks blurry), and divides mouse coordinates by scale so you can still click on everything.

It could definitely have bugs in edge cases of subclasses of Dialog, or if any dialogs don't use the Dialog class, some windows won't be fixed.

CelticMinstrel commented 1 month ago

Looks fine to me, though you may want to consider putting get_float_pref("UIScale", 1.0) into a private function in cDialog, since it's used at least 3 times.

Doesn't the main UI scaling also scale up after text? It should end up being pixellated rather than blurry, though.

CelticMinstrel commented 1 month ago

It could definitely have bugs in edge cases of subclasses of Dialog, or if any dialogs don't use the Dialog class, some windows won't be fixed.

I don't think there are any that don't use the Dialog class, and as for subclasses, I'm pretty sure there aren't any.