-
Notifications
You must be signed in to change notification settings - Fork 130
New issue
Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.
By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.
Already on GitHub? Sign in to your account
Various menu control improvements #1199
Conversation
Following actions: - Nightmare skill verifying (Doom) - End game - Quit Small addition for Heretic and Hexen: allow to quit by pressing F10 in any game states, so user won't need to open game menu and select "Quit Game". Suicide confirmation (Hexen only) is possible but not included - probably it's too "dangeours", just like savegames deliting, user have to confirm such actions strictly by "Y" key.
So you can click faster to select / go back in menus.
} | ||
|
||
// [crispy] scroll menus with mouse wheel | ||
if (event->data1 & (1 << 4)) |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
Applies to both Heretic and Hexen, this means: use hardcoded mouse events, not related to mousebprevweapon
and mousebnextweapon
binds to avoid situations if mouse wheel actions will be re-binded.
@@ -1079,6 +1084,11 @@ static boolean InventoryMoveRight() | |||
|
|||
plr = &players[consoleplayer]; | |||
inventoryTics = 5 * 35; | |||
|
|||
if (MenuActive) |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
Applies to both Heretic and Hexen, not sure if this is optimal, but we have to prevent inventory pop-up while using mouse wheel in active menu.
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
I like this, thanks!
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 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 working on this!
Sure, but
Yes, of course, please proceed. |
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 P.S. Hmm, MM/DD/YYYY is not my locale format, despite of I'm using following string to construct date and time: |
You'll have to call |
Worked perfectly, GCC under MSYS doesn't have any complains 😊 +++ crispy-doom/src/i_main.c Sun Apr 21 19:00:55 2024
@@ -18,14 +18,15 @@
#include "config.h"
#include "crispy.h"
#include <assert.h>
#include <stdio.h>
#include <stdlib.h>
+#include <locale.h>
#include "SDL.h"
#include "doomtype.h"
#include "i_system.h"
#include "m_argv.h"
#include "m_misc.h"
@@ -47,14 +48,17 @@
myargv = malloc(argc * sizeof(char *));
assert(myargv != NULL);
for (int i = 0; i < argc; i++)
{
myargv[i] = M_StringDuplicate(argv[i]);
}
+
+ // [crispy] Print date and time in the Load/Save Game menus in the current locale
+ setlocale(LC_TIME, "");
//!
// Print the program version and exit.
//
if (M_ParmExists("-version") || M_ParmExists("--version")) {
puts(PACKAGE_STRING);
exit(0);
Please choose preferred alignment:
|
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.