Beispiel #1
0
    public void ShowHelpScreen()
    {
        if (ActiveMenu == ActiveMenuType.Help)
        {
            return;
        }

        ActiveMenu = ActiveMenuType.Help;
        helpScreen.RandomizeEasterEgg();
    }
Beispiel #2
0
 private Control GetControlFromMenuEnum(ActiveMenuType value)
 {
     return(value switch
     {
         ActiveMenuType.Primary => primaryMenu,
         ActiveMenuType.Help => helpScreen,
         ActiveMenuType.Load => loadMenu,
         ActiveMenuType.Options => optionsMenu,
         ActiveMenuType.Save => saveMenu,
         ActiveMenuType.None => null,
         _ => throw new NotSupportedException($"{value} is not supported"),
     });
Beispiel #3
0
    public bool EscapeKeyPressed()
    {
        if (Visible)
        {
            ActiveMenu = ActiveMenuType.Primary;

            EmitSignal(nameof(OnClosed));

            return(true);
        }

        if (IsPausingBlocked)
        {
            return(false);
        }

        EmitSignal(nameof(OnOpenWithKeyPress));
        return(true);
    }