コード例 #1
0
 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();
 }
コード例 #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();
        }
    }
コード例 #3
0
ファイル: NewSaveMenu.cs プロジェクト: vinas8/Thrive
    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();
        }
    }
コード例 #4
0
 public void PopupAddStation()
 {
     NewStation.PopupCentered();
 }
コード例 #5
0
 public void _on_SettingsButton_pressed()
 {
     _settingsWindow.PopupCentered();
 }
コード例 #6
0
ファイル: StartMenuButtons.cs プロジェクト: NelDav/SEgame
 private void _on_Quit_pressed()
 {
     GD.Print("Quit? Popup");
     // open PopUp Dialog (size: 300, 100)
     myQuitDialog.PopupCentered(new Vector2(300, 100));
 }