Ability to customize pause display
Moderator: GZDoom Developers
-
- Posts: 3886
- Joined: Fri Feb 08, 2008 9:15 am
- Preferred Pronouns: She/Her
- Operating System Version (Optional): (btw I use) Arch
- Graphics Processor: nVidia with Vulkan support
- Location: Vigo, Galicia
Ability to customize pause display
This is a bit of a wild one, probably, but I'd be interested in seeing if it could be accepted.
Currently, the "Paused" display is entirely hardcoded, but it would be desirable for mods to alter that if they want something with more visual flair.
As with my previous customization features this will be done through a virtual function in the status bar. I've opened a pull request here.
Currently, the "Paused" display is entirely hardcoded, but it would be desirable for mods to alter that if they want something with more visual flair.
As with my previous customization features this will be done through a virtual function in the status bar. I've opened a pull request here.
-
- Posts: 820
- Joined: Thu Apr 25, 2013 12:21 pm
- Preferred Pronouns: They/Them
- Operating System Version (Optional): Windows 11 for the Motorola Powerstack II
- Graphics Processor: nVidia with Vulkan support
- Location: The Corn Fields
Re: Ability to customize pause display
This would be so cool.
-
- Lead GZDoom+Raze Developer
- Posts: 49184
- Joined: Sat Jul 19, 2003 10:19 am
- Location: Germany
Re: Ability to customize pause display
Sure, why not?
-
- Posts: 3886
- Joined: Fri Feb 08, 2008 9:15 am
- Preferred Pronouns: She/Her
- Operating System Version (Optional): (btw I use) Arch
- Graphics Processor: nVidia with Vulkan support
- Location: Vigo, Galicia
Re: Ability to customize pause display
Who are you and what have you done with Graf?Graf Zahl wrote:Sure, why not?
-
- Posts: 678
- Joined: Mon Jan 16, 2006 8:53 pm
- Location: Rio de Janeiro - Brazil
Re: Ability to customize pause display
Ok, how to...?
-
- Posts: 5032
- Joined: Sun Nov 14, 2010 12:59 am
Re: Ability to customize pause display
Something like this...
Code: Select all
class MyStatusBar : BaseStatusBar
{
override bool DrawPaused (int player)
{
// Do stuff here...
// Returning 'true' skips the internal drawing of the "Pause" sign,
// otherwise it's drawn too.
return true;
}
}
-
- Posts: 3886
- Joined: Fri Feb 08, 2008 9:15 am
- Preferred Pronouns: She/Her
- Operating System Version (Optional): (btw I use) Arch
- Graphics Processor: nVidia with Vulkan support
- Location: Vigo, Galicia
Re: Ability to customize pause display
Note that the "player" parameter is used for multiplayer so you can show the "by <player name>" subtitle. It will be set to -1 if it wasn't paused by a player (does that actually happen?).
-
- Posts: 678
- Joined: Mon Jan 16, 2006 8:53 pm
- Location: Rio de Janeiro - Brazil
Re: Ability to customize pause display
Oh, ok.Blue Shadow wrote:Something like this...
Code: Select all
class MyStatusBar : BaseStatusBar { override bool DrawPaused (int player) { // Do stuff here... // Returning 'true' skips the internal drawing of the "Pause" sign, // otherwise it's drawn too. return true; } }
Please, let me ask.
This is about the PAUSE graphic on midle/top of the screen. Right?
There is the thing, i did 2 ACS Scripts that looks so damn cool that would be really Nice If i could replace the normal Doom Pause event with those ACS Scripts.
Basically the first one, freeze everything, fade the actual music to 0.0, fade in the Pause Music and draw the logo in the center of te screen.
The other script Just undo the first one in reverse order.
So, can i aply this plan with zscript?
-
- Posts: 3886
- Joined: Fri Feb 08, 2008 9:15 am
- Preferred Pronouns: She/Her
- Operating System Version (Optional): (btw I use) Arch
- Graphics Processor: nVidia with Vulkan support
- Location: Vigo, Galicia
Re: Ability to customize pause display
I'm afraid not. The music and sound pausing/resuming is hardcoded into the pause command. This is only for the actual display alone.
At least so far the most advanced thing I've been able to do is make the pause text bounce around like a dvd logo, but I've considered other possibilities like playing little looping animations, gradually dimming the screen, or turning the whole thing into just straight up a screensaver.
At least so far the most advanced thing I've been able to do is make the pause text bounce around like a dvd logo, but I've considered other possibilities like playing little looping animations, gradually dimming the screen, or turning the whole thing into just straight up a screensaver.
-
- Posts: 13797
- Joined: Tue Jan 13, 2004 1:31 pm
- Preferred Pronouns: She/Her
Re: Ability to customize pause display
You can play sounds on the menu channel and they should play while paused though, AFAIK.
-
- Posts: 3886
- Joined: Fri Feb 08, 2008 9:15 am
- Preferred Pronouns: She/Her
- Operating System Version (Optional): (btw I use) Arch
- Graphics Processor: nVidia with Vulkan support
- Location: Vigo, Galicia
Re: Ability to customize pause display
Yes, I can confirm as much. It may also be possible to forcibly resume other sounds and music too, if you want to. Pretty sure those functions are exported.
-
- Posts: 678
- Joined: Mon Jan 16, 2006 8:53 pm
- Location: Rio de Janeiro - Brazil
Re: Ability to customize pause display
Well...
I know more about the the moon surface than zscript.
I was able to change the PAUSE lump at least.
I know more about the the moon surface than zscript.
I was able to change the PAUSE lump at least.
-
- Posts: 516
- Joined: Sat Aug 19, 2017 11:52 pm
- Graphics Processor: nVidia (Modern GZDoom)
Re: Ability to customize pause display
And is it possible with this method to "completely freeze" the picture on the screen? What I mean is that with the default pause screen, some parts of the picture stay animated: textures with animdefs remain animated, and textures with shaders applied also keep their shaders, so if the shader animates the texture, it remains animated when the game is paused.
For me personally it ruins the immersion, since on one hand you can see, for example, a falling object that has frozen in midair, while on the other hand, (for example) the water in a waterfall keeps flowing down. It has been bugging me for a long time.
So, is it possible with DrawPaused to remember the state of all the pixels on the screen at the moment when the game was paused and keep drawing this exact picture until the game is unpaused? If so, how do I go about it?
For me personally it ruins the immersion, since on one hand you can see, for example, a falling object that has frozen in midair, while on the other hand, (for example) the water in a waterfall keeps flowing down. It has been bugging me for a long time.
So, is it possible with DrawPaused to remember the state of all the pixels on the screen at the moment when the game was paused and keep drawing this exact picture until the game is unpaused? If so, how do I go about it?
-
- Posts: 5032
- Joined: Sun Nov 14, 2010 12:59 am
Re: Ability to customize pause display
This has no control over texture animation. What it is, is a UI feature that allows stuff to be drawn on the HUD while the game is paused, like the pause sign.
-
-
- Posts: 17465
- Joined: Mon Oct 27, 2003 12:07 am
- Location: Kuala Lumpur, Malaysia
Re: Ability to customize pause display
If I recall correctly, the thing about animated textures (and shaders) to continue to animate despite the entire game being paused is to allow texture animations that aren't locked to the playsim.
Though TBH, from my non-programmer perspective, I don't understand what's so hard about making the texture animations pause along with the playsim.
(oh and yes, as Blue Shadow said, the feature that Marisa submitted to GZDoom here has nothing to do with texture animation at all)
Though TBH, from my non-programmer perspective, I don't understand what's so hard about making the texture animations pause along with the playsim.
(oh and yes, as Blue Shadow said, the feature that Marisa submitted to GZDoom here has nothing to do with texture animation at all)