#8388 closed patch
Selfscaling GUI
Reported by: | lordhoto | Owned by: | fingolfin |
---|---|---|---|
Priority: | normal | Component: | GUI |
Version: | Keywords: | ||
Cc: | Game: |
Description
Hi,
I extened the GUI, now it scales itself when using a resolution different than 320x200 or 320x240. Now the GUI in COMI looks nicer than the older( I hope ). Currently I found a bug if some message is displayed at the OSD in COMI you can't read the message, because the OSD of the SDL backend is using the Font class and now the font class sclaes the font.
Ticket imported from: #1092994. Ticket imported from: patches/493.
Attachments (6)
Change History (15)
by , 20 years ago
Attachment: | scaleableGui-v1.patch added |
---|
comment:1 by , 20 years ago
fixed glitches with the OSD and the console(console looked very ugly in COMI and was not usable).
comment:2 by , 20 years ago
Please don't submit "patches for patches", or "patches atop other patches" -- a single patch that applies for all. All else just leads to confusion and makes it hard to review your changes -- in particular, I always review patches directly before even thinking about applying & trying them.
Anyway, what you describe (automatically scaling the font) sounds like something I wouldn't accept into CVS anyway. Proper solution would be to provide a second "big" font; how that font then works (by scaling one of the "small" fonts, or by providing font data for a bigger font) isn't so important then.
Also note: we are working on a new revised overlay system which then allows the GUI to work in 640x400 "natively".
comment:3 by , 20 years ago
"* Add ability to scale GUI ..." ;)
i think the 'big' font should be created at runtime. Or we could copy all drawn charakter into a surface and than scale the hole surface.
comment:4 by , 20 years ago
The patch sadly seems to be somewhat messed up, it contains far too many newlines :-). Would be good to get a proper patch eventually. I also noticed that you added/removed whitespaces in a lot of places; that makes the patch bigger than necessary and seems to serve no purpose. I'd suggest you undo these changes, that'll make reviewing the patch easier.
Also, it appears the patch is partially (e.g. for newgui.cpp) reversed. Which'd make it even more impossible to apply :-)
Why don't you just "cvs diff -u" to create the patch? That or an equivalent should be available in any CVS client, and will avoid all the line ending issues you appear to have, as well as gurantee a clean working patch against CVS.
As for the font: I'd still prefer to add another bigger font to CVS, even if initially it would be just a scaled version of the normal font. I have lots of nice BDF fonts in various sizes sitting around here which we could use instead, though.
comment:5 by , 20 years ago
with all whitespaces delted comes from my editor it deletes all whitesspaces/tabs at the end of a line and I can't disable it :/
So new patch against current cvs :)
comment:6 by , 20 years ago
I am not 100% happy with how the patch works, but since it'll be easy to disable the thing if we don't want it, I'll commit it for now anyway. That way it'll be easier to do further work on it.
comment:7 by , 20 years ago
I rewrote the code to use a seperate font in the "scaled" mode. I also introduced a "FontManager" for this. For details, see CVS.
comment:8 by , 20 years ago
Owner: | set to |
---|---|
Status: | new → closed |
comment:9 by , 6 years ago
Component: | → GUI |
---|
initial patch