private void Settings_ButtonClicked()
 {
     _settingsDialog.GetNode <SpinBox>("VBoxContainer/HBoxContainer/ResolutionSpinBox").Value = _polygonizer.Resolution;
     _settingsDialog.GetNode <SpinBox>("VBoxContainer/HBoxContainer2/MarginSpinBox").Value    = _polygonizer.Margin;
     _settingsDialog.GetNode <CheckBox>("VBoxContainer/PreviewCheckBox").Pressed = _enablePreview;
     _settingsDialog.PopupCentered();
 }
Exemple #2
0
    private void SaveButtonPressed()
    {
        GUICommon.Instance.PlayButtonPressSound();

        var name = GetSaveName();

        if (FileHelpers.Exists(PathUtils.Join(Constants.SAVE_FOLDER, name)))
        {
            overwriteConfirm.DialogText = $"The chosen filename ({name}) already exists. Overwrite?";
            overwriteConfirm.PopupCentered();
        }
        else
        {
            OnConfirmSaveName();
        }
    }
Exemple #3
0
    private void SaveButtonPressed()
    {
        GUICommon.Instance.PlayButtonPressSound();

        var name = GetSaveName();

        if (FileHelpers.Exists(PathUtils.Join(Constants.SAVE_FOLDER, name)))
        {
            // The chosen filename ({0}) already exists. Overwrite?
            overwriteConfirm.DialogText = string.Format(CultureInfo.CurrentCulture,
                                                        TranslationServer.Translate("THE_CHOSEN_FILENAME_ALREADY_EXISTS"),
                                                        name);
            overwriteConfirm.PopupCentered();
        }
        else
        {
            OnConfirmSaveName();
        }
    }
Exemple #4
0
 public void PopupAddStation()
 {
     NewStation.PopupCentered();
 }
Exemple #5
0
 public void _on_SettingsButton_pressed()
 {
     _settingsWindow.PopupCentered();
 }
Exemple #6
0
 private void _on_Quit_pressed()
 {
     GD.Print("Quit? Popup");
     // open PopUp Dialog (size: 300, 100)
     myQuitDialog.PopupCentered(new Vector2(300, 100));
 }