Example #1
0
        private void _ShowAboutDialog()
        {
            bool showOnStart = (bool)editorSettings.GetSetting("mono/editor/show_info_on_start");

            aboutDialogCheckBox.Pressed = showOnStart;
            aboutDialog.PopupCentered();
        }
Example #2
0
    public void OpenPopup()
    {
        var popup = new AcceptDialog();

        popup.SizeFlagsHorizontal = (int)Control.SizeFlags.ExpandFill;
        popup.SizeFlagsVertical   = (int)Control.SizeFlags.ExpandFill;
        popup.PopupExclusive      = true;
        popup.WindowTitle         = "Configure snap";
        var container = new VBoxContainer();
        var snapSpin  = new SpinBox();

        snapSpin.MinValue = 0;
        snapSpin.MaxValue = 99;
        snapSpin.Step     = 0.0001f;
        snapSpin.Value    = snapLength;
        snapSpin.Connect("value_changed", this, "SetSnapLength");
        var snapHBox  = new HBoxContainer();
        var snapLabel = new Label();

        snapLabel.Text = "Snap length";
        snapHBox.AddChild(snapLabel);
        snapHBox.AddChild(snapSpin);
        container.AddChild(snapHBox);
        popup.AddChild(container);

        popup.Connect("popup_hide", popup, "queue_free");
        baseControl.AddChild(popup);

        popup.PopupCentered(new Vector2(200, 100));
    }
Example #3
0
 public override void _Ready()
 {
     loader = GetNode<Loader>("SpaceHUD/MarginContainer/HBoxContainer/Loader");
     tutorial = GetNode<AcceptDialog>("SpaceHUD/Tutorial");
     if (!PlayerData.Instance.ViewedTutorial)
     {
         tutorial.PopupCentered();
         PlayerData.Instance.ViewedTutorial = false;
         GD.Print("Tutorial is popped");
     }
 }
Example #4
0
    public override void _Ready()
    {
        loader      = GetNode <Loader>("SpaceHUD/MarginContainer/HBoxContainer/Loader");
        tutorial    = GetNode <AcceptDialog>("SpaceHUD/Tutorial");
        upgradeMenu = GetNode <CanvasLayer>("SpaceHUD").GetNode <UpgradeMain>("MainUpgradeMenu");

        upgradeMenu.Visible = false;

        if (!PlayerData.Instance.ViewedTutorial)
        {
            tutorial.PopupCentered();
            PlayerData.Instance.ViewedTutorial = false;
            GD.Print("Tutorial is popped");
        }
    }
Example #5
0
    public override void _Ready()

    {
        story = GetNode <AcceptDialog>("CanvasLayer/Story");

        CheckChildren(GetChildren());

        foreach (TileMap map in tileMaps)
        {
            MakeTileCollisionShapes(map);
        }

        if (!PlayerData.Instance.ViewedStory)
        {
            story.PopupCentered();
            PlayerData.Instance.ViewedStory = false;
        }
    }
Example #6
0
    public void DisplayHelpPopup()
    {
        _helpDialog.PopupCentered();

        switch (_alchemyStage)
        {
        case AlchemyStage.MortarPestle:
        {
            switch (_mortarPestleStage)
            {
            case MortarPestleStage.PickReagents:
            {
                _helpDialog.DialogText = "Select your reagents from the list to the right.";
                break;
            }

            case MortarPestleStage.Crush:
            {
                _helpDialog.DialogText = "Crush up the reagents with the mortar and pestle! Just pick up the pestle and start smashing.";
                break;
            }
            }
            break;
        }

        case AlchemyStage.Calcinator:
        {
            break;
        }

        case AlchemyStage.Alembic:
        {
            break;
        }

        case AlchemyStage.Retort:
        {
            break;
        }
        }
    }
Example #7
0
    public override void _Ready()

    {
        story = GetNode <AcceptDialog>("CanvasLayer/Story");

        CheckChildren(GetChildren());

        foreach (TileMap map in tileMaps)
        {
            MakeTileCollisionShapes(map);
        }

        if (!PlayerData.Instance.ViewedStory)
        {
            story.PopupCentered();
            PlayerData.Instance.ViewedStory = false;
            GD.Print("Story is popped");
        }

        Signals.PublishRoverFuelChangedEvent();
    }
Example #8
0
 private void ShowAlert(string text)
 {
     _alertDialog.DialogText = text;
     _alertDialog.PopupCentered();
 }
Example #9
0
 public void ShowErrorDialog(string message, string title = "Error")
 {
     _errorDialog.Title      = title;
     _errorDialog.DialogText = message;
     _errorDialog.PopupCentered();
 }