Skip to content
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

multi options selected in main menu #430

Open
genufish opened this issue Apr 10, 2022 · 1 comment
Open

multi options selected in main menu #430

genufish opened this issue Apr 10, 2022 · 1 comment
Labels
bug Something isn't working

Comments

@genufish
Copy link

My mods and Everest install are up to date

Yes

I have recreated the bug with only Everest OR a minimum number of mods enabled

Yes

Describe the bug

Add multiple mods to the mod directory at once while celeste is running ,mainMenu cant work.

Steps to reproduce

Peek 2022-04-10 23-15

Expected behavior

Menu can work and only one option is selected

Operating System

ubuntu 20.04

Everest Version

3282

Mods required to reproduce

No response

Additional context

No response

@genufish genufish added the bug Something isn't working label Apr 10, 2022
@genufish
Copy link
Author

genufish commented Apr 10, 2022

i fix it by mod code

On.Celeste.OuiMainMenu.RebuildMainAndTitle += menuPatch;
private static void menuPatch(On.Celeste.OuiMainMenu.orig_RebuildMainAndTitle orig, OuiMainMenu self){
        string selected = null;
        foreach (MenuButton button in self.Buttons) {
            if (button.Selected && !(button is MainMenuClimb))
                selected = (button as MainMenuSmallButton)?.GetLabelName();;
            button.SetSelected(false);
        }
        orig(self);
        if (selected == null) {
            foreach (MenuButton button in self.Buttons) {
                button.SetSelected(button is MainMenuClimb);
            }
        } else {
            foreach (MenuButton button in self.Buttons) {
                button.SetSelected((button as MainMenuSmallButton)?.GetLabelName() == selected);
            }
        }
    }  

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
bug Something isn't working
Projects
None yet
Development

No branches or pull requests

1 participant