geode-sdk / indexer

Geode mod indexer system
21 stars 37 forks source link

Add Pause Countdown #1765

Open ShineUA opened 6 months ago

ShineUA commented 6 months ago

Your mod link

https://github.com/ShineUA/pause-countdown-mod-geode/releases/download/v1.1.4/shineua.pause_countdown.geode

Your mod source code

https://github.com/ShineUA/pause-countdown-mod-geode/tree/v1.1.4/

Your mod description

This mod adds countdown on level resume.

github-actions[bot] commented 6 months ago

Waiting for staff to comment "!accept" to accept the entry.

Info:

camila314 commented 6 months ago

add mac to the targets and i can accept it

RayDeeUx commented 6 months ago

wait there's a different conflict with GDMO that hasnt been fixed i think

not sure what the progress is on that

github-actions[bot] commented 6 months ago

Waiting for staff to comment "!accept" to accept the entry.

Info:

ShineUA commented 6 months ago

add mac to the targets and i can accept it

added

github-actions[bot] commented 6 months ago

Waiting for staff to comment "!accept" to accept the entry.

Info:

Cvolton commented 6 months ago

1st jump with space after unpause doesnt do anything if custom keybinds is installed

otherwise looks fine but it would be nice to see this resolved

ShineUA commented 6 months ago

1st jump with space after unpause doesnt do anything if custom keybinds is installed

otherwise looks fine but it would be nice to see this resolved

On mac?

ShineUA commented 6 months ago

Because I don't have this problem on Windows

ShineUA commented 6 months ago

You just need to click after countdown disappears

Cvolton commented 6 months ago

Windows version of the game, it only happens with custom keybinds mod installed and enabled

Cvolton commented 6 months ago

Should probably be noted that I used the spacebar for both u pausing and jumping while testing

Fleeym commented 6 months ago

I get this with only Custom Keybinds installed, might not be because of this mod

ShineUA commented 6 months ago

Well, I don't really know what the problem with custom keybinds but my code only does this to prevent custom keybinds from executing functions on keys:

#ifdef GEODE_IS_WINDOWS

#include <Geode/modify/CCKeyboardDispatcher.hpp>
class $modify(CCKeyboardDispatcher) {
    static void onModify(auto& self) {
        self.setHookPriority("CCKeyboardDispatcher::dispatchKeyboardMSG", -69420);
    }

    bool dispatchKeyboardMSG(enumKeyCodes key, bool down, bool p2) {
        if(isResume) {
            return false;
        }
        return CCKeyboardDispatcher::dispatchKeyboardMSG(key, down, p2);
    }
};

#endif
ShineUA commented 6 months ago

I see the delay but I don't know how to fix this

ShineUA commented 6 months ago

Sometimes it works perfrectly

ShineUA commented 6 months ago

The only fix I found is just to change keybind.

Fleeym commented 6 months ago

Bug happens because P1 Jump (bound to space) eats up all other events that use that key, even if pause menu is opened