Closed JNechaevsky closed 7 months ago
Thanks for accepting! 🤗
On a next step I would like to suggest indication of savegame file date ("modified" date, technically) in Save/Load menu. It's shamelessly inspired by Woof, but approach is different, I have a working code for Doom, Heretic and Hexen already.
Please note, that it will require just a small extension of existing DrawSaveLoadBottomLine
function, but what's more interesting - constructing date in "%Y-%m-%d %X"
doesn't seems to require shutting up pragmas, at least GCC on MSYS and Linux are happy. Probably worth to checkout Woof's code as well.
Results are pretty obivious, but will require adaptation of coloring style to Crispy + small vertical menu shifting:
However, before proceed I need to get your approval to remove extra line background, this one:
If one more extra line background will be used for file date, it probably will not look good, and not using any extra lines will allow to don't draw anything over status bar (pixel perfection!).
Thanks for accepting! 🤗
Thanks for working on this!
but what's more interesting - constructing date in
"%Y-%m-%d %X"
doesn't seems to require shutting up pragmas, at least GCC on MSYS and Linux are happy. Probably worth to checkout Woof's code as well.
Sure, but "%Y-%m-%d"
is not the native date format in my locale. We shut up the warning, because in some locales the date format is only two- digit, and then the date string is century ambiguous.
However, before proceed I need to get your approval to remove extra line background
Yes, of course, please proceed.
Sure, but "%Y-%m-%d" is not the native date format in my locale. We shut up the warning, because in some locales the date format is only two- digit, and then the date string is century ambiguous.
Aaaah, so idea is to set not just time, but also a date to user's locale, got it. My native format is DD.MM.YYYY, but somehow I got used to YYYY-MM-DD international ISO format. Sure, worth to follow Woof approach then.
First results. There is small problem with original 4:3 ratio I would like to solve - file date should not be drawing over status bar KIS stats, otherwise it will not be very nice, but this way menu is slightly higher than it should be.
Another idea is to make status bar KIS stats translucent while active Save/Load menu. This will also keep chat line visible:
Which way should I proceed?
Third idea is try to fit everything in one line, like on this mockup
This is tricky, but won't require vertical menu shifting at all, and we'll have to remove PGUP
/PGDN
strings, otherwise it won't fit nicely. But we can implement scrolling by arrow keys as well, they aren't used while string editing.
P.S. Hmm, MM/DD/YYYY is not my locale format, despite of I'm using following string to construct date and time: strftime(filedate, sizeof(filedate), "%x %X", localtime(&filestat.st_mtime));
You'll have to call setlocale(LC_TIME, "")
somewhere early in the init code (and thus unleash a plethora of bugs on Windows).
https://github.com/fabiangreffrath/woof/blob/877836530867a100f91834c05c362b48b7dc7c30/src/i_main.c#L56
Worked perfectly, GCC under MSYS doesn't have any complains 😊
Please choose preferred alignment:
drawKIStranslucent = (!crispy->widescreen && menuactive && (currentMenu == &SaveDef || currentMenu == &LoadDef));
, handled via M_Ticker
or even better, just once when menu is activated/deactivated. Translucency seems to be needed only for 4:3 ratio. But what about level name in opened automap? It will have same problem with drawing save date on top of it.M_WriteText
calls, like save date aligned to the LoadDef.x
, >
to the LoadDef.x+(SAVESTRINGSIZE-6)*8
and so on, and so on.To be honest, I wouldn't bother with translucency and just draw things over things. We only have so much space on screen, and the menu already covers various part of the game scene. 🤷
Small collection of various menu control improvements.
Following actions can be confirmed by
Enter
key:Y
key.Heretic and Hexen:
F10
in any game states, so user won't need to open game menu and select "Quit Game", if the game wasn't started.Extra:
LMB
/RMB
clicks, so user now can go through actions like "New Game > Episode > Skill level" by faster clicking.