Funkin icon indicating copy to clipboard operation
Funkin copied to clipboard

Enhancement: Remove 0.5sec of input ignoring when entering pause menu

Open DemiSans opened this issue 1 year ago • 11 comments

Issue Checklist

  • [X] I have properly named my enhancement
  • [X] I have checked the Issues/Discussions pages to see if my enhancement has already been suggested

What is your suggestion, and why should it be implemented?

That wasnt a thing before weekend 1 update :(

DemiSans avatar Oct 15 '24 19:10 DemiSans

I think disabling pause spamming prevents some bugs from occurring, but I'm open to hearing out why you want it back. What would you want to do with it?

Hundrec avatar Oct 15 '24 21:10 Hundrec

@Hundrec I want to fast restart the song by pressing enter, ↓, enter, but I cant bc ↓ didnt register and instead im pressing "resume".

And overall, just qol improvement. For navigating in pause menu instantly, without waiting.

DemiSans avatar Oct 15 '24 21:10 DemiSans

I see, that's a pretty good purpose! Maybe they can find a compromise between disabling inputs and allowing quick restarts. One idea I have is making the RESET keybind work in the pause menu, instantly restarting the song (as many people have requested)

Hundrec avatar Oct 15 '24 21:10 Hundrec

I see, that's a pretty good purpose! Maybe they can find a compromise between disabling inputs and allowing quick restarts. One idea I have is making the RESET keybind work in the pause menu, instantly restarting the song (as many people have requested)

i remember asking for it but i think they denied it and instead send me a script that i use to today

amyspark-ng avatar Oct 16 '24 00:10 amyspark-ng

I see, that's a pretty good purpose! Maybe they can find a compromise between disabling inputs and allowing quick restarts. One idea I have is making the RESET keybind work in the pause menu, instantly restarting the song (as many people have requested)

i remember asking for it but i think they denied it and instead send me a script that i use to today

Be a G and pass the script around to the class.

Average-FNF-Modder avatar Oct 16 '24 01:10 Average-FNF-Modder

Be a G and pass the script around to the class.

https://github.com/FunkinCrew/Funkin/issues/2442#issuecomment-2297539376

NotHyper-474 avatar Oct 16 '24 02:10 NotHyper-474

I see, that's a pretty good purpose! Maybe they can find a compromise between disabling inputs and allowing quick restarts. One idea I have is making the RESET keybind work in the pause menu, instantly restarting the song (as many people have requested)

i remember asking for it but i think they denied it and instead send me a script that i use to today

Be a G and pass the script around to the class.

#2442 (comment)

Thank you fr.

Average-FNF-Modder avatar Oct 16 '24 03:10 Average-FNF-Modder

import funkin.modding.module.Module;
import funkin.play.PlayState;

import funkin.play.PauseSubState;
import funkin.play.PauseMode;

import funkin.ui.freeplay.FreeplayState;
import flixel.FlxG;
import funkin.audio.FunkinSound;

class QuickReset extends Module {
	function new() {
		super('QuickReset');
	}

	function onUpdate(event) {
		if (PlayState.instance != null) {
			if (FlxG.keys.pressed.CONTROL) {
				if (FlxG.keys.justPressed.R) {
					PlayState.instance.needsReset = true;

					// is paused
					if (PlayState.instance.subState != null) {
						PlayState.instance.closeSubState();
					}
				}
			}
		}
	}
}

i modified it so it also works if the game is paused

amyspark-ng avatar Oct 16 '24 03:10 amyspark-ng

if you want to change the key just replace the FlxG.keys.justPressed.R with the key you want

amyspark-ng avatar Oct 16 '24 03:10 amyspark-ng

where do I add the code to make it work?

M7theguy avatar Oct 17 '24 15:10 M7theguy

where do I add the code to make it work?

you have to make a .hxc file and place it in a folder in mods so like

funkin/mods/quickreset/reset.hxc

amyspark-ng avatar Oct 17 '24 15:10 amyspark-ng

very nice suggestion, when this is issue gets closed, it means it's merged internally, thanks!

ninjamuffin99 avatar Dec 09 '24 01:12 ninjamuffin99

Sorry @ninjamuffin99, I messed something up! Can you create a new label called status: resolved internally?

Hundrec avatar Dec 09 '24 01:12 Hundrec

hundrec you devil

ninjamuffin99 avatar Dec 09 '24 01:12 ninjamuffin99

Bahaha, looks like my actions system needs some more work!

I'll make a couple labels suggestions in a new issue for you and Eric to look over. Hopefully that will make things easier to use :)

It's ready! #3920

Hundrec avatar Dec 09 '24 01:12 Hundrec