Exemplo n.º 1
0
    public void ShowHelpScreen()
    {
        if (ActiveMenu == ActiveMenuType.Help)
        {
            return;
        }

        ActiveMenu = ActiveMenuType.Help;
        helpScreen.RandomizeEasterEgg();
    }
Exemplo n.º 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"),
     });
Exemplo n.º 3
0
    public bool EscapeKeyPressed()
    {
        if (Visible)
        {
            ActiveMenu = ActiveMenuType.Primary;

            EmitSignal(nameof(OnClosed));

            return(true);
        }

        if (IsPausingBlocked)
        {
            return(false);
        }

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