-
Notifications
You must be signed in to change notification settings - Fork 133
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
Doom: shift widgets one line down so chat typing line may appear #949
Conversation
Notes: chat string may be long at take full width of the screen. Also, better variable naming.
src/doom/hu_stuff.c
Outdated
@@ -590,6 +590,8 @@ void HU_Start(void) | |||
const char *s; | |||
// [crispy] string buffers for map title and WAD file name | |||
char buf[8], *ptr; | |||
// [crispy] shift widgets one line down so chat typing line may appear | |||
const int net_chatline = netgame ? 8 : 0; |
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.
Could this be a bit more dynamic? For example, AV.wad plays a netgame demo even if you are going to play a singleplayer game. Could it get modified so that the widgets only slip down if there is an actual chat visible and shift back to their original positions else?
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.
Sure. I can abuse HU_Ticker
with it's netgame
condition, which will recalculate widgets position every calculated tic. To prevent duplication of HUlib_initTextLine(&w_kills, ...
and others, I have to move them to static, separated function. Quick example how it will looks: https://youtu.be/3H2x0rUocXU
No commit for now, polishing and experementing is still needed.
@fabiangreffrath have a look, please. Calling |
Hm, sorry, but I'd consider that a bit over-engineered. I'd prefer if only the widgets' y-coordinates would get adjusted in the ticker function, according to the current scenario. Please have a look at how @rfomin has done it for Woof (which has a lot more widgets, btw): |
Jesus Christ, that dang original HUD system... 🤯 |
@fabiangreffrath, your turn, please. ♟️ |
src/doom/hu_stuff.c
Outdated
@@ -1073,6 +1085,7 @@ void HU_Ticker(void) | |||
{ | |||
crispy_statsline_func_t crispy_statsline = crispy_statslines[crispy->statsformat]; | |||
|
|||
if (crispy->automapstats == WIDGETS_STBAR) |
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.
Isn't this check redundant at this place?
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.
Redundant indeed, fixed in commit below.
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.
Guess it's all done now, except some unclear positioning between tabs and spaces.
@fabiangreffrath are there any further recommendations?
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.
Sorry, I'll still have to play-test the changes, but haven't found time for it yet, because I am currently involved in other projects.
- Add back removed line break. - No shifting of time widget is needed if no stats widget is used. - Remove redundant automapstats check.
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.
Did some cursory testing, seems to work as intended. Thanks!
Sorry, forgot about this one. |
No problem, thanks for accepting. I can't proceed with anything and stopped all coding activity - simply can't focus on something gaming-related now. |
Just as I have promised. This should allow chat line properly appear. Comparative screenshots: before and after.
However, I'm starting to forget how original HUD system is working after rewriting it on ID, so... Have I missed something? Any thoughts or corrections? And maybe we don't need it while demo playing since no chat string are recording in demos?